summaryrefslogtreecommitdiffstats
path: root/sample_configuration
diff options
context:
space:
mode:
authorSimon Rettberg2017-02-10 15:40:29 +0100
committerSimon Rettberg2017-02-10 15:40:29 +0100
commite5fa9c77d34bce0291e1ec713bab95d7803352bf (patch)
treedc2bd4661e734687f3e554b69396d71797edf22e /sample_configuration
parent[client] Nicer output of ip addresses under system information (diff)
downloadpvs2-e5fa9c77d34bce0291e1ec713bab95d7803352bf.tar.gz
pvs2-e5fa9c77d34bce0291e1ec713bab95d7803352bf.tar.xz
pvs2-e5fa9c77d34bce0291e1ec713bab95d7803352bf.zip
[sample_configuration] kb-lock: Disable mouse too
Diffstat (limited to 'sample_configuration')
-rwxr-xr-xsample_configuration/kb-lock.sh6
-rwxr-xr-xsample_configuration/kb-unlock.sh6
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