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 ++++++++++ sample_configuration/kb-unlock.sh | 9 +++++++++ sample_configuration/lock.sh | 10 ---------- sample_configuration/unlock.sh | 9 --------- src/client/util/platform/blankscreen_X11.cpp | 6 +++--- 5 files changed, 22 insertions(+), 22 deletions(-) create mode 100755 sample_configuration/kb-lock.sh create mode 100755 sample_configuration/kb-unlock.sh delete mode 100755 sample_configuration/lock.sh delete mode 100755 sample_configuration/unlock.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 diff --git a/sample_configuration/kb-unlock.sh b/sample_configuration/kb-unlock.sh new file mode 100755 index 0000000..f09a2fd --- /dev/null +++ b/sample_configuration/kb-unlock.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +# use xinput +keyboards=$(xinput --list | grep "slave" | grep "keyboard" | 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 diff --git a/sample_configuration/lock.sh b/sample_configuration/lock.sh deleted file mode 100755 index 68cbc40..0000000 --- a/sample_configuration/lock.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/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 diff --git a/sample_configuration/unlock.sh b/sample_configuration/unlock.sh deleted file mode 100755 index f09a2fd..0000000 --- a/sample_configuration/unlock.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# use xinput -keyboards=$(xinput --list | grep "slave" | grep "keyboard" | 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 diff --git a/src/client/util/platform/blankscreen_X11.cpp b/src/client/util/platform/blankscreen_X11.cpp index cee8f03..db8873b 100755 --- a/src/client/util/platform/blankscreen_X11.cpp +++ b/src/client/util/platform/blankscreen_X11.cpp @@ -56,7 +56,7 @@ bool BlankScreen::lock(const QString& message) QProcess ungrabP; - ungrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/lock.sh"); + ungrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/kb-lock.sh"); ungrabP.waitForFinished(); _locked = true; @@ -77,9 +77,9 @@ bool BlankScreen::unlock() XFlush(_sysdep->dpy); - /* start the unlock.sh script */ + /* start the kb-unlock.sh script */ QProcess regrabP; - regrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/unlock.sh"); + regrabP.start("/bin/bash", QStringList() << "/opt/openslx/pvs2/kb-unlock.sh"); regrabP.waitForFinished(); _locked = false; -- cgit v1.2.3-55-g7522