Waybar
Waybar copied to clipboard
Sway workspace, add class for focused output and focused workspace on all output
It would be nice to be able to style the focused workspace on the non focused output.
For example, I have 3 output/displays. On the right one, I have workspace 4 and 5. When I have my mouse on the right display and workspace 5 is visible, the .focused class is applied to workspace 5's button. But if I move my mouse to my center display, no workspace have the .focused class, and I do not know which workspace on my right display is currently displayed.
The ideal solution would be to add the state (focused) to the waybar and have a displayed (or visible) state.
To summarize:
- Add
#waybar.focused(or similar) for the focused output waybar styling (allowing to gray out non focused display/output). - Add
button.displayedwhen the workspace of the button is displayed.
We could remove button.focused because #waybar.focused button.displayed would replaced it, but maybe keep it for backward compatibility? (and it would be #waybar.focused button.displayed.focused)
I like it.
You can use .visible
Thank you @JohnTheCoolingFan, this is exactly what I was looking for.
I used it in conjunction with .focused to achieve what I wanted, here my config:
#workspaces button.visible {
border-top: 2px solid gray;
}
#workspaces button.focused {
color: white;
background: transparent;
border-top: 2px solid white;
}
Is there a way to hide or style the unfocused bar? I'm using river. There is a hide option.
Something like this:
window#waybar.notfocused #window {
background:none;
}