aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/hyprland/.config/waybar/style.css
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-21 17:48:47 -0400
committerCraig Jennings <c@cjennings.net>2026-05-21 17:48:47 -0400
commite2d3ca987b83a63aa39f7288c3fb7116c3fb0a00 (patch)
tree61e66e49855bcefdb62b00068323f240bf037a5a /dotfiles/hyprland/.config/waybar/style.css
parent9208de9645ad8a5aae16ee0a3e90b4f0dd949e1d (diff)
downloadarchsetup-e2d3ca987b83a63aa39f7288c3fb7116c3fb0a00.tar.gz
archsetup-e2d3ca987b83a63aa39f7288c3fb7116c3fb0a00.zip
feat(hyprland): add airplane-mode waybar toggle
I added a laptop-only waybar button that drops the machine into a low-power state and restores it on a second click. Engaging turns wifi off, sets the CPU energy-performance preference to power, dims the backlight to 35%, and stops network-only services (tailscale, proton-vpn, avahi, cups, wsdd, geoclue, sshd, fail2ban, syncthing). Bluetooth is left alone so earbuds keep working. Disengaging replays the state recorded when airplane mode was engaged rather than writing hardcoded defaults. A lever already in its low-power position is left untouched: wifi that was already off stays off, and a service that was already stopped isn't restarted. The indicator hides itself on machines with no battery, so desktops never show the button. State lives in $XDG_RUNTIME_DIR/airplane-state, and the bar refreshes the moment the toggle fires via a realtime signal.
Diffstat (limited to 'dotfiles/hyprland/.config/waybar/style.css')
-rw-r--r--dotfiles/hyprland/.config/waybar/style.css6
1 files changed, 6 insertions, 0 deletions
diff --git a/dotfiles/hyprland/.config/waybar/style.css b/dotfiles/hyprland/.config/waybar/style.css
index 3a849c5..cd158d0 100644
--- a/dotfiles/hyprland/.config/waybar/style.css
+++ b/dotfiles/hyprland/.config/waybar/style.css
@@ -77,6 +77,7 @@ window#waybar {
#custom-worldclock,
#custom-layout,
#custom-touchpad,
+#custom-airplane,
#window {
padding: 0.45rem;
margin: 0.3rem;
@@ -98,6 +99,7 @@ window#waybar {
#pulseaudio:hover,
#sysmonitor:hover,
#custom-touchpad:hover,
+#custom-airplane:hover,
#custom-layout:hover {
background-color: #474544;
border-radius: 1rem;
@@ -112,6 +114,10 @@ window#waybar {
color: #d47c59;
}
+#custom-airplane.active {
+ color: #d7af5f;
+}
+
#temperature.warning {
color: #d7af5f;
}