mirror of
https://github.com/divnix/digga.git
synced 2024-12-22 07:31:46 +03:00
13 lines
399 B
Bash
13 lines
399 B
Bash
#!/usr/bin/env zsh
|
|
touchpad_name=$(libinput list-devices | grep -B 5 "pointer gesture" | awk '/Device/ {for (i=2; i<NF; i++) printf $i " "; print $NF}')
|
|
|
|
[[ $touchpad_name == "" ]] && exit
|
|
|
|
touchpad_status=$(xinput list-props "$touchpad_name" | awk '/Device Enabled/ {print $4}')
|
|
|
|
if [[ $touchpad_status == "0" ]]; then
|
|
xinput --enable "$touchpad_name"
|
|
else
|
|
xinput --disable "$touchpad_name"
|
|
fi
|