Openbox:Pipemenus:battery

From Openbox

Revision as of 15:57, 20 February 2009 by Davidbarr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Battery=$(acpi -b | grep "Battery" | sed -nr '/Battery/s/.*(\<[[:digit:]]+%).*/\1/p')
Thermal=$(acpi -t | grep "Thermal" | sed -nr "s/.*(\<[[:digit:]]+\.[[:digit:]]) degrees.*/\1°C/p" )
echo "<openbox_pipe_menu>"
echo "<item label=\"Battery: $Battery\"/>"
echo "<item label=\"Temperature: $Thermal\"/>"

echo "</openbox_pipe_menu>"
Personal tools