summaryrefslogtreecommitdiffstats
path: root/sample_configuration/kb-lock.sh
blob: 27db6dabcb70546a6f8dec0054d53664753f819e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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

wait