This commit is contained in:
Ray Elliott 2026-10-24 14:00:17 +01:00
commit f9df806b6d
9 changed files with 189 additions and 0 deletions

17
user/audio-resume-monitor.sh Executable file
View file

@ -0,0 +1,17 @@
#!/usr/bin/env bash
set -uo pipefail
readonly RECOVERY_SCRIPT="/home/ray/.config/systemd/user/audio-resume-recover.sh"
gdbus monitor --system \
--dest org.freedesktop.login1 \
--object-path /org/freedesktop/login1 |
while IFS= read -r line; do
case "${line}" in
*"PrepareForSleep"*"false"*)
printf 'audio-resume-monitor: resume detected\n'
"${RECOVERY_SCRIPT}"
;;
esac
done