]> git.armaanb.net Git - bin.git/blobdiff - status
Audio-set: Add script. Volume change script for WM
[bin.git] / status
diff --git a/status b/status
index 8c7c08090b08b66e34c7ba985e1ae408f779f6df..46d9b639e3368c0f503a8313109ffd175e09913b 100755 (executable)
--- a/status
+++ b/status
@@ -1,16 +1,16 @@
 #!/usr/bin/env bash
-function time_set() {
-  date +%A" "%B" "%e" | "%1l:%M:%S
+# Sends a notification with the time, battery level, and volume
+
+time_set() {
+  date "+%A %Y-%m-%d, %r"
 }
 
-function power_set() {
-  upower -d | grep percentage | tail -c 4 | head -c 3
-  echo " battery,"
-  upower --dump | grep "time to empty" | tail -c 15
+power_set() {
+  echo $(acpi | tail -c +12)
 }
 
-export TIME=$(time_set)
-export POWER=$(power_set)
+volume_set() {
+  echo "$(amixer sget Master | tail -n 1 | tail -c +21)"
+}
 
-notify-send -i "clock" "`echo $TIME`" "`echo $POWER`"
+notify-send "$(time_set)" "$(power_set)\n$(volume_set)"