sxmo: fix MPRIS detection so that any active player will block suspend

This commit is contained in:
Colin 2023-06-24 23:54:39 +00:00
parent be21ac57f8
commit a5af1e0893
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/configs/default_hooks/sxmo_hook_block_suspend.sh b/configs/default_hooks/sxmo_hook_block_suspend.sh
index f394575..873b7b2 100755
--- a/configs/default_hooks/sxmo_hook_block_suspend.sh
+++ b/configs/default_hooks/sxmo_hook_block_suspend.sh
@@ -68,7 +68,7 @@ playing_mpc() {
}
playing_mpris() {
- command -v playerctl && [ "$(playerctl status)" = "Playing" ]
+ command -v playerctl && playerctl --all-players status | grep -q "Playing"
}
photos_processing() {

View File

@ -83,6 +83,7 @@ stdenv.mkDerivation rec {
./0004-no-busybox.patch
# wanted to fix/silence some non-fatal errors
./0005-system-audio.patch
./0006-block-suspend-any-mpris.patch
# personal (but upstreamable) preferences:
./0104-full-auto-rotate.patch