{"id":13617127,"url":"https://github.com/Hikari9/comfortable-swipe","last_synced_at":"2025-04-14T03:33:01.299Z","repository":{"id":79573092,"uuid":"104761842","full_name":"Hikari9/comfortable-swipe","owner":"Hikari9","description":"Comfortable 3-finger and 4-finger swipe gesture using Xdotool in native C++","archived":false,"fork":false,"pushed_at":"2023-10-21T05:01:15.000Z","size":437,"stargazers_count":559,"open_issues_count":19,"forks_count":46,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-11-08T01:39:06.445Z","etag":null,"topics":["gesture","libinput","swipe","swipe-gestures","touchpad","ubuntu"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hikari9.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-09-25T14:37:53.000Z","updated_at":"2024-11-05T04:09:52.000Z","dependencies_parsed_at":"2023-05-12T11:15:15.670Z","dependency_job_id":"255d3977-c788-48da-9ab2-6b9a008dbb43","html_url":"https://github.com/Hikari9/comfortable-swipe","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hikari9%2Fcomfortable-swipe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hikari9%2Fcomfortable-swipe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hikari9%2Fcomfortable-swipe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hikari9%2Fcomfortable-swipe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hikari9","download_url":"https://codeload.github.com/Hikari9/comfortable-swipe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248815752,"owners_count":21165977,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gesture","libinput","swipe","swipe-gestures","touchpad","ubuntu"],"created_at":"2024-08-01T20:01:37.267Z","updated_at":"2025-04-14T03:32:56.290Z","avatar_url":"https://github.com/Hikari9.png","language":"C++","funding_links":[],"categories":["HarmonyOS"],"sub_categories":["Windows Manager"],"readme":"# Comfortable Swipe (Ubuntu)\n\n[![comfortable-swipe version](https://img.shields.io/github/release/Hikari9/comfortable-swipe.svg?label=comfortable-swipe\u0026color=orange)](https://github.com/Hikari9/comfortable-swipe/releases)\n[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\nComfortable, seamless, and fast 3-finger (and 4-finger) touchpad swipe gestures for Ubuntu 14.04 LTS and beyond. May work for other Linux distros that support `libinput`.\n\n\u003e **_New in Version 1.1.0_**: Added mouse gestures, see [#mouse-gestures-experimental](#mouse-gestures-experimental)\n\n\u003e **_New in Version 1.2.0_**: Autostart now switched ON by default\n\n## Installation\n\n1. Install git and g++ \u0026geq; 7.5\n\n   ```bash\n   sudo apt install git g++\n   ```\n\n1. Install libinput-tools and C libraries\n\n   ```bash\n   sudo apt install libinput-tools libinih-dev libxdo-dev\n   ```\n\n1. Clone this repository\n\n   ```bash\n   git clone https://github.com/Hikari9/comfortable-swipe.git --depth 1\n   cd comfortable-swipe\n   ```\n\n1. Install\n\n   ```bash\n   bash install\n   ```\n\n1. You may delete the downloaded `comfortable-swipe` folder after installation.\n\n## How to Run\n\n1. You'll need some group permissions to read touchpad input data. Run\n\n   ```bash\n   sudo gpasswd -a \"$USER\" \"$(ls -l /dev/input/event* | awk '{print $4}' | head --line=1)\"\n   ```\n\n1. **_Important_**: After inputing your `sudo` password, log out then log back in\n\n1. Start the Program\n\n   ```\n   comfortable-swipe start\n   ```\n\n   You will see this output:\n\n   ```\n   $ comfortable-swipe start\n   Comfortable swipe is RUNNING in the background\n   ```\n\n1. (Optional) Toggle autostart\n\n   ```bash\n   comfortable-swipe autostart on\n   ```\n\n1. (Optional) Stop the Program\n\n   ```\n   comfortable-swipe stop\n   ```\n\n1. (Optional) See program status\n\n   ```bash\n   comfortable-swipe status\n   ```\n\n   Example:\n\n   ```\n   $ comfortable-swipe status\n\n   Autostart is ON\n   Program is RUNNING\n   --------------------\n   Configuration: /home/user/.config/comfortable-swipe.conf\n       left3 is   VALID (ctrl+super+Right)\n       left4 is   VALID (ctrl+super+shift+Right)\n      right3 is   VALID (ctrl+super+Left)\n      right4 is   VALID (ctrl+super+shift+Left)\n         up3 is   VALID (ctrl+F12)\n         up4 is   VALID (super+d)\n       down3 is   VALID (ctrl+F12)\n       down4 is   VALID (super+d)\n   threshold is   VALID (1.0)\n      mouse3 is  NOTSET\n      mouse4 is  NOTSET\n   ```\n\n1. (Optional) Get config\n\n   ```\n   comfortable-swipe \u003cPROPERTY\u003e\n   ```\n\n   ```bash\n   comfortable-swipe left3\n   comfortable-swipe left4\n   comfortable-swipe right3\n   comfortable-swipe right4\n   comfortable-swipe up3\n   comfortable-swipe up4\n   comfortable-swipe down3\n   comfortable-swipe down4\n   comfortable-swipe threshold\n   comfortable-swipe mouse3\n   comfortable-swipe mouse4\n   ```\n\n1. (Optional) Set config\n\n   ```bash\n   comfortable-swipe \u003cPROPERTY\u003e [=] \u003cVALUES\u003e\n   ```\n\n   ```bash\n   comfortable-swipe left3 = super+Right\n   comfortable-swipe right3 = super+Left\n   comfortable-swipe right4 = ctrl+alt+Left\n   comfortable-swipe down4 = super+d\n   comfortable-swipe up3 = ctrl+shift+Up\n   ```\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eOther Commands\u003c/b\u003e\u003c/summary\u003e\n\n1. All Configuration commands\n\n   ```bash\n   comfortable-swipe config list\n   comfortable-swipe config get \u003cPROPERTY\u003e\n   comfortable-swipe config set \u003cPROPERTY\u003e [=] \u003cVALUE\u003e\n   comfortable-swipe config path\n   comfortable-swipe config keys\n   ```\n\n1. Help and Version\n\n   ```bash\n   comfortable-swipe --version\n   comfortable-swipe --help\n   ```\n\n1. Autostart commands\n\n   ```bash\n   comfortable-swipe autostart on\n   comfortable-swipe autostart off\n   comfortable-swipe autostart toggle\n   comfortable-swipe autostart status\n   comfortable-swipe autostart path\n   ```\n\n1. Show output with `--attach`\n\n   Example output of 3-finger left, 4-finger left, 3-finger right, 3-finger up:\n\n   ```bash\n   $ comfortable-swipe start --attach\n   SWIPE left3\n   SWIPE left4\n   SWIPE right3\n   SWIPE up3\n   ...\n   ```\n\n1. Test output with `--bare` to attach without actually swiping\n\n   ```bash\n   $ comfortable-swipe start --bare\n   SWIPE left3\n   SWIPE left4\n   SWIPE right3\n   SWIPE up3\n   ...\n   ```\n\n1. Debug\n\n   ```bash\n   $ comfortable-swipe debug\n   ...\n   -event9   DEVICE_ADDED     TouchPad                     seat0 default group7  cap:pg  size 70x50mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on\n   ...\n   event9   GESTURE_SWIPE_BEGIN  +2.03s   3\n   event9   GESTURE_SWIPE_UPDATE  +2.03s  3 -9.95/ 2.64 (-26.90/ 7.12 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.03s  3 -10.44/ 3.19 (-28.22/ 8.62 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.04s  3 -9.71/ 2.64 (-26.25/ 7.12 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.05s  3 -8.98/ 2.64 (-24.28/ 7.12 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.06s  3 -7.40/ 2.36 (-20.01/ 6.37 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.06s  3 -6.31/ 2.50 (-17.06/ 6.75 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.07s  3 -5.34/ 1.80 (-14.44/ 4.87 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.08s  3 -4.61/ 2.08 (-12.47/ 5.62 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.09s  3 -4.49/ 1.53 (-12.14/ 4.12 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.09s  3 -4.01/ 1.25 (-10.83/ 3.37 unaccelerated)\n   event9   GESTURE_SWIPE_UPDATE  +2.10s  3 -4.13/ 0.42 (-11.15/ 1.12 unaccelerated)\n   event9   GESTURE_SWIPE_END  +2.11s     3\n   ...\n   ```\n\n\u003c/details\u003e\n\n## Gesture Configurations\n\nThe default configuration file is located at `~/.config/comfortable-swipe.conf`.\nComfortable swipe makes use of **keyboard shortcuts** to perform swipes, through `xdotool`.\n\nSet a property directly with:\n\n```\ncomfortable-swipe \u003cPROPERTY\u003e [=] \u003cVALUE\u003e\n```\n\nOr edit the configuration file manually:\n\n```\ngedit ~/.config/comfortable-swipe.conf\n```\n\nAfter editing, make sure to restart with `comfortable-swipe start`.\n\n\u003e **Warning**: For v1.1.0 below, the configuration file is located at\n\u003e `/usr/local/share/comfortable-swipe/comfortable-swipe.conf`\n\n\u003e **Note**: You can locate the absolute path to your configuration by running: `comfortable-swipe config path`\n\n## Configuration Reference\n\n| Property  |                                 Value                                  | Examples                                                                           |\n| --------- | :--------------------------------------------------------------------: | ---------------------------------------------------------------------------------- |\n| left3     |                          3-finger swipe left                           | ctrl+alt+Right                                                                     |\n| left4     |                          4-finger swipe left                           | ctrl+alt+shift+Right                                                               |\n| right3    |                          3-finger swipe right                          | ctrl+alt+Left                                                                      |\n| right4    |                          4-finger swipe right                          | ctrl+alt+shift+Left                                                                |\n| up3       |                           3-finger swipe up                            | ctrl+alt+Down                                                                      |\n| up4       |                           4-finger swipe up                            | ctrl+alt+shift+Down                                                                |\n| down3     |                          3-finger swipe down                           | ctrl+alt+Up                                                                        |\n| down4     |                          4-finger swipe down                           | ctrl+alt+shift+Up                                                                  |\n| threshold | mouse movement pixels that trigger a swipe (can be as large as 1000.0) | 0.0 / 240.0 / 1000.0                                                               |\n| mouse3    |             mouses a mouse button when 3 fingers are down              | button1 / move / scroll\u003cbr\u003e _(see [Mouse Gestures](#mouse-gestures-experimental))_ |  |\n| mouse4    |             mouses a mouse button when 4 fingers are down              | button1 / move / scroll \u003cbr\u003e _(see [Mouse Gestures](#mouse-gestures-experimental)_ |\n\n### Keystrokes\n\nTaken from `man xdotool`:\n\n\u003e Type a given keystroke. Examples being \"alt+r\", \"Control_L+J\",\n\u003e \"ctrl+alt+n\", \"BackSpace\".\n\u003e\n\u003e Generally, any valid X Keysym string will work. Multiple keys are\n\u003e separated by '+'. Aliases exist for \"alt\", \"ctrl\", \"shift\",\n\u003e \"super\", and \"meta\" which all map to Foo_L, such as Alt_L and\n\u003e Control_L, etc.\n\u003e\n\u003e In cases where your keyboard doesn't actually have the key you want\n\u003e to type, xdotool will automatically find an unused keycode and use\n\u003e that to type the key.\n\nRefer to https://www.linux.org/threads/xdotool-keyboard.10528/ for a complete list of keycodes you can use.\n\n- [DEFKEY - All Linux keyboard shortcuts](https://defkey.com/)\n- [Unity Keyboard Shortcuts](https://cheatography.com/sapemeg/cheat-sheets/ubuntu-unity-16-04/)\n- [GNOME Keyboard Shortcuts](https://wiki.gnome.org/Design/OS/KeyboardShortcuts)\n- [KDE Keyboard Shortcuts](https://community.linuxmint.com/tutorial/view/47)\n- [PopOS Keyboard Shortcuts](https://support.system76.com/articles/pop-keyboard-shortcuts/)\n\n## Known Issues: Pop!_OS 20.04+\n\nPop!_OS 20.04+ may be sensitive to capitalization  (#76, #82). Make sure to capitalize every first letter:\n\n```bash\n# Pop!_OS\ncomfortable-swipe up3 = Super+Ctrl+Down\ncomfortable-swipe down3 = Super+Ctrl+Up\n```\n\n## Example Configurations\n\nThis section includes some example configurations which you can use for your swipe experience.\n\n1. Switch workspace (horizontal)\n\n   ```bash\n   # Ubuntu flavors + GNOME\n   comfortable-swipe left3 = ctrl+alt+Right\n   comfortable-swipe right3 = ctrl+alt+Left\n   ```\n\n1. Switch workspace (vertical)\n\n   ```bash\n   # Ubuntu flavors + GNOME\n   comfortable-swipe up3 = ctrl+alt+Down\n   comfortable-swipe down3 = ctrl+alt+Up\n   ```\n\n   ```bash\n   # GNOME alt.\n   comfortable-swipe up3 = super+PgDown\n   comfortable-swipe down3 = super+PgUp\n   ```\n\n   ```bash\n   # Pop OS\n   comfortable-swipe up3 = Super+Ctrl+Down\n   comfortable-swipe down3 = Super+Ctrl+Up\n   ```\n\n1. Move window to workspace (horizontal)\n\n   ```bash\n   # Ubuntu flavors + GNOME + Kali\n   comfortable-swipe left4 = ctrl+alt+shift+Right\n   comfortable-swipe right4 = ctrl+alt+shift+Left\n   ```\n\n   ```bash\n   # Elementary OS\n   comfortable-swipe left4 = super+alt+Right\n   comfortable-swipe right4 = super+alt+Left\n   ```\n\n1. Move window to workspace (vertical)\n\n   ```bash\n   # Ubuntu flavors + GNOME + Kali\n   comfortable-swipe up4 = ctrl+alt+shift+Down\n   comfortable-swipe down4 = ctrl+alt+shift+Up\n   ```\n\n   ```bash\n   # GNOME alt.\n   comfortable-swipe up4 = super+shift+PgDown\n   comfortable-swipe down4 = super+shift+PgUp\n   ```\n\n1. Move window to other monitor\n\n   ```bash\n   # Ubuntu flavors + GNOME\n   comfortable-swipe left4 = super+shift+Right\n   comfortable-swipe right4 = super+shift+Left\n   ```\n\n1. Toggle workspace overview\n\n   ```bash\n   # Ubuntu flavors + Elementary OS\n   comfortable-swipe up3 = super+s\n   ```\n\n   ```bash\n   # Elementary OS (all workspaces)\n   comfortable-swipe up4 = super+a\n   ```\n\n1. Show desktop\n\n   ```bash\n   # Ubuntu flavors\n   comfortable-swipe down3 = ctrl+super+d\n   ```\n\n   ```bash\n   # Linux Mint\n   comfortable-swipe down3 = super+d\n   ```\n\n   ```bash\n   # Kali\n   comfortable-swipe down3 = ctrl+alt+d\n   ```\n\n   ```bash\n   # KDE\n   comfortable-swipe down3 = ctrl+F12\n   ```\n\n1. Snap windows to the left/right\n\n   ```bash\n   comfortable-swipe left3 = super+Left\n   comfortable-swipe right3 = super+Right\n   ```\n\n1. Toggle maximize\n\n   ```bash\n   comfortable-swipe up3 = super+Up\n   ```\n\n1. Toggle minimize\n\n   ```bash\n   comfortable-swipe down3 = super+Down\n   ```\n\n## Mouse Gestures (Experimental)\n\nYou can also play around with mouse gestures during swipe.\nThis enables certain mouse behaviour to trigger along with a 3/4-finger swipe.\n\nKeys:\n\n- mouse3 - for 3-finger mouse gestures\n- mouse4 - for 4-finger mosue gestures\n- hold3 (deprecated) - old equivalent of mouse3\n- hold4 (deprecated) - old equivalent of mouse4\n\nPossible Values:\n\n- button1 - left click\n- button2 - middle click\n- button3 - right click\n- button4 - wheel up (experimental)\n- button5 - wheel down (experimental)\n- move - just move the mouse cursor while fingers are down\n- scroll - 3/4 finger natural scroll (no acceleration, very experimental)\n- scroll_reverse - 3/4 finger reverse scroll (no acceleration, very experimental)\n\n\u003e **Tip**: You can clear mouse gestures by setting them blank\n\u003e\n\u003e ```\n\u003e comfortable-swipe mouse3 =\n\u003e comfortable-swipe mouse4 =\n\u003e ```\n\nExamples:\n\n✔️ swipes OK\n⭕ swipes DISABLED\n\n- 3/4-finger drag ⭕\n\n  ```bash\n  comfortable-swipe mouse3 = button1\n  comfortable-swipe mouse4 = button1\n  ```\n\n  You can also use `button2` for middle click and `button3` for right click.\n\n- 3/4-finger natural scroll ⭕\n\n  ```bash\n  comfortable-swipe mouse3 = scroll\n  comfortable-swipe mouse4 = scroll\n  ```\n\n- 3/4-finger reverse scroll ⭕\n\n  ```bash\n  comfortable-swipe mouse3 = scroll_reverse\n  comfortable-swipe mouse4 = scroll_reverse\n  ```\n\n- Move 3/4-fingers with the cursor ✔️\n\n  ```bash\n  comfortable-swipe mouse3 = move\n  comfortable-swipe mouse4 = move\n  ```\n\n\u003e **Warning**: Some mouse configuration will **disable up/left/right/down behavior** to avoid gesture conflicts. The logic of this will be improved in the future.\n\n## Debugging\n\nYou can check your touchpad driver by running\n\n```bash\ncomfortable-swipe debug\n```\n\nThis is an alias of `libinput debug-events`. This logs all gestures you make on your touchpad, along with other input-based events that can be captured by libinput.\n\nA working swipe gesture will show the following:\n\n```bash\n$ comfortable-swipe debug\n...\n-event9   DEVICE_ADDED     TouchPad                     seat0 default group7  cap:pg  size 70x50mm tap(dl off) left scroll-nat scroll-2fg-edge click-buttonareas-clickfinger dwt-on\n...\nevent9   GESTURE_SWIPE_BEGIN  +2.03s   3\nevent9   GESTURE_SWIPE_UPDATE  +2.03s  3 -9.95/ 2.64 (-26.90/ 7.12 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.03s  3 -10.44/ 3.19 (-28.22/ 8.62 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.04s  3 -9.71/ 2.64 (-26.25/ 7.12 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.05s  3 -8.98/ 2.64 (-24.28/ 7.12 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.06s  3 -7.40/ 2.36 (-20.01/ 6.37 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.06s  3 -6.31/ 2.50 (-17.06/ 6.75 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.07s  3 -5.34/ 1.80 (-14.44/ 4.87 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.08s  3 -4.61/ 2.08 (-12.47/ 5.62 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.09s  3 -4.49/ 1.53 (-12.14/ 4.12 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.09s  3 -4.01/ 1.25 (-10.83/ 3.37 unaccelerated)\nevent9   GESTURE_SWIPE_UPDATE  +2.10s  3 -4.13/ 0.42 (-11.15/ 1.12 unaccelerated)\nevent9   GESTURE_SWIPE_END  +2.11s     3\n...\n```\n\nIf you can see `GESTURE_SWIPE_XXX` in your output, that means your touchpad supports multi-touch swipe gestures.\n\n## FAQ: Can I run a _shell command_ instead of a keystroke?\n\n**Answer 1**: _Unfortunately **NO**..._\n\nFor the following reasons:\n\n1.  We want prioritize \"comfort\" over functionality, which we deliver through performance in our negligible-overhead implementation (that's why C++)\n1.  There are other gesture libraries that already do this properly (eg. [libinput gestures](https://github.com/bulletmark/libinput-gestures), [Fusuma](https://github.com/iberianpig/fusuma)), we don't want to be a clone of them\n1.  Running a new shell command with unpredictable process time will break our unthreaded optimizations (unlike native keystrokes)\n\nThat's why it's not possible... or not?\n\n**Answer 2**: _... but actually **IT'S POSSIBLE**!_\n\nAlthough we don't provide this out of the box in our config, this can definitely be\ndone with the default bash tools.\n\n## Hack: Shell command on swipe\n\nRunning shell commands our **NOT** part of the core features of comfortable-swipe,\nbut through the default bash tools you can _mimic_ this functionality via our program output.\n\n\u003cdetails\u003e\n\u003csummary\u003e \u003cb\u003eUse Case\u003c/b\u003e: \u003ci\u003e\"I want to run \u003ccode\u003egnome-terminal\u003c/code\u003e if I swipe up with 3 fingers.\"\u003c/i\u003e\n\u003c/summary\u003e\n\n1. Attach the program to the shell:\n\n   ```bash\n   comfortable-swipe start --attach\n   ```\n\n   Verify it outputs when you swipe left, left, up, right, up with 3 fingers:\n\n   ```bash\n   $ comfortable-swipe start --attach\n   SWIPE left3\n   SWIPE left3\n   SWIPE up3\n   SWIPE right3\n   SWIPE up3\n   ...\n   ```\n\n1. Filter out the wanted gesture with `grep`.\n\n   In our case, we want 3-finger swipe up which is \"SWIPE up3\":\n\n   ```bash\n   $ comfortable-swipe start --attach | grep --line-buffered \"SWIPE up3\"\n   SWIPE up3\n   SWIPE up3\n   ...\n   ```\n\n   \u003e **Note**: The flag `--line-buffered` ensures the output prints line-by-line.\n\n1. Now we can execute our shell command with `xargs`.\n\n   So if we want \"SWIPE up3\" to open the terminal,\n\n   ```bash\n   comfortable-swipe start --attach | grep \"SWIPE up3\" --line-buffered | xargs -I@ gnome-terminal\n   ```\n\n   \u003e **Note**: The flag `-I@` in xargs substitutes the line \"SWIPE xxx\" to the charatcter \"@\", which you can use for your program.\n\n1. _Bonus_: Add to autostart\n\n   Open our autostart file:\n\n   ```bash\n   gedit \"$(comfortable-swipe autostart path)\"\n   ```\n\n   Tweak the `Exec` section:\n\n   ```ini\n   [Desktop Entry]\n   Type=Application\n   Exec=comfortable-swipe start\n   Name=Comfortable Swipe\n   Comment=Comfortable 3/4-finger touchpad gestures\n   Hidden=false\n   NoDisplay=false\n   X-GNOME-Autostart-enabled=true\n   ```\n\n   To:\n\n   ```ini\n   [Desktop Entry]\n   Type=Application\n   Exec=comfortable-swipe start --attach | grep \"SWIPE up3\" --line-buffered | xargs -I@ gnome-terminal\n   Name=Comfortable Swipe\n   Comment=Comfortable 3/4-finger touchpad gestures\n   Hidden=false\n   NoDisplay=false\n   X-GNOME-Autostart-enabled=true\n   ```\n\n1. Log out and log back in.\n   You should now be able to run your custom shell commands on startup.\n\n1. _Bonus_: Use `--bare` instead of `--attach` to NOT run keystrokes while swiping\n\n   ```bash\n   comfortable-swipe start --bare | grep \"SWIPE up3\" --line-buffered | xargs -I@ gnome-terminal\n   ```\n\n1. _Bonus_: You can pipe multiple gestures with `tee`:\n\n   ```bash\n   comfortable-swipe start --attach | \\\n   tee \u003e(grep \"SWIPE left3\"  --line-buffered | xargs -I@ \u003cCOMMAND\u003e) | \\\n   tee \u003e(grep \"SWIPE left4\"  --line-buffered | xargs -I@ \u003cCOMMAND\u003e) | \\\n   tee \u003e(grep \"SWIPE right3\" --line-buffered | xargs -I@ \u003cCOMMAND\u003e) | \\\n   tee \u003e(grep \"SWIPE right4\" --line-buffered | xargs -I@ \u003cCOMMAND\u003e) | \\\n   tee \u003e(grep \"SWIPE up3\"    --line-buffered | xargs -I@ \u003cCOMMAND\u003e) | \\\n   tee \u003e(grep \"SWIPE up4\"    --line-buffered | xargs -I@ \u003cCOMMAND\u003e) | \\\n   tee \u003e(grep \"SWIPE down3\"  --line-buffered | xargs -I@ \u003cCOMMAND\u003e) | \\\n   tee \u003e(grep \"SWIPE down4\"  --line-buffered | xargs -I@ \u003cCOMMAND\u003e)\n   ```\n\n   Substitute `\u003cCOMMAND\u003e` with the shell command of your choice.\n\n\u003c/details\u003e\n\n## Uninstall\n\nRun the following script:\n\n```bash\nwget -qO - https://raw.githubusercontent.com/Hikari9/comfortable-swipe/master/uninstall | bash\n```\n\n## Bug Reports\n\nSearch in [Issues](https://github.com/Hikari9/comfortable-swipe/issues?utf8=%E2%9C%93\u0026q=is%3Aissue) if the problem has already been solved.\n\nOtherwise, [create a new issue](https://github.com/Hikari9/comfortable-swipe/issues/new) to report your bug.\n\nPlease include the output of the following:\n\n1. `lsb_release -a`\n2. `g++ --version`\n3. `ls -l /dev/input/event*`\n4. `xinput list | grep touchpad -i`\n5. `lsmod | grep hid`\n6. `comfortable-swipe status`\n7. `comfortable-swipe start` (if you can run it)\n8. `comfortable-swipe debug` (try swiping if you can see `GESTURE_SWIPE_XXX`)\n9. `cat $(comfortable-swipe config)`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHikari9%2Fcomfortable-swipe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FHikari9%2Fcomfortable-swipe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FHikari9%2Fcomfortable-swipe/lists"}