diff options
author | Galen Guyer <galen@galenguyer.com> | 2022-08-16 12:56:28 -0400 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2022-08-16 12:56:28 -0400 |
commit | 69f4428fc03ffa03d47f6525fcb65fa48b5f76aa (patch) | |
tree | c301d8ba3fbc4331a2b815a046526782010f67b8 | |
parent | bb5e378836f21f647a84a16ced85db664edadbde (diff) |
add screen lock script
-rwxr-xr-x | ext/lock.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/ext/lock.sh b/ext/lock.sh new file mode 100755 index 0000000..440c87f --- /dev/null +++ b/ext/lock.sh @@ -0,0 +1,20 @@ +#!/bin/bash +set -eu + +scrot -o /tmp/screenshot.png +convert /tmp/screenshot.png -blur 0x16 -brightness-contrast -5 /tmp/screenshot.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 +#playerctl -a pause > /dev/null +#old_mute="$(amixer get Master | tail -2 | grep '\[on\]')" +#amixer set Master mute > /dev/null + +i3lock -ni /tmp/screenshot.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 |