]> git.armaanb.net Git - bin.git/blobdiff - status
*-set: Switch to using dunstify and progress bars
[bin.git] / status
diff --git a/status b/status
index 98e0614eec4a1ec044b6ddcdebaf74742c32ed48..9ebab1c27a3b8a0a996526649bcdf68067462fa1 100755 (executable)
--- a/status
+++ b/status
@@ -1,13 +1,16 @@
 #!/usr/bin/env bash
-function time_set() {
-  date +%A", "%b" "%e" | "%r
+# Sends a notification with the time, battery level, and volume
+
+time_set() {
+  date "+%A %Y-%m-%d, %r"
+}
+
+power_set() {
+  echo $(acpi | tail -c +12)
 }
 
-function power_set() {
-  upower -d | grep percentage | tail -c 5
-  echo " battery,"
-  upower --dump | grep "time to empty" | tail -c 15
+volume_set() {
+  echo "$(amixer sget Master | tail -n 1 | cut -d " " -f 7-)"
 }
 
-notify-send -i "clock" "`echo $(time_set)`" "`echo $(power_set) remaining`"
+notify-send "$(time_set)" "$(power_set)\n$(volume_set)"