This is a simple watcher for ActivityWatch that sets the user's status to AFK when the computer is locked and back to active when it is unlocked.
Tested on Python 3.10.4 on Windows.
pyinstaller cli.py -n aw-watcher-winlock --onefile
Copy dist/aw-watcher-winlock.exe
to somewhere in your PATH, and your aw-qt should recognize it.
Many code from the official aw-watcher-afk repo.