aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status/music
diff options
context:
space:
mode:
authordx <aryadevchavali1@gmail.com>2020-06-06 19:31:36 +0100
committerdx <aryadevchavali1@gmail.com>2020-06-06 19:31:36 +0100
commit45b80e8e67a2ea724d6f7317428cccf7ea9db395 (patch)
tree0b599e9ccff39ed8a276673787607c7a7c4b7df3 /Scripts/.local/scripts/status/music
parent852d280157a749a88e7e3826eda81b1ae080bf1d (diff)
downloaddotfiles-45b80e8e67a2ea724d6f7317428cccf7ea9db395.tar.gz
dotfiles-45b80e8e67a2ea724d6f7317428cccf7ea9db395.tar.bz2
dotfiles-45b80e8e67a2ea724d6f7317428cccf7ea9db395.zip
~set_bar -> scripts/status/*
Decomposed the set_bar monolith script into seperate 'block' scripts
Diffstat (limited to 'Scripts/.local/scripts/status/music')
-rwxr-xr-xScripts/.local/scripts/status/music10
1 files changed, 10 insertions, 0 deletions
diff --git a/Scripts/.local/scripts/status/music b/Scripts/.local/scripts/status/music
new file mode 100755
index 0000000..262dc81
--- /dev/null
+++ b/Scripts/.local/scripts/status/music
@@ -0,0 +1,10 @@
+#!/usr/bin/env bash
+name="$(mpc -f '%title%' | head -1)"
+offline="$(echo $name | grep -E 'volume:|MPD')"
+if [[ $offline ]]
+then
+ name="MPD off"
+else
+ name="Playing: $name"
+fi
+echo $name