Extensible, evenly spaced waybar styling (#156)

* Add override to only require one network interface online

* refactor: extensible, evenly spaced waybar style.css

- Use @define-color directive to define colour variables for each theme
(@foreground for text, @background for background-color)
- apply the colour variables in the main theme config, making it more
extensible
- make waybar elements more evenly spaced with consistent margin and
padding values
- add migration to apply the above changes to existing users

* Update style.css

better pixel spacing

---------

Co-authored-by: Ryan Hughes <1630358+ryanrhughes@users.noreply.github.com>
Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
Naparajith T L
2025-07-15 09:26:54 +05:30
committed by GitHub
parent 5a48f120ec
commit 46e8fa46ed
11 changed files with 48 additions and 39 deletions

View File

@ -1,4 +1,7 @@
* { * {
background-color: @background;
color: @foreground;
border: none; border: none;
border-radius: 0; border-radius: 0;
min-height: 0; min-height: 0;
@ -6,14 +9,18 @@
font-size: 12px; font-size: 12px;
} }
#workspaces { .modules-left {
margin-left: 7px; margin-left: 8px;
}
.modules-right {
margin-right: 8px;
} }
#workspaces button { #workspaces button {
all: initial; all: initial;
padding: 2px 6px; padding: 0 6px;
margin-right: 3px; margin: 0 1.5px;
} }
#custom-dropbox, #custom-dropbox,
@ -26,7 +33,7 @@
#clock, #clock,
#custom-power-menu { #custom-power-menu {
min-width: 12px; min-width: 12px;
margin-right: 13px; margin: 0 10px;
} }
#custom-expand-icon { #custom-expand-icon {

View File

@ -4,3 +4,13 @@ if ! command -v iwd &>/dev/null; then
yay -S --noconfirm --needed iwd yay -S --noconfirm --needed iwd
sudo systemctl enable --now iwd.service sudo systemctl enable --now iwd.service
fi fi
# Fix systemd-networkd-wait-online timeout for multiple interfaces
# Wait for any interface to be online rather than all interfaces
# https://wiki.archlinux.org/title/Systemd-networkd#Multiple_interfaces_that_are_not_connected_all_the_time
sudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.d
sudo tee /etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf >/dev/null <<EOF
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any
EOF

5
migrations/1752251002.sh Normal file
View File

@ -0,0 +1,5 @@
echo "Migrate to the modular, variable-based implementation of waybar style.css"
if [ -L ~/.config/waybar/style.css ]; then
rm ~/.config/waybar/style.css
cp ~/.local/share/omarchy/config/waybar/style.css ~/.config/waybar/style.css
fi

7
migrations/1752365998.sh Normal file
View File

@ -0,0 +1,7 @@
echo "Add override to only require one network interface to be online"
sudo mkdir -p /etc/systemd/system/systemd-networkd-wait-online.service.d
sudo tee /etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf >/dev/null <<EOF
[Service]
ExecStart=
ExecStart=/usr/lib/systemd/systemd-networkd-wait-online --any
EOF

View File

@ -1,5 +1,2 @@
* { @define-color foreground #cdd6f4;
color: #cdd6f4; @define-color background #181824;
background-color: #181824;
}

View File

@ -1,5 +1,2 @@
* { @define-color foreground #d3c6aa;
color: #d3c6aa; @define-color background #2d353b;
background-color: #2d353b;
}

View File

@ -1,5 +1,2 @@
* { @define-color foreground #d4be98;
color: #d4be98; @define-color background #282828;
background-color: #282828;
}

View File

@ -1,5 +1,2 @@
* { @define-color foreground #dcd7ba;
color: #dcd7ba; @define-color background #1f1f28;
background-color: #1f1f28;
}

View File

@ -1,4 +1,2 @@
* { @define-color foreground #8a8a8d;
color: #8a8a8d; @define-color background #1e1e1e;
background-color: #1e1e1e;
}

View File

@ -1,5 +1,2 @@
* { @define-color foreground #d8dee9;
color: #d8dee9; @define-color background #2e3440;
background-color: #2e3440;
}

View File

@ -1,5 +1,2 @@
* { @define-color foreground #cdd6f4;
color: #cdd6f4; @define-color background #1a1b26;
background-color: #1a1b26;
}