summaryrefslogtreecommitdiff
path: root/.wmii-hg/rbar_cpu
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-10-12 14:48:21 -0400
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-10-12 14:48:21 -0400
commit9d689e7d224b5c1ea3ab3018998135979f19c5a9 (patch)
tree3778e974ec6826c253e73642f64d8cb030f135df /.wmii-hg/rbar_cpu
parent0e2d2d798ff057e6efa9b1a7a918c06aa18a1345 (diff)
add .wmii-hg
Diffstat (limited to '.wmii-hg/rbar_cpu')
-rwxr-xr-x.wmii-hg/rbar_cpu12
1 files changed, 12 insertions, 0 deletions
diff --git a/.wmii-hg/rbar_cpu b/.wmii-hg/rbar_cpu
new file mode 100755
index 0000000..5531e60
--- /dev/null
+++ b/.wmii-hg/rbar_cpu
@@ -0,0 +1,12 @@
+#!/bin/bash
+. include.sh
+
+priority=$1
+
+while connected_to_x_server; 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"
+ # 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"
+ sleep 1
+done