How to run script automatically when mouse is connected/disconnected?
This is the case: for reasons not described in this thread, I have window decorations disabled by default (using Compiz). Don't miss them either, if there's mouse to use. Other thing is, when mouse is disconnected - keyboard + mouse keycombos are now missing and window management is crippled.
How to accomplish, that specific command is started, when mouse is disconnected, and other when it's connected?
PS, mouse in question has a Bluetooth connection.