feat: stop/resume mpd playing inbetween locking
This commit is contained in:
parent
b4fbe47f23
commit
7afa985b07
10
bin/lock.sh
Executable file
10
bin/lock.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if mpc status | grep -F '[playing]'; then
|
||||||
|
mpc pause
|
||||||
|
RESTORE=1
|
||||||
|
fi
|
||||||
|
slock
|
||||||
|
if [ "$RESTORE" = 1 ]; then
|
||||||
|
mpc play
|
||||||
|
fi
|
|
@ -10,7 +10,7 @@ statusbar
|
||||||
xset s off
|
xset s off
|
||||||
xset dpms 300 300 300
|
xset dpms 300 300 300
|
||||||
killall xss-lock
|
killall xss-lock
|
||||||
xss-lock "$(command -v slock)" &
|
xss-lock "$(command -v lock.sh)" &
|
||||||
|
|
||||||
launchapp () {
|
launchapp () {
|
||||||
! command -v "$1" >/dev/null && return # command doesn't exist
|
! command -v "$1" >/dev/null && return # command doesn't exist
|
||||||
|
|
|
@ -60,6 +60,10 @@ case "$PM" in
|
||||||
bluez bluez-utils blueman
|
bluez bluez-utils blueman
|
||||||
sudo systemctl enable bluetooth
|
sudo systemctl enable bluetooth
|
||||||
sudo systemctl start bluetooth
|
sudo systemctl start bluetooth
|
||||||
|
# bluetoothctl devices
|
||||||
|
# bluetoothctl pair <ADDR>
|
||||||
|
# bluetoothctl trust <ADDR>
|
||||||
|
# bluetoothctl connect <ADDR>
|
||||||
fi
|
fi
|
||||||
if is_laptop; then
|
if is_laptop; then
|
||||||
sudo pacman -S --noconfirm --needed \
|
sudo pacman -S --noconfirm --needed \
|
||||||
|
|
Loading…
Reference in New Issue
Block a user