diff options
author | davidpkj <davidpenkow1@gmail.com> | 2022-08-24 20:30:48 +0200 |
---|---|---|
committer | davidpkj <davidpenkow1@gmail.com> | 2022-08-24 20:30:48 +0200 |
commit | 4f7ccffecdfa36c5e531654b8eec44199935d497 (patch) | |
tree | 971f684f37ece45354ac12e790681a08498a1f7f /scripts/music |
added box scripts
Diffstat (limited to 'scripts/music')
-rwxr-xr-x | scripts/music | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/music b/scripts/music new file mode 100755 index 0000000..54104b0 --- /dev/null +++ b/scripts/music @@ -0,0 +1,12 @@ +#!/bin/bash + +STATE="$(mpc | grep -o playing)" +NAME="$(mpc current | xargs -i basename '{}')" +VOLUME="$(mpc volume | awk '{print $2}')" + +if [[ -n "$STATE" ]]; then + echo "MPD Playing: ${NAME%.*} ($VOLUME)" +else + echo "MPD Paused" +fi + |