From 7b5d6d5f2e9be95cd1acdc5eb07f4487da8a1f64 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 27 Jan 2013 14:43:14 -0500 Subject: mv .wmii .config/wmii; ln -s .config/wmii .wmii --- .config/wmii/rbar_cpu | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 .config/wmii/rbar_cpu (limited to '.config/wmii/rbar_cpu') diff --git a/.config/wmii/rbar_cpu b/.config/wmii/rbar_cpu new file mode 100755 index 0000000..22da985 --- /dev/null +++ b/.config/wmii/rbar_cpu @@ -0,0 +1,12 @@ +#!/bin/bash +. "$HOME/.wmii/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 '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 -- cgit v1.2.3-54-g00ecf