From ed5e40654fc6347b17fc929bca443c9f41b4ae57 Mon Sep 17 00:00:00 2001 From: Sean Pringle Date: Tue, 7 May 2013 11:02:15 +1000 Subject: [PATCH] laptop status bar --- status | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 status diff --git a/status b/status new file mode 100755 index 0000000..6394800 --- /dev/null +++ b/status @@ -0,0 +1,10 @@ +#!/bin/bash +# xoat displays root window name in spot1 bar + +datetime=$(date '+%a %b %d %R') +temp=$(cat /sys/class/thermal/thermal_zone0/temp | cut -b1-2) +cpu=$(top -b -d 0.1 -n2 | grep '%Cpu' | tail -n1 | awk '{ printf "%02d", 100-$8}') +battery=$(acpi | awk -F"[ %]" '{print $4}') +volume=$(amixer get Master | tail -n 1 | awk -F"[][%]" '{print $2}') + +xsetroot -name "${datetime} Bat ${battery}% CPU ${cpu}% Temp ${temp}C Vol ${volume}%"