From 45b80e8e67a2ea724d6f7317428cccf7ea9db395 Mon Sep 17 00:00:00 2001 From: dx Date: Sat, 6 Jun 2020 19:31:36 +0100 Subject: ~set_bar -> scripts/status/* Decomposed the set_bar monolith script into seperate 'block' scripts --- Scripts/.local/scripts/status/music | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 Scripts/.local/scripts/status/music (limited to 'Scripts/.local/scripts/status/music') 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 -- cgit v1.2.3-13-gbd6f