dominic revised this gist . Go to revision
1 file changed, 17 insertions
toggle-touchpad.sh(file created)
@@ -0,0 +1,17 @@ | |||
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 |
Newer
Older