#!/bin/zsh if [ "$1" = "lock" ];then #!/bin/bash declare -i ID ID=`xinput list | grep -Eo 'TouchPad\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 echo "Touchpad disabled." else xinput enable $ID echo "Touchpad enabled." fi ##synclient TouchpadOff=1 #MOUSE=$(xinput list | grep Mouse | sed -e 's/.*id=//' | cut -f 1) #TRACK=$(xinput list | grep 'TouchPad' | sed -e 's/.*id=//' | cut -f 1) #xinput set-prop $MOUSE "Device Enabled" 0 #xinput set-prop $TRACK "Device Enabled" 0 ##while [ ! "$PASSWORD" = "a" ];do export PASSWORD=$((rofi -dmenu)