#!/bin/bash set -eu scrot --quality=10 -o /tmp/.lockscreen.png convert /tmp/.lockscreen.png \ -define png:compression-filter=5 \ -define png:compression-level=1 \ -brightness-contrast -5 \ -blur 0x24 \ /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 #playerctl -a pause > /dev/null #old_mute="$(amixer get Master | tail -2 | grep '\[on\]')" #amixer set Master mute > /dev/null 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