diff options
Diffstat (limited to 'dotfiles/system/.local/bin/toggle-touchpad')
| -rwxr-xr-x | dotfiles/system/.local/bin/toggle-touchpad | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/dotfiles/system/.local/bin/toggle-touchpad b/dotfiles/system/.local/bin/toggle-touchpad deleted file mode 100755 index 9dde99b..0000000 --- a/dotfiles/system/.local/bin/toggle-touchpad +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh -# Toggle touchpad status -# Using libinput and xinput - -# Use xinput list and do a search for touchpads. Then get the first one and get its name. -device="$(xinput list | grep -P '(?<= )[\w\s:]*(?i)(touchpad|synaptics)(?-i).*?(?=\s*id)' -o | head -n1)" - -# If it was activated disable it and if it wasn't disable it -if [[ "$(xinput list-props "$device" | grep -P ".*Device Enabled.*\K.(?=$)" -o)" == "1" ]] -then - xinput disable "$device" - notify-send "Touchpad" "Touchpad disabled" -else - xinput enable "$device" - notify-send "Touchpad" "Touchpad enabled" -fi |
