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