C++ for polybars spotify playbutton control instead of python, just to play around C++ a little bit.

This commit is contained in:
Tuan-Dat Tran
2018-03-27 02:04:19 +02:00
parent 0fadd81c68
commit 0212d21755
9 changed files with 126 additions and 4 deletions

View File

@@ -113,16 +113,16 @@ click-left = bash -c "playerctl next"
[module/spotify-play]
type = custom/script
exec-if = pgrep -x spotify
exec = python -u /home/tuan/.scripts/spotify-play.py
exec = ~/.scripts/spotify-play.out
tail = true
click-left = bash -c "if [ `cat /home/tuan/.scripts/playstate` = 0 ]; then echo '1'>/home/tuan/.scripts/playstate;else echo '0'>/home/tuan/.scripts/playstate;fi"
click-left = bash -c "if [ `cat /home/$USER/.scripts/playstate` = 0 ]; then echo '1'>/home/$USER/.scripts/playstate;else echo '0'>/home/$USER/.scripts/playstate;fi"
[module/spotify-stop]
type = custom/script
exec-if = pgrep -x spotify
exec = echo ""
tail = true
click-left = bash -c "playerctl stop && echo '0'>/home/tuan/.scripts/playstate"
click-left = bash -c "playerctl stop && echo '0'>/home/$USER/.scripts/playstate"
[module/i3]
type = internal/i3