diff options
Diffstat (limited to 'Scripts/.local')
-rwxr-xr-x | Scripts/.local/scripts/status/music | 11 | ||||
-rwxr-xr-x | Scripts/.local/scripts/status/music_update_bar | 9 |
2 files changed, 7 insertions, 13 deletions
diff --git a/Scripts/.local/scripts/status/music b/Scripts/.local/scripts/status/music index 8231c04..b7233d9 100755 --- a/Scripts/.local/scripts/status/music +++ b/Scripts/.local/scripts/status/music @@ -1,10 +1,3 @@ #!/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="$name" -fi -echo $name + +echo "$(playerctl --player=spotify metadata title)" diff --git a/Scripts/.local/scripts/status/music_update_bar b/Scripts/.local/scripts/status/music_update_bar index 7691f36..2bf6c54 100755 --- a/Scripts/.local/scripts/status/music_update_bar +++ b/Scripts/.local/scripts/status/music_update_bar @@ -2,11 +2,12 @@ while : do - while [[ $item != "player" && $item != "playlist" ]] + prev="$(playerctl --player=spotify metadata title)" + while [[ $item == $prev ]] do - sleep 0.01; - item=$(mpc idle | head -1); + sleep 1; + item="$(playerctl --player=spotify metadata title)"; done - kill -45 $(pidof dwmblocks); + kill -48 $(pidof dwmblocks); item=""; done |