summaryrefslogtreecommitdiffstats
path: root/sample_configuration/kb-lock.sh
blob: 36a84c83be42aa4b4adeecd80c8265e182d902e9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
#!/bin/bash

# use xinput to get all keyboards and pointers (mouse)
keyboards=$(xinput --list | grep -E "slave.*(keyboard|pointer)" | cut -f2 | cut -d'=' -f2)


for id in $keyboards; do
    echo "disabling device #$id"
    xinput --set-prop $id "Device Enabled" 0
done