aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status/music_update_bar
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2021-03-10 16:23:23 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2021-03-10 16:23:23 +0000
commit8b6a9807f954bc373df5c11fdbdfe1792cacb5f4 (patch)
tree5f3f6a29ffa6d875f38772f0bf09356b1989f8b0 /Scripts/.local/scripts/status/music_update_bar
parent68498dd7c5fb29b940005ddf6259ab34ec6e4b9f (diff)
downloaddotfiles-8b6a9807f954bc373df5c11fdbdfe1792cacb5f4.tar.gz
dotfiles-8b6a9807f954bc373df5c11fdbdfe1792cacb5f4.tar.bz2
dotfiles-8b6a9807f954bc373df5c11fdbdfe1792cacb5f4.zip
(Scripts)~change music scripts to use playerctl instead
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