Created
June 5, 2016 18:38
-
-
Save embik/eef65b532c88c101af3c8b058084e5bc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# handle being called from systemd service | |
if [ -z "$XDG_RUNTIME_DIR" ] && [ -z "$SWAYSOCK"]; then | |
uid=$(id -u $USER) | |
export XDG_RUNTIME_DIR="/run/user/"$uid"/" | |
export SWAYSOCK=$(find $XDG_RUNTIME_DIR -iname sway*sock) | |
fi | |
swaygrab /home/$USER/lockscreen.png | |
convert -blur 0x6 /home/$USER/lockscreen.png /home/$USER/lockscreen.png | |
swaylock -i /home/$USER/lockscreen.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment