]> git.armaanb.net Git - bin.git/blob - status
add taskwarrior to ufetch
[bin.git] / status
1 #!/usr/bin/env bash
2 # Sends a notification with battery level and time
3
4 function time_set() {
5   date +%A", "%b" "%e", "%r
6 }
7
8 function power_set() {
9   upower -d | grep percentage | tail -c 5
10   if [[ $(upower -d | grep "discharging") ]]; then
11     echo " battery,"
12     echo "$(upower -d | grep "time to empty" | tail -c 15) remaining"
13   else
14     echo " battery"
15   fi
16 }
17
18 notify-send -i "clock" "`echo $(time_set)`" "`echo $(power_set)`"