Skip to content

Latest commit

 

History

History
57 lines (49 loc) · 1.46 KB

README.md

File metadata and controls

57 lines (49 loc) · 1.46 KB

Padlock

This is a very simple approach of a screen locker for i3wm (and possibly other WMs/DEs). lockscreen screenshot

Building

This application only requires two dependencies: gtkmm3 and pam.

git clone https://github.com/proxict/padlock.git
cd padlock
mkdir -p build && cd build
cmake ..
make

Installing

First, build the padlock according to the build instructions above.

make install # run with root privileges

Basic usage

padlock image.png

The way I use this application is that I take a screenshot of my screen, blur the screenshot and use the blurred image as an input for the padlock. For that I have two simple scripts:
screenshot: (requires scrot)

#!/bin/bash

scrot -F "$(mktemp -u).png" -q 30 -e 'ls $f'

blur: (requires imagemagick)

#!/bin/bash

[ ! -f "$1" ] && echo "Usage: blur <img>" && exit 1

out="$(mktemp -u).png"
magick "$1" -scale 10% -blur 0x2.5 -resize 1000% "${out}"
ls "${out}"

Then, call the application like this:

padlock $(blur $(screenshot))

Disclaimer:

Please, keep in mind, this is not a cryptographically secure product as I'm using simple std::string without any custom allocators for the password input. Nor there is any kind of mlock to prevent any part of the memory to be swapped to the swap area or dumped in case of a crash of the process. Use at your own risk.

Also, the code is fairly old :)