Sie befinden sich hier: Krischer.org » Linux » Mobile Overview » Battery Status Popup

Battery Status Popup

Just a small example for the use of the DBUS tool notify-send. This one depends on DBUS, powersave and of course the oxygen icons, but that can be switched easily.

It’s designed to be called with a keycombo (I have the symbol on my FN-Keys, but nothing happens) and will pop up a nice window with some information from powersave.

/home/<USERNAME>/bin/bat_info

#!/bin/bash
STATE=$(powersave -abc)
echo $STATE
notify-send "Battery Info" "$STATE" --icon=/usr/share/icons/oxygen/48x48/devices/battery.png  --expire-time=3000

Note: The notify-send (and afterwards) part is only ONE line

 
Nach oben
linux/mobile/batterystatus_popup.txt · Zuletzt geändert: 2009/02/19 09:56 von Manuel Krischer
edv-krischer.de Valid CSS Driven by DokuWiki Recent changes RSS feed Valid XHTML 1.0