summaryrefslogtreecommitdiff
path: root/dwm/dwmbar
blob: 0960930838eae0ff1d46ebb130bb5bfd55816bb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/bash
vol(){
    vol=$(pulsemixer --get-volume | awk '{print $1}')
	printf "%s" "vol ^c#c6c8d1^$vol%^d^"
}

bat() {
	power=$(cat /sys/class/power_supply/BAT0/capacity)
	printf "%s" "bat ^c#c6c8d1^$power%^d^"
}

dte() {
    dte=$(date +"%A, %B %d")
    printf "%s" "date ^c#c6c8d1^$dte^d^"
}

tie() {
    tme=$(date +"%I:%M %p")
    printf "%s" "time ^c#c6c8d1^$tme^d^"
}
while true; do
    xsetroot -name "$(vol) $(bat) $(tie) $(dte)"
    sleep 3
done