#!/usr/bin/env sh
-notify-send -i "clock" "`date +%A" "%B" "%e" | "%1l:%M:%S `" "`upower -d | grep percentage | tail -c 4 | head -c 3 && echo " battery" && upower --dump | grep "time to empty" | tail -c 11 | head -c 11`"
+
+function time_set() {
+ date +%A" "%B" "%e" | "%1l:%M:%S
+}
+
+function power_set() {
+ upower -d | grep percentage | tail -c 4 | head -c 3
+ echo " battery,"
+ upower --dump | grep "time to empty" | tail -c 15
+}
+
+export TIME=$(time_set)
+export POWER=$(power_set)
+
+notify-send -i "clock" "`echo $TIME`" "`echo $POWER`"