Skip to content

Instantly share code, notes, and snippets.

@lnxfsf
Created June 30, 2023 13:14
Show Gist options
  • Select an option

  • Save lnxfsf/176884aa31865bb699105c88abd2e0c1 to your computer and use it in GitHub Desktop.

Select an option

Save lnxfsf/176884aa31865bb699105c88abd2e0c1 to your computer and use it in GitHub Desktop.
1- instaliraj xinput
`sudo dnf install xinput`
-------------------
2- kreiraj skriptu u ~/my_scripts kao 'toggle-touchpad.sh'
```
#!/bin/sh
TOUCHPAD_STATUS=$(xinput list-props "ETPS/2 Elantech Touchpad" | grep 'Device Enabled' | awk '{ print $4 }')
if [ "$TOUCHPAD_STATUS" == "1" ]; then
xinput disable "ETPS/2 Elantech Touchpad"
notify-send --icon=dialog-information "Disabled" "Your computer's touchpad is disabled."
else
xinput enable "ETPS/2 Elantech Touchpad"
notify-send --icon=dialog-information "Enabled" "Your computer's touchpad is enabled."
fi
```
------------------
3- u keyboard shortcuts, stavi kao:
`/home/igor/my_scripts/toggle-touchpad.sh`
i make sure, da pritisnes, Fn + F9 na keyboard od laptopa, ne sa eksterne tastature (jer eksterna tastatura ima na F9, za volume control).
jer onda prepozna kao "Touchpad toggle"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment