~skiqqy/bin

bin/slock -rwxr-xr-x 684 bytes
c3280652Stephen Cochrane Added sandbox script 3 days ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
# Simple lock, using i3-lock
# Author: Skiqqy

# Import stuff
SCRIPT_PATH=$(dirname $0)
. "$SCRIPT_PATH/import/alert.sh" > /dev/null 2>&1

# Check dependencies
[ ! $(command -v error) ] && echo "[WARNING] Missing 'alert.sh' import"
[ ! $(command -v i3lock) ] && error "Missing command 'i3lock'" || tick "'i3lock' found"
[ ! $(command -v scrot) ] && error "Missing command 'scrot'" || tick "'scrot' found"
[ ! $(command -v convert) ] && error "Missing 'convert', provided by ImageMagick" || tick "'convert' found"

path="$HOME/Pictures"
scrot $path/.slock.png
convert -scale 10% -scale 1000% $path/.slock.png $path/.slock.png
i3lock -i $path/.slock.png
rm $path/.slock.png