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 name = Scott Wallace
email = scott@wallace.sh email = scott@wallace.sh
signingkey = AA742FDC5AFE2A72 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] [push]
default = simple default = simple
[pack] [pack]

View file

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