dotfiles/scripts/i3lock.sh
2017-09-20 17:23:24 +02:00

11 lines
265 B
Bash

#!/usr/bin/env bash
icon="$HOME/.config/i3/icons/lock.png"
tmpbg='/tmp/screen.png'
(( $# )) && { icon=$1; }
scrot "$tmpbg"
convert "$tmpbg" -scale 10% -scale 1000% "$tmpbg"
convert "$tmpbg" "$icon" -gravity center -composite -matte "$tmpbg"
i3lock -u -i "$tmpbg"