]> git.armaanb.net Git - bin.git/blobdiff - status
Status: switch to dunstify and replace old
[bin.git] / status
diff --git a/status b/status
index bfc4ba341897beed83a522a2d1c643afc2cee113..9ca669bed2c4e272a17a21a225ea5181f819833e 100755 (executable)
--- a/status
+++ b/status
@@ -1,18 +1,17 @@
 #!/usr/bin/env bash
-# Sends a notification with battery level and time
+# Sends a notification with the time, battery level, and volume
 
-function time_set() {
-  date +%A", "%b" "%e", "%r
+time_set() {
+  date "+%A %Y-%m-%d, %r"
 }
 
-function power_set() {
-  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"
-  else
-    echo " battery"
-  fi
+power_set() {
+  echo $(acpi | tail -c +12)
 }
 
-notify-send -i "clock" "`echo $(time_set)`" "`echo $(power_set)`"
+volume_set() {
+  echo "$(amixer sget Master | tail -n 1 | cut -d " " -f 7-)"
+}
+
+dunstify -h string:x-canonical-private-synchronous:status \
+ "$(time_set)" "$(power_set)\n$(volume_set)" \