#!/usr/bin/env bash
+# Sends a notification with battery level and time
function time_set() {
date +%A", "%b" "%e", "%r
upower -d | grep percentage | tail -c 5
if [[ $(upower -d | grep "discharging") ]]; then
echo " battery,"
- echo $(upower -d | grep "time to empty" | tail -c 15) remaining
+ echo "$(upower -d | grep "time to empty" | tail -c 15) remaining"
else
- echo " battery"
+ echo " battery,"
+ echo "$(upower -d | grep "time to full" | tail -c 15) until charged"
fi
}