Artificial intelligent assistant

disable mouse when slock (display locker) is enabled I placed it in .xinitrc which I think was wrong to do. #!/bin/bash LOCKER=$(slock) if [ $LOCKER -eq 1 ]; then exec xinput --set-prop 8 "Device Enabled" 0 else exec xinput --set-prop 8 "Device Enabled" 1 fi where should I placed it and is it written correctly. thanks in advance

At this time, according to the manpage `slock` can only run a command when it locks the screen. So, there is no way to get the mouse reenabled (using just slock).

You can listen to events though, and that depends on your graphics environment. Check this question: Run script on screen lock/unlock, it should point to the right direction.

Note that just disabling the mouse with xinput can be trivially overriden by unplugging and reconnecting the mouse.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 4217e4a16acd660cbe341f1460e4dd66