aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status/music
diff options
context:
space:
mode:
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