From: Alexander Goussas Date: Wed, 15 Apr 2026 03:30:37 +0000 (-0500) Subject: add cpu plugin for sketchybar X-Git-Url: http://git.frustrated-labs.net/?a=commitdiff_plain;h=c4a0bd43a3d57383f66f21030cbcbca1214c5d56;p=dotfiles.git add cpu plugin for sketchybar --- 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