diff options
| author | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
|---|---|---|
| committer | TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> | 2025-08-23 12:42:37 +0900 |
| commit | 07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (patch) | |
| tree | a6818f0d64438c5fdb88b00a35d944f80c056213 /mac/.config/sketchybar.yabai/plugins/disk.sh | |
| parent | 6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff) | |
updates
Diffstat (limited to 'mac/.config/sketchybar.yabai/plugins/disk.sh')
| -rwxr-xr-x | mac/.config/sketchybar.yabai/plugins/disk.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mac/.config/sketchybar.yabai/plugins/disk.sh b/mac/.config/sketchybar.yabai/plugins/disk.sh new file mode 100755 index 0000000..f2adc30 --- /dev/null +++ b/mac/.config/sketchybar.yabai/plugins/disk.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +source "$CONFIG_DIR/globalstyles.sh" + +COUNT="$(df -H | grep -E '^(/dev/disk3s5)' | awk '{ printf ("%s\n", $5) }' | sed 's/%//')" + +COLOR=$RED + +case "$COUNT" in +[7-8][0-9]) # 70-89% + COLOR=$PEACH + ;; +[5-6][0-9]) # 50-69% + COLOR=$YELLOW + ;; +[3-4][0-9]) # 20-49% + COLOR=$GREEN + ;; +[1-2][0-9]) # 10-19% + COLOR=$LAVENDER + ;; +[0-9]) # 0-9% + COLOR=$WHITE + ;; +esac + +sketchybar -m --set "$NAME" \ + label="$COUNT%" \ + icon.color=$COLOR |
