diff options
author | Azat Bahawi <azat@bahawi.net> | 2022-02-16 02:15:52 +0300 |
---|---|---|
committer | Azat Bahawi <azat@bahawi.net> | 2022-02-16 02:15:52 +0300 |
commit | 13964faa53b09924bdd27328311ba27457b0b61d (patch) | |
tree | 73dcca227f3084fd1fa09fd4d3323544b61218ea /scripts/toggle-touchpad.sh | |
parent | meh (diff) |
I hate the Antichrist
Diffstat (limited to 'scripts/toggle-touchpad.sh')
-rwxr-xr-x | scripts/toggle-touchpad.sh | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/toggle-touchpad.sh b/scripts/toggle-touchpad.sh index 449bd5b..2a1c061 100755 --- a/scripts/toggle-touchpad.sh +++ b/scripts/toggle-touchpad.sh @@ -3,9 +3,8 @@ ID=$(xinput list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}') STATE=$(xinput list-props "$ID" | awk '/Device Enabled/ {print $4}') -if [ "$STATE" = 1 ] -then - xinput disable "$ID" +if [ "$STATE" = 1 ]; then + xinput disable "$ID" else - xinput enable "$ID" + xinput enable "$ID" fi |