Skip to content

Instantly share code, notes, and snippets.

View andreycizov's full-sized avatar

Andrey Cizov andreycizov

  • London
View GitHub Profile
@andreycizov
andreycizov / mousemon.sh
Last active July 30, 2023 03:18
mousemon.sh - Disable mouse when locking the screen Ubuntu
#!/bin/bash
# mousemon.sh - Andrey Cizov (acizov@gmail.com) 2018 (no license applied, free to use on any terms)
#
# Sometimes you'd like to have more control on what toggles the screensaver on your Ubuntu.
# In my scenario the mouse is too sensitive, so whenever I lock the screen subsequently turning
# off the monitors - it's too easy to turn them back on by accidentally touching the mouse.
# Even mildly loud bass is enough to do so.
# This script disables a selected device whenever the lock screen is activated.