summaryrefslogtreecommitdiffstats
path: root/opt/lock.sh
diff options
context:
space:
mode:
authorChristian Klinger2016-05-18 13:36:50 +0200
committerChristian Klinger2016-05-18 13:36:50 +0200
commit9d548617a6ff3f85b7731775f4df9b6a6cee3906 (patch)
tree131ce73ee6514f7210bf7f0939637c2293be803b /opt/lock.sh
parentconfigurable quit button. (diff)
downloadpvs2-9d548617a6ff3f85b7731775f4df9b6a6cee3906.tar.gz
pvs2-9d548617a6ff3f85b7731775f4df9b6a6cee3906.tar.xz
pvs2-9d548617a6ff3f85b7731775f4df9b6a6cee3906.zip
added sample scripts and README.
Diffstat (limited to 'opt/lock.sh')
-rwxr-xr-xopt/lock.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/opt/lock.sh b/opt/lock.sh
new file mode 100755
index 0000000..68cbc40
--- /dev/null
+++ b/opt/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