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/plugins/toggle_stats.sh | |
| parent | 6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff) | |
updates
Diffstat (limited to 'mac/.config/sketchybar/plugins/toggle_stats.sh')
| -rw-r--r-- | mac/.config/sketchybar/plugins/toggle_stats.sh | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/mac/.config/sketchybar/plugins/toggle_stats.sh b/mac/.config/sketchybar/plugins/toggle_stats.sh deleted file mode 100644 index b364c18..0000000 --- a/mac/.config/sketchybar/plugins/toggle_stats.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -stats=( - cpu.top - cpu.percent - cpu.sys - cpu.user - memory - disk - network.up - network.down -) - -hide_stats() { - args=() - for item in "${stats[@]}"; do - args+=(--set "$item" drawing=off) - done - - sketchybar "${args[@]}" \ - --set separator_right \ - icon= \ - icon.font.size=25 \ - padding_right=10 -} - -show_stats() { - args=() - for item in "${stats[@]}"; do - args+=(--set "$item" drawing=on) - done - - sketchybar "${args[@]}" \ - --set separator_right \ - icon= \ - icon.font.size=25 \ - padding_right=10 -} - -toggle_stats() { - state=$(sketchybar --query separator_right | jq -r .icon.value) - - case $state in - "") - show_stats - ;; - "") - hide_stats - ;; - esac -} - -case "$SENDER" in -"hide_stats") - hide_stats - ;; -"show_stats") - show_stats - ;; -"toggle_stats") - toggle_stats - ;; -esac |
