Screensaver with minimal features. Supports only X11.
Implemented:
- Integration with D-Bus
- Graphical locking (Creates a fullscreen window with the override_redirect flag. Grabs the keyboard with XGrabKeyboard.)
- Working with xss-lock
Running on i3:
exec --no-startup-id xss-lock -- Xlock
Build:
gcc xlock.c -o xlock -lX11 -ldbus-1 -I /usr/include/dbus-1.0/ -I /usr/lib32/dbus-1.0/include/
Font:
xlsfonts | grep courier
gcc Xlock_v2.c -o Xlock_v2 -lX11 -ldbus-1 -lXft -I /usr/include/dbus-1.0/ -I /usr/lib32/dbus-1.0/include/ -I/usr/include/freetype2/
Added time, keyboard layout, and background photo output.
gcc Xlock_v3.c -o Xlock -lX11 -lXft -lImlib2 -lxkbfile -ldbus-1 -I /usr/include/dbus-1.0/ -I /usr/lib32/dbus-1.0/include/ -I /usr/include/freetype2/
Take a screen /home/user/.i3/lock.sh:
#!/bin/bash
#Make screenshot
scrot /tmp/screen.png
# Scale image
convert -scale 10% -scale 1000% /tmp/screen.png /tmp/screen1.png
./Xlockbindsym Mod1+ctrl+l exec /home/user/.i3/lock.sh
You left your computer and your colleagues came to you, but they don't know where you are. Your monitor is on and there is a qrcode on it. The employee scans it and it forwards it to dial your number or to TG or other networks.
61.py is very smart: it analyzes where it will put its pixel from the qrcode and if the background is dark, then the color of the dot inverts.



