1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-18 18:07:45 +01:00

22 lines
607 B
Bash
Executable File

#!/bin/bash
# Toggle touchpad. Requires xf86-input-synaptics.
# by lukesmithxyz, checkout github.com/lukesmithxyz/voidrice
case "$1" in
on) synclient TouchpadOff=0 && notify-send "TouchPad activated." ;;
off) synclient TouchpadOff=1 && notify-send "TouchPad deactivated." ;;
toggle) (synclient | grep "TouchpadOff.*1") && touchpad on && exit
touchpad off ;;
*) cat << EOF
touchpad: cli script to enable and disable the touchpad.
Allowed options:
on Turn touchpad on
off Turn touchpad off
toggle Toggle the touchpad on or off
all else Print this message
EOF
esac