diff options
Diffstat (limited to 'sample_configuration')
-rwxr-xr-x | sample_configuration/kb-lock.sh | 6 | ||||
-rwxr-xr-x | sample_configuration/kb-unlock.sh | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sample_configuration/kb-lock.sh b/sample_configuration/kb-lock.sh index 68cbc40..36a84c8 100755 --- a/sample_configuration/kb-lock.sh +++ b/sample_configuration/kb-lock.sh @@ -1,10 +1,10 @@ #!/bin/bash -# use xinput -keyboards=$(xinput --list | grep "slave" | grep "keyboard" | cut -f2 | cut -d'=' -f2) +# 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
\ No newline at end of file +done diff --git a/sample_configuration/kb-unlock.sh b/sample_configuration/kb-unlock.sh index f09a2fd..09dc270 100755 --- a/sample_configuration/kb-unlock.sh +++ b/sample_configuration/kb-unlock.sh @@ -1,9 +1,9 @@ #!/bin/bash -# use xinput -keyboards=$(xinput --list | grep "slave" | grep "keyboard" | cut -f2 | cut -d'=' -f2) +# 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 "enabling device #$id" xinput --set-prop $id "Device Enabled" 1 -done
\ No newline at end of file +done |