Giter VIP home page Giter VIP logo

screenlockmouselock's Introduction

screenlockmouselock (tested in Ubuntu 16.04 only)

Locks a usb port (currently hard coded to xinput id=11) when the user session is locked, and unlocks the usb port when the session is unlocked. If you have a mouse plugged into the coded usb port, the script will keep mouse movements from waking the monitor when the screen is locked. Why is this useful? If you have a cat who likes to walk on your desk, your monitor won't turn on unless you press a keyboard key (which, fortunately for me, my cat is far less likely to touch).

  1. To find which port your mouse is plugged into, run: xinput -list. Update the id variable in screenlockmouselock.sh (XINPUT_PROP_ID) to your id

  2. Make sure to give script executable permissions (chmod +x screenlockmouselock.sh)

  3. (!!important) Create an empty directory ~/.screenlockmouselock

...This script assumes ~/.screenlockmouselock directory exists and currently blows up (in a evil bash loop) if the directory does not exist.

screenlockmouselock's People

Contributors

djro avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.