Use `transparency` when color transparency is not set
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
- #1252
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
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.
the
transparencyoption 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 ...
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 👍🏻
I was thinking that maybe adding a second option wouldn't be too problematic after all. something like default_alpha. the color parsing should be modified a bit though
nice to hear it seems more viable than previously!