summaryrefslogtreecommitdiff
path: root/ext/lock.sh
blob: 440c87f114aba695f2136dac78c7d1877787dfd2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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