diff options
author | Philip Wittamore <philip@wittamore.com> | 2025-06-06 23:42:59 +0200 |
---|---|---|
committer | Philip Wittamore <philip@wittamore.com> | 2025-06-06 23:42:59 +0200 |
commit | c00b14c75468f7c91cb0e89de20d8433fba7c917 (patch) | |
tree | e2117c1037dd772734e81c956380f4023687799c /pw-systemstats | |
parent | 669b6b86a128f7559b257e69f07e610e26d0cd23 (diff) | |
download | scripts-c00b14c75468f7c91cb0e89de20d8433fba7c917.tar.gz scripts-c00b14c75468f7c91cb0e89de20d8433fba7c917.tar.bz2 scripts-c00b14c75468f7c91cb0e89de20d8433fba7c917.zip |
update
Diffstat (limited to 'pw-systemstats')
-rwxr-xr-x | pw-systemstats | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/pw-systemstats b/pw-systemstats deleted file mode 100755 index 76cec99..0000000 --- a/pw-systemstats +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env bash -# requires joypixels font in dwm config.def.h - -CPU_TEMP=$(sensors | awk ' - /^Tdie|^Package id|^Core 0|^CPU|^temp1/ { - gsub(/[+°C]/, ""); - for (i=1; i<=NF; i++) { - if ($i ~ /^[0-9]+(\.[0-9]+)?$/) { - gsub(/\..*/, "", $i); - print $i; - exit; - } - } - }') - -# Debug CPU temperature detection, if not found, return N/A -if [ -z "$CPU_TEMP" ]; then - # Try simpler pattern as fallback - CPU_TEMP=$(sensors | grep -E '^(Core 0|Package id 0|CPU)' | awk '{print $3}' | tr -d '+°C' | head -n1) -fi - -[ -z "$CPU_TEMP" ] && CPU_TEMP="N/A" - - -# Try different fan sensors -FAN_SPEED=$(sensors | awk '/^fan|^cpu_fan/ {print $2}') -[ -z "$FAN_SPEED" ] && FAN_SPEED="N/A" - - -# Send to bar -echo " 🌀 $FAN_SPEED ┊ 🌡️ $CPU_TEMP" - -# Clicking on bar -case $BLOCK_BUTTON in - 1) notify-send "$(sensors)";; - 2) notify-send "button 2 clicked";; - 3) notify-send "button 3 clicked";; -esac |