Skip to content

Instantly share code, notes, and snippets.

@henriquegogo
Last active August 29, 2015 14:14
Show Gist options
  • Save henriquegogo/5c0f663d658a31a2c55b to your computer and use it in GitHub Desktop.
Save henriquegogo/5c0f663d658a31a2c55b to your computer and use it in GitHub Desktop.
dwm statusbar
#!/usr/bin/env sh
xsetroot -solid black
while true
do
dropbox="Dropbox: $(dropbox status | head -1) |"
ip="$(ifconfig eth0 | grep 'inet addr' | cut -d: -f2 | cut -d' ' -f1) |"
volume="Volume: $(amixer get Master | tail -1 | sed 's/.*\[\([0-9]*%\)\].*/\1/') |"
battery="Battery: $(acpi -b | awk '{ print $4 $5 }' | sed 's/,/ \/ /g') |"
datetime=$(date)
xsetroot -name "$dropbox $ip $battery $volume $datetime"
sleep 1s
done &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment