Skip to content

Instantly share code, notes, and snippets.

@thepycoder
Created April 25, 2022 07:29
Show Gist options
  • Save thepycoder/6f0fe73bc46ab719be88f20e4f3dcc79 to your computer and use it in GitHub Desktop.
Save thepycoder/6f0fe73bc46ab719be88f20e4f3dcc79 to your computer and use it in GitHub Desktop.
i3lock script
# All these commands will be launched from a remote SSH session
# so we need to add the DISPLAY=:0 environment variable to tell the command
# to use the main screen, otherwise it will whine that it found no display
$ export DISPLAY=:0
# Launch i3lock with a custom screensaver
$ i3lock -i /path/to/custom/screensaver.png
# Spam backspace
$ xdotool key BackSpace
# Fill in password
$ xdotool type mypassword
$ xdotool key Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment