I'd like to execute xinput disable bcm5974
when Gnome Terminal (and maybe some other application) gets focused, and xinput enable bcm5974
when it loses focus.
This is because libinput and my macbook's touchpad are not friends, libinput's palm rejection barely works, it's really driving me nuts when editing code in Vim and it scrolls by accident, or when typing a command at the terminal.
libinput 1.1.4-1
xf86-input-libinput 0.16.0-1
ArchLinux