Skip to content

Instantly share code, notes, and snippets.

@ggreer
Created October 28, 2017 20:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ggreer/64d3914f4c8373ddeb95b985e4a7c74c to your computer and use it in GitHub Desktop.
Save ggreer/64d3914f4c8373ddeb95b985e4a7c74c to your computer and use it in GitHub Desktop.
#!/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