Disable spotify stopping on lock
This commit is contained in:
@@ -19,11 +19,11 @@ lock()
|
|||||||
{
|
{
|
||||||
set -x
|
set -x
|
||||||
playing=0
|
playing=0
|
||||||
if dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'|grep -q Playing ; then
|
# if dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get string:'org.mpris.MediaPlayer2.Player' string:'PlaybackStatus'|grep -q Playing ; then
|
||||||
playing=1
|
# playing=1
|
||||||
fi
|
# fi
|
||||||
echo $playing
|
# echo $playing
|
||||||
(( $playing )) && dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
|
# (( $playing )) && dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
|
||||||
if [[ -f "$LOCKSCREEN" ]] ; then
|
if [[ -f "$LOCKSCREEN" ]] ; then
|
||||||
i3lock --nofork --show-failed-attempts --ignore-empty-password \
|
i3lock --nofork --show-failed-attempts --ignore-empty-password \
|
||||||
--image "$LOCKSCREEN"
|
--image "$LOCKSCREEN"
|
||||||
@@ -31,7 +31,7 @@ lock()
|
|||||||
i3lock --nofork --show-failed-attempts --ignore-empty-password \
|
i3lock --nofork --show-failed-attempts --ignore-empty-password \
|
||||||
--color "$_fallback_color"
|
--color "$_fallback_color"
|
||||||
fi
|
fi
|
||||||
(( $playing )) && dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play
|
# (( $playing )) && dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Play
|
||||||
}
|
}
|
||||||
|
|
||||||
screen_off() {
|
screen_off() {
|
||||||
|
|||||||
Reference in New Issue
Block a user