Skip to content

Instantly share code, notes, and snippets.

@bernerdschaefer
Created February 24, 2016 17:10
#!/bin/sh
while true; do
battery=`cat /sys/class/power_supply/BAT0/capacity`
time=`date +"%H:%M"`
xsetroot -name "${battery}% | ${time}"
sleep 30
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment