dotfiles/bin/lock

13 lines
387 B
Text
Raw Normal View History

2017-09-30 16:02:46 +02:00
#!/bin/sh
set -euo pipefail
IFS=$'\n\t'
LOCK_BG_FILE="/tmp/lock_screen.png"
2019-10-03 22:06:18 +02:00
rm -f "$LOCK_BG_FILE"
2017-09-30 16:02:46 +02:00
scrot "$LOCK_BG_FILE"
mogrify -filter Gaussian -resize 50% -define filter:sigma=2.5 -resize 200% "$LOCK_BG_FILE"
mogrify -font Liberation-Sans -fill white -undercolor '#00000080' -pointsize 30 -gravity South -annotate +0+200 "Screen locked" "$LOCK_BG_FILE"
i3lock -e -i "$LOCK_BG_FILE"