From c4a0bd43a3d57383f66f21030cbcbca1214c5d56 Mon Sep 17 00:00:00 2001 From: Alexander Goussas Date: Tue, 14 Apr 2026 22:30:37 -0500 Subject: [PATCH] add cpu plugin for sketchybar --- sketchybar/.config/sketchybar/plugins/cpu.sh | 3 +++ sketchybar/.config/sketchybar/sketchybarrc | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 sketchybar/.config/sketchybar/plugins/cpu.sh diff --git a/sketchybar/.config/sketchybar/plugins/cpu.sh b/sketchybar/.config/sketchybar/plugins/cpu.sh new file mode 100755 index 0000000..3e34ecd --- /dev/null +++ b/sketchybar/.config/sketchybar/plugins/cpu.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +sketchybar --set "$NAME" label="$(top -l 2 | grep -E '^CPU' | tail -1 | awk '{ print $3 + $5"%" }')" diff --git a/sketchybar/.config/sketchybar/sketchybarrc b/sketchybar/.config/sketchybar/sketchybarrc index 96738d7..61b7d20 100755 --- a/sketchybar/.config/sketchybar/sketchybarrc +++ b/sketchybar/.config/sketchybar/sketchybarrc @@ -59,6 +59,8 @@ sketchybar --add item clock right \ --subscribe volume volume_change \ --add item battery right \ --set battery update_freq=120 script="$PLUGIN_DIR/battery.sh" \ - --subscribe battery system_woke power_source_change + --subscribe battery system_woke power_source_change \ + --add item cpu right \ + --set cpu update_freq=10 icon='' script="$PLUGIN_DIR/cpu.sh" sketchybar --update -- 2.43.0