Skip to content

Instantly share code, notes, and snippets.

@bernerdschaefer
Created February 24, 2016 17:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bernerdschaefer/857f914eb81ed39e444a to your computer and use it in GitHub Desktop.
Save bernerdschaefer/857f914eb81ed39e444a to your computer and use it in GitHub Desktop.
#!/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