From 468a789dbc4b1928c035d8590895efc533520a27 Mon Sep 17 00:00:00 2001 From: Charles Cabergs Date: Wed, 24 Feb 2021 17:07:33 +0100 Subject: Updated file tree to match XDG base directory specification --- local/bin/touchpad-toggle | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 local/bin/touchpad-toggle (limited to 'local/bin/touchpad-toggle') diff --git a/local/bin/touchpad-toggle b/local/bin/touchpad-toggle new file mode 100755 index 0000000..e4dc959 --- /dev/null +++ b/local/bin/touchpad-toggle @@ -0,0 +1,12 @@ +#!/bin/sh + +touchpad_name='ETPS/2 Elantech Touchpad' + +active="$(xinput list-props "$touchpad_name" | grep 'Device Enabled' | cut -f 3)" + +if [ "$active" -eq 1 ] +then + xinput disable "$touchpad_name" +else + xinput enable "$touchpad_name" +fi -- cgit