Skip to content

Releases: twolven/DiscordLockBot

v1.2.1 - Bugfix

26 Jan 08:25

Choose a tag to compare

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

1.2...1.2.1

v1.2 - Win+L Debounce

26 Jan 05:06

Choose a tag to compare

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

1.1...1.2

v1.3 - Smart Snap Detection

05 Jan 04:24

Choose a tag to compare

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

  1. Download and extract LockStatusMonitor-v1.3.zip
  2. Edit config.txt with your Discord bot token and channel ID
  3. (Optional) Configure Display Recovery settings
  4. Run lockbot.exe

See the README for full documentation.

v1.2 - Display Recovery

04 Jan 04:00

Choose a tag to compare

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

  1. Download and extract LockStatusMonitor-v1.2.zip
  2. Edit config.txt with your Discord bot token and channel ID
  3. (Optional) Configure Display Recovery settings
  4. Run lockbot.exe

See the README for detailed setup instructions.

v1.1 - External Configuration & Custom Icon

20 Apr 20:13

Choose a tag to compare

🎉 Key Features & Improvements:

  1. 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.
  2. 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.
  3. Improved status messages and error handling related to configuration and Discord connectivity.

🚀 How to Use:

  1. Download the DiscordLockBot.zip file from the Assets section below.
  2. Extract the contents of the .zip file to a folder on your computer.
  3. Replace YOUR_DISCORD_BOT_TOKEN_HERE with your actual Discord Bot Token.
  4. Replace YOUR_DISCORD_CHANNEL_ID_HERE with the numeric ID of the channel you want messages sent to.
  5. Save the config.txt file.
  6. Run the .exe file. The bot should now connect to Discord and start monitoring your PC's lock status!