From c524f6003caa90ea28e19b90f027302486903e24 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 8 Sep 2016 11:26:39 +0200 Subject: Rename lock/unlock scripts to kb-lock and kb-unlock so you know it's for the keyboard --- sample_configuration/kb-lock.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 sample_configuration/kb-lock.sh (limited to 'sample_configuration/kb-lock.sh') diff --git a/sample_configuration/kb-lock.sh b/sample_configuration/kb-lock.sh new file mode 100755 index 0000000..68cbc40 --- /dev/null +++ b/sample_configuration/kb-lock.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +# use xinput +keyboards=$(xinput --list | grep "slave" | grep "keyboard" | 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 -- cgit v1.2.3-55-g7522