-
-
Notifications
You must be signed in to change notification settings - Fork 707
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
sway: waybar background based on smart_gaps #1349
Comments
I don't think it's currently possible This works well for me:
(https://gitlab.com/WuerfelDev/dotfiles/-/blob/master/dots/waybar/.config/waybar/style.css#L10) |
Thanks for the tip, but my mom does not want me to use gradients :) |
You should be able to change the window#waybar.singlewindow {
background: black;
} Then with a nice fade out transition: window#waybar {
background: rgba(0,0,0,0);
transition: background .3s;
}
window#waybar.singlewindow {
background: rgba(0,0,0,1);
transition: none;
} |
Oh. This feels so close, but I can't figure out how to change the bar name from IPC.. |
I have not used IPC so I don't really know, but I have another idea. Or the hacky way: trigger a bash script that swaps the style.css with a copy that has a solid background bar. Then reload waybar |
It feels hacky. I will try to do dig a bit more on switching the bar name. thanks for the suggestions! |
I would love to have something like this. I nice solution would be to add/remove/toggle a class dynamically to an ID selector sending a signal, the same way you can send a signal to a module to update. For example if the selector is |
Another dead end I ended up in was to try using |
Apologies if I don't understand the use case correctly. I don't think there's much of a chance for waybar to get aware of smartgaps configuration in a dynamic way. But it does have different styles for the window#waybar.empty und window#waybar.solo when the sway-window module is active, depending on how many windows are in the workspace. The classes are added to the main waybar rather than the label widget underlying the window module. So something like the below should have a transparent waybar if there's many or no containers, and a soild waybar if there's just one window. Does this help?
|
@RobertMueller2 yes this is exactly what I want to achieve. The smartgaps thing is probably me poorly explaining what I was needing :) You say these classes should work even without your patch? Because I just tried what you wrote above, but I can't see it doing anything |
ooooh with the sway-window module active! it works! |
I've looked around but I could not find any issue related to this. I would like to be able to use a different style for the general background of waybar based on gaps. I use smart_gaps in sway that basically removes any gaps when there is only one window in a workspace. I usually set the waybar background transparent, but I would like to use a solid color when the windows actually "touch" waybar.
Is this something we can do and I missed it, or is it something we could add support for in waybar?
Awesome project otherwise!
The text was updated successfully, but these errors were encountered: