diff options
Diffstat (limited to 'dotfiles/hyprland/.local/bin/waybar-disk')
| -rwxr-xr-x | dotfiles/hyprland/.local/bin/waybar-disk | 7 |
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" |
