i3lock now stops/starts tidal instead of spotify

This commit is contained in:
2019-11-11 10:20:20 +01:00
parent 9714b2fa1d
commit fbe3848039
5 changed files with 37 additions and 22 deletions

View File

@@ -4,14 +4,14 @@ icon="$HOME/.config/i3/icons/lock.png"
tmpbg='/tmp/screen.png'
# detect whether spotify is running
isPlaying=$(~/.config/i3/scripts/spotify-cli.sh status);
isPlaying=$(~/.config/i3/scripts/tidal-cli.sh status);
scrot "$tmpbg"
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
# Stop music if playing
~/.config/i3/scripts/spotify-cli.sh pause
~/.config/i3/scripts/tidal-cli.sh pause
# check whether the lockscreen is being activated because of a suspend
if [[ $* == *--suspend ]]; then
@@ -22,8 +22,8 @@ else
i3lock -n -f -i "$tmpbg";
# if spotify was playing before we locked, resume.
if [ $isPlaying == "Playing" ]; then
~/.config/i3/scripts/spotify-cli.sh play
if [ $isPlaying == "playing" ]; then
~/.config/i3/scripts/tidal-cli.sh play
fi;
fi
fi