toggle-touchpad.sh
· 486 B · Bash
Raw
#!/bin/sh
#
# Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com>
#
# Toggles (enables/disables) the Touchpad on my X1 Carbon running FreeBSD 13.2
# Created: 2023-06-23 11:15
(xinput list SYNA8004:00\ 06CB:CD8B\ TouchPad | grep disabled) > /dev/null
case $? in
(0) # disabled
xinput enable SYNA8004:00\ 06CB:CD8B\ TouchPad && dunstify 'Touchpad ENABLED!'
;;
(1) # enabled
xinput disable SYNA8004:00\ 06CB:CD8B\ TouchPad && dunstify 'Touchpad DISABLED!'
;;
esac
1 | #!/bin/sh |
2 | # |
3 | # Dominic Reich <quick.hat4396@qtztsjosmprqmgtunjyf.com> |
4 | # |
5 | # Toggles (enables/disables) the Touchpad on my X1 Carbon running FreeBSD 13.2 |
6 | # Created: 2023-06-23 11:15 |
7 | |
8 | (xinput list SYNA8004:00\ 06CB:CD8B\ TouchPad | grep disabled) > /dev/null |
9 | |
10 | case $? in |
11 | (0) # disabled |
12 | xinput enable SYNA8004:00\ 06CB:CD8B\ TouchPad && dunstify 'Touchpad ENABLED!' |
13 | ;; |
14 | (1) # enabled |
15 | xinput disable SYNA8004:00\ 06CB:CD8B\ TouchPad && dunstify 'Touchpad DISABLED!' |
16 | ;; |
17 | esac |
18 |