aboutsummaryrefslogtreecommitdiffstats
path: root/bin/i3lock
blob: 375e8387cc17518e09d22d401192ce53a4c00354 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash

set -euo pipefail

image_fallback=/usr/share/archlinux/wallpaper/archlinux-underground.jpg
image_location=$XDG_RUNTIME_DIR/screen-lock.png

function create_background()
{
  /usr/bin/xset b off
  /usr/bin/scrot -q 100 $image_location
  /usr/bin/convert -quality 1 -implode 1 -motion-blur 16x10 $image_location $image_location
}

function lock_screen()
{
  /usr/bin/i3lock -i $image_location -ef
}

create_background
lock_screen