install.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #!/usr/bin/env bash
  2. # Three-finger tap: Enable three-finger tap for "middle click" in GNOME.
  3. # Copyright (C) 2015 Albin Söderqvist and Eemeli Blåsten
  4. #
  5. # This program is free software: you can redistribute it and/or modify
  6. # it under the terms of the GNU General Public License as published by
  7. # the Free Software Foundation, either version 3 of the License, or
  8. # (at your option) any later version.
  9. #
  10. # This program is distributed in the hope that it will be useful,
  11. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. # GNU General Public License for more details.
  14. #
  15. # You should have received a copy of the GNU General Public License
  16. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. echo -e "\nThis program uses synclient to enable three-finger tap"
  18. echo -e "for \`button 2' or \`middle click' in GNOME.\n"
  19. echo -e "Press \`i' to install or any other key to exit.\c"
  20. read -n 1 keypress
  21. if [ "$keypress" = i ]; then
  22. mkdir -p ~/.config/autostart
  23. cp three-finger-tap.desktop ~/.config/autostart/three-finger-tap.desktop
  24. synclient TapButton3=2
  25. echo -e "\n\nCreated the file"
  26. echo -e " ~/.config/autostart/three-finger-tap.desktop"
  27. echo -e "\nInstallation is complete."
  28. echo -e "To uninstall, simply remove the file shown above."
  29. exit 0
  30. else
  31. echo ""
  32. exit 0
  33. fi