Update playerctl to always use spotify where needed

This commit is contained in:
2021-01-01 14:21:42 +01:00
parent 262b4477d2
commit 806f83e410
2 changed files with 4 additions and 4 deletions

View File

@@ -19,11 +19,11 @@ lock()
{ {
set -x set -x
playing=0 playing=0
if [[ "$(playerctl status)" == "Playing" ]] ; then if [[ "$(playerctl -p spotify status)" == "Playing" ]] ; then
playing=1 playing=1
fi fi
if (( $playing )) ; then if (( $playing )) ; then
playerctl pause playerctl -p spotify pause
fi fi
if [[ -f "$LOCKSCREEN" ]] ; then if [[ -f "$LOCKSCREEN" ]] ; then
@@ -37,7 +37,7 @@ lock()
--color "$_fallback_color" --color "$_fallback_color"
fi fi
if (( $playing )) ; then if (( $playing )) ; then
playerctl play playerctl -p spotify play
fi fi
} }

View File

@@ -16,5 +16,5 @@ previous)
;; ;;
esac esac
playerctl "${cmd}" playerctl -p spotify "${cmd}"
~/.i3/scripts/bar-update spotify ~/.i3/scripts/bar-update spotify