summaryrefslogtreecommitdiff
path: root/mac/.config/sketchybar/plugins/toggle_stats.sh
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 12:42:37 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2025-08-23 12:42:37 +0900
commit07d294425a98ee5d1e22d03e2b24ae2c76e487c0 (patch)
treea6818f0d64438c5fdb88b00a35d944f80c056213 /mac/.config/sketchybar/plugins/toggle_stats.sh
parent6fc28cdb3529ca8ee864cb5c41674cb0a4af72a1 (diff)
updates
Diffstat (limited to 'mac/.config/sketchybar/plugins/toggle_stats.sh')
-rw-r--r--mac/.config/sketchybar/plugins/toggle_stats.sh63
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