Openbox:Pipemenus:battery

From Openbox

(Difference between revisions)
Jump to: navigation, search
(New page: 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" ) e...)
 
Line 1: Line 1:
Battery=$(acpi -b | grep "Battery" | sed -nr '/Battery/s/.*(\<[[:digit:]]+%).*/\1/p')
+
<nowiki>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" )
 
Thermal=$(acpi -t | grep "Thermal" | sed -nr "s/.*(\<[[:digit:]]+\.[[:digit:]]) degrees.*/\1°C/p" )
 
echo "<openbox_pipe_menu>"
 
echo "<openbox_pipe_menu>"
Line 6: Line 6:
  
 
echo "</openbox_pipe_menu>"
 
echo "</openbox_pipe_menu>"
 +
</nowiki>

Revision as of 15:55, 20 February 2009

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