Dear all,
I am trying to set up a keybinding for enabling/disabling touchpad in dwm. I followed the instructions provided in the wiki; installing xf86-input-synaptics and creating this touchpad_toggle.sh script (made executable) in /home/artix/.scripts/:
!/bin/bash
declare -i ID
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
declare -i STATE
STATE=`xinput list-props $ID | grep 'Device Enabled' | awk '{print $4}'`
if [ $STATE -eq 1 ]
then
xinput disable $ID
else
xinput enable $ID
fi
I then added these lines in my config.def.h file in my dwm folder:
static const char *distouch[] = {"/home/artix/.scripts/touchpad_toggle.sh", NULL };
under
/* appearence */and
{ MODKEY|ShiftMask, XK_t, spawn, {.v = distouch } },
under
/* modifier */.
After modifying the config.def.h file. I run:
sudo cp config.def.h config.h
sudo make clean installMy intention is to enable/disable the touchpad with Mod+Shift+t by running the abovementioned script, but something is wrong. Perhaps the arguments in the definition of distouch in the appearence section?
Does the script itslef work? Did you remember to change its permission to executable? The dwm part looks good to me.