hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.96k stars 913 forks source link

Blur only works for Waybar when scaling is set to > 1.01% #2498

Closed foggerty closed 10 months ago

foggerty commented 1 year ago

Hi, I'm working on the assumption that this is a compositor issue, and so reporting it here. If not, please let me know and I'll take it to the Waybar folks :smiley:

Expected behavior: blur works in Waybar no matter the scaling used.

Actual behavior: blur only works when I've set scaling to anything > 1.01% with wlr-randr:

wlr-randr --output eDP-1 --scale 1.01

Note that I have to run this command after (re)starting Hyprland, as for some reason scaling defaults to 1.5%. And yes, blur works at that scale.

My Hyprland config is here and it's running on:

Note that I just tried waybar-hyprland-git and got the same issue.

Waybar config and style are found [here]().

Fxzzi commented 1 year ago

Looking at your hyprland config, you haven't put layerrule = blur, waybar into the decoration settings. Could you try that with normal scaling?

foggerty commented 1 year ago

Still no go sorry.

foggerty commented 1 year ago

Wondering if it's a driver issue as I'm not seeing drop-shadows either. Will try this setup on a VM and see what happens.

foggerty commented 1 year ago

Found the problem! Well kinda - custom colors/style from pywal caused 'issues'. If I remove that, then blur works fine for Waybar, no matter the scaling.

I removed the following line from Waybar's config all all was well - other than the color scheme for by rice being ruined :(

@import "/home/matt/.cache/wal/colors-waybar.css"

Thanks for the help!

foggerty commented 1 year ago

Quick update - setting the background color in Waybar kills the blur, unless I pull the scaling trick. I was leaning towards it being a Waybar issue, but now leaning back towards it being a compositor issue given this behavior,

mshzsh commented 1 year ago

Also try this: blurls=waybar It must be add in the hyprland.conf

foggerty commented 1 year ago

Nope, no go. I also replaced my config with the sample config here and still no.

Will have a play around with Waybar settings tonight and see if there's something there.

foggerty commented 1 year ago

Got it! The scaling factor was not it, but it is a clue as to what's going on. I finally narrowed it down to some weird interaction between Waybar's styling and Hyprland's compositor (well, pretty sure without digging through the code).

Basically if I do not apply custom styling to Waybar then everything's fine. Zero problems with blur.

But apply styling to Waybar, and the following will happen:

UNLESS scaling is set to > 1.01%. Then it doesn't matter what styling that I'm using, blur just stays. In fact, it's blurred after startup as well.

So yeah, not sure if I should leave this with you guys or take it to the Waybar team?

GabrielMrqs commented 1 year ago

Also try this: blurls=waybar It must be add in the hyprland.conf

man, I added this command but it only works for like, 1 second, after that turns off blur :(

Serpentian commented 11 months ago

The possible reason for the blur not to be applied, is that in css of waybar opacity option is used. Using rgba colors instead (and removing opacity) fixes the issue.

foggerty commented 10 months ago

Thanks @Serpentian, that works :-)

Anyway, this is looking very much like a Waybar issue, so I'll close this.

ManImDead12 commented 9 months ago

@import "/home/matt/.cache/wal/colors-waybar.css"

Is this for hyprland.conf or waybar css?