suspend: block if Dino is in a call
this is technically overbroad, in that it blocks whenever Dino is outputting audio, but in practice that's precise enough & Dino doesn't expose any API to detect calls specifically. Signed-off-by: Maarten van Gompel <proycon@anaproy.nl>
This commit is contained in:
@@ -47,6 +47,10 @@ in_call() {
|
||||
pgrep -f sxmo_modemcall.sh
|
||||
}
|
||||
|
||||
in_call_dino() {
|
||||
command -v pw-link && [ -n "$(pw-link -o Dino)" ]
|
||||
}
|
||||
|
||||
hotspot_active() {
|
||||
nmcli -t c show --active | grep -q ^Hotspot
|
||||
}
|
||||
@@ -82,6 +86,7 @@ while [ "$waited" != "0" ]; do
|
||||
waited=0
|
||||
wait_item suspend_disabled
|
||||
wait_item in_call
|
||||
wait_item in_call_dino
|
||||
wait_item hotspot_active
|
||||
wait_item ssh_connected
|
||||
wait_item active_mosh
|
||||
|
Reference in New Issue
Block a user