diff options
Diffstat (limited to '.config/wmii-hg/rbar_cpu')
-rwxr-xr-x | .config/wmii-hg/rbar_cpu | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/.config/wmii-hg/rbar_cpu b/.config/wmii-hg/rbar_cpu index 5531e60..7f891da 100755 --- a/.config/wmii-hg/rbar_cpu +++ b/.config/wmii-hg/rbar_cpu @@ -1,12 +1,13 @@ #!/bin/bash -. include.sh +. "$HOME/.wmii/include.sh" priority=$1 -while connected_to_x_server; do +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;') >> "$WMII_DIR/rbar/${priority}_cpu" + #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 'label CPU: [ '$(tail -n3 ~/tmp/cputime|sed -ur 's/\s\s+/\t/g'|cut -f2,11|sed 's/\t\(.*\)/(\1)/')' ]' >> "$WMII_DIR/rbar/${priority}_cpu" + 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 |