Created
October 28, 2017 20:33
-
-
Save ggreer/64d3914f4c8373ddeb95b985e4a7c74c 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/" | |
SWAYSOCK=$(find "$XDG_RUNTIME_DIR" -iname "sway*sock") | |
export SWAYSOCK | |
fi | |
LOCK_IMG=/home/$USER/lockscreen.png | |
swaygrab "$LOCK_IMG" && \ | |
#convert -blur 0x10 "$LOCK_IMG" "$LOCK_IMG" && \ | |
convert -scale 10% -scale 1000% "$LOCK_IMG" "$LOCK_IMG" && \ | |
# convert -scale 5% -scale 2000% "$LOCK_IMG" "$LOCK_IMG" && \ | |
swaylock -u -i "$LOCK_IMG" --font ProggyTinyTTSZ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment