[sway/window] cannot style the application icon and module text together
Styling the sway/window module is a bit cumbersome because it doesn't have a CSS selector for the whole module. The part of that module has a selector is the text (label#window), which leaves out a way to style the icon part.
Below is the CSS hierarchy from waybar -l debug
window#waybar.background.top.eDP-1..mode-default:dir(ltr)
decoration:dir(ltr)
box.horizontal:dir(ltr)
box.horizontal.modules-left:dir(ltr)
widget:dir(ltr)
box#workspaces.horizontal:dir(ltr)
widget:dir(ltr)
box.horizontal:dir(ltr)
image:dir(ltr)
label#window:dir(ltr)
Versions:
- Waybar: v0.9.24
- Sway: 1.8.1
- Distro: Arch Linux
I just ran into the same issue, which looks really bad with the way i want to have my setup to work.
There's been a recent change to AIconLabel.cpp in #2973 (via Commit 16aced7f9ffcac1200473192712575afaa4e6513). The PR was for hyprland/window, but sway/window uses the same class for displaying icon and label.
The hierarchy now reads:
box.horizontal.modules-center:dir(ltr)
widget:dir(ltr)
box#window.horizontal.module:dir(ltr)
image:dir(ltr)
label:dir(ltr)
So I assume this issue has been addressed in the meantime.