diff options
-rwxr-xr-x | bin/i3lock | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -2,9 +2,20 @@ set -euo pipefail +image_fallback=/usr/share/archlinux/wallpaper/archlinux-underground.jpg image_location=$XDG_RUNTIME_DIR/screen-lock.png -/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 -/usr/bin/i3lock -i $image_location -ef +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 |