aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status/music_update_bar
diff options
context:
space:
mode:
Diffstat (limited to 'Scripts/.local/scripts/status/music_update_bar')
-rwxr-xr-xScripts/.local/scripts/status/music_update_bar9
1 files changed, 5 insertions, 4 deletions
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