aboutsummaryrefslogtreecommitdiff
path: root/dotfiles/hyprland/.local
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-01-27 08:51:31 -0600
committerCraig Jennings <c@cjennings.net>2026-01-27 08:51:31 -0600
commit3fb0b8c69312fcf7179c1f7acb01a5ed5e7e50a0 (patch)
treee3e7bc739f737779a43491f30f64b8906ac2c8c9 /dotfiles/hyprland/.local
parenta207a86adc6f46c24e2ebb42b34aa38da8df7833 (diff)
downloadarchsetup-3fb0b8c69312fcf7179c1f7acb01a5ed5e7e50a0.tar.gz
archsetup-3fb0b8c69312fcf7179c1f7acb01a5ed5e7e50a0.zip
feat(waybar): add warning/critical color thresholds for temperature and disk
Temperature turns yellow at 70°C, red at 80°C using built-in waybar states. Disk replaced with custom script that turns yellow at 80% full, red at 90%, working across ZFS/btrfs/ext4. Colors themed per dupre/hudson. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'dotfiles/hyprland/.local')
-rwxr-xr-xdotfiles/hyprland/.local/bin/waybar-disk7
1 files changed, 7 insertions, 0 deletions
diff --git a/dotfiles/hyprland/.local/bin/waybar-disk b/dotfiles/hyprland/.local/bin/waybar-disk
new file mode 100755
index 0000000..6050653
--- /dev/null
+++ b/dotfiles/hyprland/.local/bin/waybar-disk
@@ -0,0 +1,7 @@
+#!/bin/sh
+# Waybar disk usage module with warning/critical states
+PCT=$(df --output=pcent / | tail -1 | tr -d ' %')
+CLASS=""
+[ "$PCT" -ge 80 ] && CLASS="warning"
+[ "$PCT" -ge 90 ] && CLASS="critical"
+printf '{"text": "%s%%", "class": "%s", "tooltip": "Root: %s%% used"}\n' "$PCT" "$CLASS" "$PCT"