diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-27 15:29:34 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2014-03-27 15:29:34 -0400 |
commit | a7a1d39731eff9716a500579d94904ec92608a6f (patch) | |
tree | 379bf3afc1012606a6c240e3c8cd000bde4458d2 /.config/wmii-hg/rbar_cpu | |
parent | 674efbf431f2c1c879c9bfed05f7ed6adce22351 (diff) |
mv .config/wmii .config/wmii-hg
Diffstat (limited to '.config/wmii-hg/rbar_cpu')
-rwxr-xr-x | .config/wmii-hg/rbar_cpu | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/wmii-hg/rbar_cpu b/.config/wmii-hg/rbar_cpu new file mode 100755 index 0000000..7f891da --- /dev/null +++ b/.config/wmii-hg/rbar_cpu @@ -0,0 +1,13 @@ +#!/bin/bash +. "$HOME/.wmii/include.sh" + +priority=$1 + +set -e +while true; do + # This doesn't work for me, it shows capacity + #echo -n 'Core MHz:' $(cat /proc/cpuinfo | grep 'cpu MHz' | sed 's/.*: //g; s/\..*//g;') |a "$WMII_DIR/rbar/${priority}_cpu" + # This actually displays %idle + echo 'CPU: [ '$(tail -n3 ~/tmp/cputime|sed -ur 's/\s\s+/\t/g'|cut -f2,11|sed 's/\t\(.*\)/(\1)/')' ]' |a "$WMII_DIR/rbar/${priority}_cpu" + sleep 1 +done |