Releases: twolven/DiscordLockBot
Releases · twolven/DiscordLockBot
v1.2.1 - Bugfix
Bugfix
Fixed false Win+L detection
- Win key state now uses timestamp and auto-expires after 1 second (prevents stale state from causing false positives)
- Discord notifications only sent for blocks that happened within 10 seconds (old ghost presses silently discarded)
- Fixes phantom "blocked Win+L" notifications appearing hours after actual use
Full Changelog
v1.2 - Win+L Debounce
What's New
Win+L Debounce (Fingerprint Reader Spam Fix)
- Added low-level keyboard hook to intercept and debounce Win+L keypresses
- Blocks repeated Win+L attempts within a configurable cooldown period (default 2 seconds)
- Reports blocked spam attempts to Discord after the spam stops
- New config option:
LOCK_COOLDOWN_MS=2000(set to 0 to disable)
This feature prevents fingerprint reader lock buttons from spamming the lock command and causing boot loops or lock screen issues.
Full Changelog
v1.3 - Smart Snap Detection
What's New
Smart Snap Detection
Display Recovery now intelligently handles Windows Snap (Aero Snap) windows:
- Snapped windows (halves/quadrants): Automatically skipped - Windows preserves their snap state correctly on its own
- Maximized windows: Still restored (these can get scrambled by monitor wake)
- Regular floating windows: Still restored
This fixes the issue where restoring snapped windows would break their snap behavior (resize handles, snap assist, etc.).
Technical Details
- Detects snap positions by comparing window bounds to screen work area
- Supports: left/right halves, all four quadrants
- Console logging shows breakdown:
12 total (5 regular, 2 maximized, 5 snapped)
Installation
- Download and extract
LockStatusMonitor-v1.3.zip - Edit
config.txtwith your Discord bot token and channel ID - (Optional) Configure Display Recovery settings
- Run
lockbot.exe
See the README for full documentation.
v1.2 - Display Recovery
What's New
Display Recovery Feature
Automatically restore window positions and desktop icons after unlocking your PC - perfect for OLED monitors that scramble layouts when waking from sleep.
How it works:
- On Lock: Captures positions of all visible windows
- On Unlock: Waits for monitor handshake, then restores everything
New Configuration Options:
DESKTOPOK_PATH- Path to DesktopOK folder for desktop icon restoration (optional)MONITOR_DELAY_MS- Delay before restoration (default: 5000ms)
Other Changes
- Updated to .NET 9.0
- Improved window filtering (skips tooltips, tool windows, system overlays)
- Auto-detects DesktopOK executable and most recent layout file
Installation
- Download and extract
LockStatusMonitor-v1.2.zip - Edit
config.txtwith your Discord bot token and channel ID - (Optional) Configure Display Recovery settings
- Run
lockbot.exe
See the README for detailed setup instructions.
v1.1 - External Configuration & Custom Icon
🎉 Key Features & Improvements:
- External Configuration: No more hardcoded values! The Discord Bot Token and Channel ID are now read from a config.txt file located in the same directory as the executable.
- Automatic Config Template: If config.txt is missing when you first run the application, it will automatically create a template file for you with instructions, making setup much easier.
- Improved status messages and error handling related to configuration and Discord connectivity.
🚀 How to Use:
- Download the DiscordLockBot.zip file from the Assets section below.
- Extract the contents of the .zip file to a folder on your computer.
- Replace YOUR_DISCORD_BOT_TOKEN_HERE with your actual Discord Bot Token.
- Replace YOUR_DISCORD_CHANNEL_ID_HERE with the numeric ID of the channel you want messages sent to.
- Save the config.txt file.
- Run the .exe file. The bot should now connect to Discord and start monitoring your PC's lock status!