]> git.armaanb.net Git - bin.git/blob - dwmsetroot
scoop-cgi: add logbot archive capabilities
[bin.git] / dwmsetroot
1 #!/usr/bin/env sh
2
3 while (true); do
4                 date=$(date "+%A %Y-%m-%d %I:%M:%S %p")
5                 charge=$(cat /sys/class/power_supply/BAT0/capacity)
6                 status=$(cat /sys/class/power_supply/BAT0/status)
7                 volume=$(amixer sget Master | awk -F"[][]" '/dB/ { print $2 ", " $6 }')
8                 xsetroot -name "[${charge}%, ${status}] [${volume}] [${date}]"
9                 sleep 1
10 done