Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use transparency when color transparency is not set #1439

Open
titaniumtraveler opened this issue Feb 12, 2025 · 4 comments
Open

Use transparency when color transparency is not set #1439

titaniumtraveler opened this issue Feb 12, 2025 · 4 comments

Comments

@titaniumtraveler
Copy link

Motivation

A friend looking into using dunst got confused about transparency option
being marked as X11 only, which led us to discussing the issue and me having the
idea of why not use transparency as fallback on wayland if the transparency
is not set for a color.

That would also make writing cross-(wayland/X11) configs and
upgrading to wayland much nicer.

Proposed Idea

On wayland default colors that don't set the A part of #RGBA to
the value of transparency.
((100 - transparency) * 0x100 / 100) to be specific)

Alternatives

Make the documentation clearer.
For example with

- transparency (default: 0) (X11 only)
+ transparency (default: 0) (X11 only, for wayland see COLORS)

When people see that the option is for X11 only, it is likely they don't even
bother reading the content.

Related issues

@Axlefublr
Copy link

I am the friend: seeing that option be x11 only made me assume that dunst cannot do transparency overall. with some other issues I had with dunst, it made me go look for other tools instead. fixing at least the doc comment on this would maybe make me (i.e. someone else in the future) stay longer

@bynect
Copy link
Member

bynect commented Feb 12, 2025

thanks for the heads up. I will improve the documentation.
the transparency option is kinda discouraged (as I also said in #1252) since you can set the individual colors' alpha without relying on well-behaved wm.

@titaniumtraveler
Copy link
Author

titaniumtraveler commented Feb 12, 2025

the transparency option is kinda discouraged (as I also said in #1252) since you can set the individual colors' alpha without relying on well-behaved wm.

Yeah, that is fair.
I still think that having some option to set the "default" transparency would be pretty useful.

Maybe have something like color_default_transparency(or maybe just default_transparency)?
Having to set a specific transparency for every single color sounds like a pain ...

@bynect
Copy link
Member

bynect commented Feb 13, 2025

the problem is that the behavior on wayland and xorg would then be different if we keep using the transparency settings. despite it's name what it does is set the _NET_WM_OPACITY hint for the window manager. maybe adding another option would work, we'll see 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants