2021-08-31 05:56:09 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
if mpc status | grep -F '[playing]'; then
|
|
|
|
mpc pause
|
2022-05-24 16:26:22 +00:00
|
|
|
RESTORE_MPD=1
|
|
|
|
fi
|
|
|
|
if command -v bluetoothctl >/dev/null; then
|
|
|
|
RESTORE_BLU=$(bluetoothctl show | grep -F "Powered: yes")
|
2021-08-31 05:56:09 +00:00
|
|
|
fi
|
2022-05-19 08:19:17 +00:00
|
|
|
if [ -n "$LOCKER" ]; then
|
|
|
|
$LOCKER
|
|
|
|
else
|
|
|
|
slock
|
|
|
|
fi
|
2022-05-24 16:26:22 +00:00
|
|
|
if [ "$RESTORE_MPD" = 1 ]; then
|
2021-08-31 05:56:09 +00:00
|
|
|
mpc play
|
|
|
|
fi
|
2022-05-24 16:26:22 +00:00
|
|
|
if [ -n "$RESTORE_BLU" ]; then
|
|
|
|
bluetoothctl power on
|
|
|
|
fi
|