summaryrefslogtreecommitdiff
path: root/scripts/sTouchpad
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-07-20 20:18:30 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-07-20 20:18:30 +0400
commit73e31b79de25298a519671ef8b6c2ab68af9c87e (patch)
treefafbc2e405247cd1c9b1106d6346a5767071e14f /scripts/sTouchpad
parentac76d8699e3979353cd82136323e1e0afee4bba2 (diff)
directory layout changed
Diffstat (limited to 'scripts/sTouchpad')
-rwxr-xr-xscripts/sTouchpad15
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/sTouchpad b/scripts/sTouchpad
new file mode 100755
index 0000000..87c0000
--- /dev/null
+++ b/scripts/sTouchpad
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Wrapper script for activating and deactivating touchpad
+
+[ -d ~/.cache ] || { mkdir ~/.cache || { echo "Couldn't create ~/.cache " && exit 2; };}
+
+file=~/.cache/touchpad_on
+
+if [ -f $file ];then
+ rm $file
+ xinput disable "$(xinput list --name-only | grep Touchpad)" && nsend Touchpad Disabled
+else
+ touch $file
+ xinput enable "$(xinput list --name-only | grep Touchpad)" && nsend Touchpad Enabled
+fi