Update mutelock.sh

This commit is contained in:
Scott Wallace 2021-05-27 09:15:43 +01:00
parent a034df8644
commit 224cbdcdd2
Signed by: scott
GPG key ID: AA742FDC5AFE2A72
2 changed files with 18 additions and 12 deletions

View file

@ -2,6 +2,10 @@
name = Scott Wallace
email = scott@wallace.sh
signingkey = AA742FDC5AFE2A72
[includeIf "gitdir:~/src/work/suborbit/**"]
path = ~/src/work/suborbit/.gitconfig
[includeIf "gitdir:~/src/work/suborbit/optimal/**"]
path = ~/src/work/suborbit/optimal/.gitconfig
[push]
default = simple
[pack]

View file

@ -4,10 +4,12 @@
#https://unix.stackexchange.com/users/231160/nik-gnomic
# Post on stackexchange: https://unix.stackexchange.com/questions/467456/how-to-mute-sound-when-xscreensaver-locks-screen/589614#589614
gdbus monitor -e -d org.xfce.ScreenSaver | grep ActiveChanged --line-buffered |
while read line
do
case "$line" in
# Do nothing for a bit to ensure gdbus is up and awake, etc.
sleep 300
gdbus monitor -e -d org.xfce.ScreenSaver | grep -h ActiveChanged --line-buffered |
while read LINE; do
case "${LINE}" in
*"(true,)"*)
pactl set-sink-mute @DEFAULT_SINK@ on
;;