diff options
-rwxr-xr-x | ext/lock.sh | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/ext/lock.sh b/ext/lock.sh index d3ca4c4..d8677f2 100755 --- a/ext/lock.sh +++ b/ext/lock.sh @@ -11,17 +11,18 @@ convert /tmp/.lockscreen.png \ convert -composite -gravity center /tmp/.lockscreen.png "$HOME/.dots/ext/lock-overlay.png" /tmp/.lockscreen.png -# Turn on DND -#old_dnd="$(xfconf-query -c xfce4-notifyd -p /do-not-disturb)" -#xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true - # Pause stuff and mute audio +_muted="$(pacmd list-sinks | awk '/muted/ { print $2 }')" +[[ "$_muted" == "no" ]] && pactl set-sink-mute @DEFAULT_SINK@ 1 #playerctl -a pause > /dev/null -#old_mute="$(amixer get Master | tail -2 | grep '\[on\]')" #amixer set Master mute > /dev/null +# Turn on DND +#old_dnd="$(xfconf-query -c xfce4-notifyd -p /do-not-disturb)" +#xfconf-query -c xfce4-notifyd -p /do-not-disturb -s true + i3lock --nofork --ignore-empty-password --show-failed-attempts --image /tmp/.lockscreen.png & # Set settings back to what they were before -#test -z "$old_mute" || amixer set Master unmute > /dev/null #test "$old_dnd" = false && xfconf-query -c xfce4-notifyd -p /do-not-disturb -s false +[[ "$_muted" == "no" ]] && pactl set-sink-mute @DEFAULT_SINK@ 0 |