Hyprland
Hyprland copied to clipboard
Add Opacity rule to layerrule
Description
At the moment you are unable to set the opacity of different layers, I'm not sure how difficult this would be to implement, but i'd like to be able to have an opacity rule for the layerrule option in the config file.
You can set opacity for layers in the config files of a particular layer, so why would you want the compositor to do that ?
You can set opacity for layers in the config files of a particular layer, so why would you want the compositor to do that ?
What if a particular layer doesn't have this functionality? or am i misinterpreting your comment, i think it would be more useful to have these options like with windowrule, though i am kinda a noob so idk...
You are absolutely right, but AFAIK, nearly every layer programs I know of, have an option to set their individual opacity values(name them waybar, dunst, mako, eww, fnott, rofi, wofi etc..). Can you name some layers for me, that do not have an option to set opacity values ?
I only mean that implementing a setting that would add opacity for layers would just be useless if it can be set through its config file(I'm not a hardcore software dev either, but from a developers pov it would just not worth the time to implement this :-).)
Well in my case it's mpvpaper, i haven't looked at much else in terms off transparency options. Maybe i should take the issue to them, they don't have as many issue requests so idk lol. Edit: Yeah I'm not much of a dev either, my assumption/hope was that hopefully the systems for both layers and windows were semi similar and that maybe one could just sort of semi repurpose and edit the code to fit layers, and i had a look through to see if maybe even i could do it, but this is way above my level so the best i can do is beg someone far cleverer than me to implement my dumb request.
Well in my case it's mpvpaper, i haven't looked at much else in terms off transparency options. Maybe i should take the issue to them, they don't have as many issue requests so idk lol. Edit: Yeah I'm not much of a dev either, my assumption/hope was that hopefully the systems for both layers and windows were semi similar and that maybe one could just sort of semi repurpose and edit the code to fit layers, and i had a look through to see if maybe even i could do it, but this is way above my level so the best i can do is beg someone far cleverer than me to implement my dumb request.
AFAIK mpvpaper is a wallpaper application, why would you want to set opacity for a layer surface that renders your wallpaper, moreover its always gonna be beneath other programs that you are gonna open, so there's literally no point in setting opacity values for that, it should always indeed be opaque, so that your wallpaper is properly visible.
Or maybe you wanna blur your wallpaper by lowering the opacity values?!, so that the compositor(Hyprland would blur it for you)? if that's the case, you may want to blur you wallpaper manualy using other softwares, cuz having a translucent wallpaper would just add a blackish shade to your wallpaper and trust me it would look really ugly. Or maybe I'm still misinterpreting you. T_T
Well in my case it's mpvpaper, i haven't looked at much else in terms off transparency options. Maybe i should take the issue to them, they don't have as many issue requests so idk lol. Edit: Yeah I'm not much of a dev either, my assumption/hope was that hopefully the systems for both layers and windows were semi similar and that maybe one could just sort of semi repurpose and edit the code to fit layers, and i had a look through to see if maybe even i could do it, but this is way above my level so the best i can do is beg someone far cleverer than me to implement my dumb request.
AFAIK mpvpaper is a wallpaper application, why would you want to set opacity for a layer surface that renders your wallpaper, moreover its always gonna be beneath other programs that you are gonna open, so there's literally no point in setting opacity values for that, it should always indeed be opaque, so that your wallpaper is properly visible.
Or maybe you wanna blur your wallpaper by lowering the opacity values?!, so that the compositor(Hyprland would blur it for you)? if that's the case, you may want to blur you wallpaper manualy using other softwares, cuz having a translucent wallpaper would just add a blackish shade to your wallpaper and trust me it would look really ugly. Or maybe I'm still misinterpreting you. T_T
it has options for which layer so you can put on top of other content,ill prob close this now as i can probably find a better way of doing this and idk if anyone other than me would have use for this.
You are absolutely right, but AFAIK, nearly every layer programs I know of, have an option to set their individual opacity values(name them waybar, dunst, mako, eww, fnott, rofi, wofi etc..). Can you name some layers for me, that do not have an option to set opacity values ?
I only mean that implementing a setting that would add opacity for layers would just be useless if it can be set through its config file(I'm not a hardcore software dev either, but from a developers pov it would just not worth the time to implement this :-).)
Transparency for dunst only works on X11, not wayland. There aren't that many other notification daemons, I mainly also tried mako and SwayNotificationCenter. The first does not support scalable icons, which is a deal breaker for me (BeautyLine or candy-icons should be shown) and the latter is much more complex to customize. So currently, there is no real option or alternative here.
You can set opacity for layers in the config files of a particular layer, so why would you want the compositor to do that ?
You could say the same for windowsrules, why even offer control from hyprland? The apps could also implement this themselves.
I think it's just better the more control and customization options are offered. Why just hope that app developers implement it when you can have a catch-all solution?
Transparency for dunst only works on X11, not wayland. There aren't that many other notification daemons, I mainly also tried mako and SwayNotificationCenter. The first does not support scalable icons, which is a deal breaker for me (BeautyLine or candy-icons should be shown) and the latter is much more complex to customize. So currently, there is no real option or alternative here.
You actually can set the transparency for dunst in wayland, it's just you have to specify the colors in #RRGGBBAA format.
Here's a snippet from my config for it:
[urgency_low]
# IMPORTANT: colors have to be defined in quotation marks.
# Otherwise the "#" and following would be interpreted as a comment.
background = "#1f1f2880"
foreground = "#dcd7ba"
highlight = "#6a9589"
frame_color = "#7fb4ca"
timeout = 6
# Icon for notifications with low urgency, uncomment to enable
default_icon = /home/dex/.local/share/icons/Fluent-dark/symbolic/status/notifications-new-symbolic.svg
[urgency_normal]
background = "#1f1f2880"
foreground = "#dcd7ba"
highlight = "#6a9589"
frame_color = "#7fb4ca"
timeout = 6
# Icon for notifications with normal urgency, uncomment to enable
default_icon = /home/dex/.local/share/icons/Fluent-dark/symbolic/status/notifications-new-symbolic.svg
[urgency_critical]
background = "#1f1f1d80"
foreground = "#ff5d62"
highlight = "#ff5d62"
frame_color = "#ff5d62"
timeout = 10
# Icon for notifications with critical urgency, uncomment to enable
default_icon = /home/dex/.local/share/icons/Fluent-dark/symbolic/status/notifications-new-symbolic.svg
You could say the same for windowsrules, why even offer control from hyprland? The apps could also implement this themselves.
Yeah you can set opacity/transparency for windows, but its not as easy as it is for layer surfaces, it is rather a hacky way to do so, also not much apps offer to alter their transparency by themselves(other than terminal emulators). Feel free to correct me if I'm wrong.
I think it's just better the more control and customization options are offered. Why just hope that app developers implement it when you can have a catch-all solution?
Totally agree with you here, I also raised a similar issue (i.e to add rounding otions for layers), but the dev straight up replied with a no and instead told me to use the ignorealpha option in the hyprland config and you have to set the border radius for that layer in its own config. So I don't think the devs are interested in adding any more configuring options for layers specifically the ones that can be implemented in the layer's own config.
You actually can set the transparency for dunst in wayland, it's just you have to specify the colors in #RRGGBBAA format.
Oh, I didn't know that. I ran a quick test and it works. Thanks a lot for this! :-)
I completely agree with your two other points. It's definitely a bigger priority and more important to implement this feature for windows than for layers (for windows it's already implemented, as you mentioned). Also, if you already chatted with a dev about a similar thing and they don't see this as a thing they would want on their to-do list, then so be it I guess :+1:
@Thilosaur Could this issue be re-opened? I still think an opacity rule for layers makes a lot of sense (the final judgement should be left to Vaxry). IMO being able to control and configure transparency for all layers from a single config option is just too useful not to have.
It's not only about that you can configure most layers to have some opacity. You can also likely configure most windows to have some opacity. The value is that you can control all the opacity from a single place and no application can refuse whether it supports it natively or not