Thanks for a beautiful bar! Just installed it now, and I have a question: is it possible to run something like
bindsym $mod+x bar mode toggle
to hide the bar? I have been using this with i3bar, and would love this feature in waybar as well!
You can use killall -SIGUSR1 waybar but I just saw that there's a bug that doesn't completely hide it.
Hmmm.... -SIGUSR1 doesn't even stop waybar on my system, i have to do a killall -9 waybar to get rid of it, and then I reload sway-config to get it back up again
SIGUSR1 is not for kill waybar but to hide it ;)
ah! still a linux rookie ;-) in any case, there is no hiding going on when using -SIGUSR1, the only thing happening is that vim's command line disappears. At least I know now how to get rid of the bar when necessary... a toggle hide mode would still be very much appreciated, though!
@Alexays To add a bit more detail, if it helps (since your description and @kflak's doesn't mention this): when using sway, sending a killall -SIGUSR1 waybar "un-docks" the bars from the tiling layout; they stay visible, but start floating above (overlaying) the rest of the layout, which expands to use the newly available space. Sending USR1 again makes them "dock" as before. I assume the "un-docking" is expected behaviour, it's just the "hiding" part that is missing.
On a separate note, thank you for this wonderful project. I needed a polybar replacement since I moved to Wayland, and this bar is both gorgeous and super customisable, congrats!
Done in ecc5f48dd788ec5edbd94b6ad50b36a4ebf51b3f
You must define the .hidded class in your style file,
In the default style file, I set opacity' to0.2' to keep an eye on it but you can hide it completely :)
Cool! Will take a bit more detailed look at this when I have a bit more time. Just a quick question, though: how would you set this up in swayconfig so that fx. ctrl-x would toggle visible/invisible?
@kflak bindsym $mod+x killall -SIGUSR1 waybar ;)
bindsym $mod+x exec killall -SIGUSR1 waybar to be a bit more precise ;-)
The toggle works fine with SIGUSR1. However, the change of opacity seems not to take, seems like it is stuck on 0.2... And the text as well as all the modules (battery, wifi, etc) are all at 1.0 opacity. How do I make them inherit the .hidded attribute?
This is my ~/.config/waybar/style.css:
* {
border: none;
border-radius: 0;
font-family: Roboto, Helvetica, Arial, sans-serif;
font-size: 24px;
min-height: 0;
}
window#waybar {
background: rgba(43, 48, 59, 0.5);
border-bottom: 3px solid rgba(100, 114, 125, 0.5);
color: white;
}
window#waybar.hidded {
opacity: 0.0;
}
#workspaces button {
padding: 0 5px;
background: transparent;
color: white;
border-bottom: 3px solid transparent;
}
#workspaces button.focused {
background: #64727D;
border-bottom: 3px solid white;
}
#mode {
background: #64727D;
border-bottom: 3px solid white;
}
#clock, #battery, #cpu, #memory, #network, #pulseaudio, #custom-spotify, #tray, #mode {
padding: 0 10px;
margin: 0 5px;
}
#clock {
background-color: #64727D;
}
#battery {
background-color: #ffffff;
color: black;
}
#battery.charging {
color: white;
background-color: #26A65B;
}
@keyframes blink {
to {
background-color: #ffffff;
color: black;
}
}
#battery.warning:not(.charging) {
background: #f53c3c;
color: white;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
#cpu {
background: #2ecc71;
color: #000000;
}
#memory {
background: #9b59b6;
}
#network {
background: #2980b9;
}
#network.disconnected {
background: #f53c3c;
}
#pulseaudio {
background: #f1c40f;
color: black;
}
#pulseaudio.muted {
background: #90b1b1;
color: #2a5c45;
}
#custom-spotify {
background: #66cc99;
color: #2a5c45;
}
#tray {
background-color: #2980b9;
}
Doh, my stupid! Forgot to update waybar. Please forgive my ignorance. I will go into a corner and shame myself a bit.
Why is it desinged with a SIGUSR1 ? is that a comman way to do sth like that?
Is taht documented somewhere? It took me some time to figure it out. Is sway sending some event when mod is pressed so hat the bar could appear when u hold mod.
Most helpful comment
Done in ecc5f48dd788ec5edbd94b6ad50b36a4ebf51b3f
You must define the
.hiddedclass in your style file,In the default style file, I set
opacity' to0.2' to keep an eye on it but you can hide it completely :)