Created
October 1, 2013 12:11
-
-
Save shapeshed/6777514 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xset +fp /usr/share/fonts/local | |
xset fp rehash | |
public_ip(){ | |
echo `wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'` | |
} | |
NETWORKICON=`echo -e '\uE0AF'` | |
BATTERYICON=`echo -e '\uE037'` | |
CLOCKICON=`echo -e '\uE015'` | |
PACMANICON=`echo -e '\uE00F'` | |
while true; do | |
UPDATES="$(pacman -Qqu | wc -l)" | |
batt=$(LC_ALL=C acpi -b) | |
case $batt in | |
*Discharging*) | |
batt="${batt#* * * }" | |
batt="${batt%%, *} " | |
;; | |
*) | |
batt="" | |
;; | |
esac | |
xsetroot -name "$NETWORKICON $(public_ip) $PACMANICON $UPDATES $BATTERYICON $batt $(date +"%F %R")" | |
sleep 60 | |
done & | |
exec dwm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment