]> git.armaanb.net Git - bin.git/commitdiff
readability improvements
authorArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Wed, 28 Oct 2020 13:56:20 +0000 (09:56 -0400)
committerArmaan Bhojwani <3fb650a9-b47e-4604-a282-1dd91953b2ee@anonaddy.me>
Wed, 28 Oct 2020 13:56:20 +0000 (09:56 -0400)
status

diff --git a/status b/status
index 8c7c08090b08b66e34c7ba985e1ae408f779f6df..98e0614eec4a1ec044b6ddcdebaf74742c32ed48 100755 (executable)
--- a/status
+++ b/status
@@ -1,16 +1,13 @@
 #!/usr/bin/env bash
  
 function time_set() {
-  date +%A" "%B" "%e" | "%1l:%M:%S
+  date +%A", "%b" "%e" | "%r
 }
 
 function power_set() {
-  upower -d | grep percentage | tail -c 4 | head -c 3
+  upower -d | grep percentage | tail -c 5
   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`"
+notify-send -i "clock" "`echo $(time_set)`" "`echo $(power_set) remaining`"