{"id":16510299,"url":"https://github.com/kiyoon/nvim-hand-gesture","last_synced_at":"2025-10-25T18:09:28.680Z","repository":{"id":65028210,"uuid":"580255461","full_name":"kiyoon/nvim-hand-gesture","owner":"kiyoon","description":"Write programs with hand gestures","archived":false,"fork":false,"pushed_at":"2023-03-21T18:01:18.000Z","size":37,"stargazers_count":92,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-01T04:31:45.440Z","etag":null,"topics":["action-recognition","computer-vision","gesture-recognition","neovim","nvim","nvim-plugin","vim"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kiyoon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"kiyoon"}},"created_at":"2022-12-20T05:18:05.000Z","updated_at":"2025-01-22T16:31:43.000Z","dependencies_parsed_at":"2024-10-28T10:14:03.461Z","dependency_job_id":"4eea20a1-6510-4cd7-a1bc-343a3eb5129c","html_url":"https://github.com/kiyoon/nvim-hand-gesture","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiyoon%2Fnvim-hand-gesture","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiyoon%2Fnvim-hand-gesture/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiyoon%2Fnvim-hand-gesture/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kiyoon%2Fnvim-hand-gesture/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kiyoon","download_url":"https://codeload.github.com/kiyoon/nvim-hand-gesture/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244124189,"owners_count":20401685,"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":["action-recognition","computer-vision","gesture-recognition","neovim","nvim","nvim-plugin","vim"],"created_at":"2024-10-11T15:54:45.751Z","updated_at":"2025-10-25T18:09:23.656Z","avatar_url":"https://github.com/kiyoon.png","language":"Python","funding_links":["https://github.com/sponsors/kiyoon"],"categories":[],"sub_categories":[],"readme":"# Hand Gesture for Neovim\n\nUse your webcam to unlock hand gesture recognition to control Neovim!\n\n\u003cimg src=\"https://user-images.githubusercontent.com/12980409/209009889-94513f97-2cdd-4fd7-9d0f-5874b944b8e8.gif\" width=\"100%\"/\u003e\n\nHighly experimental. Is it practical? Maybe not, but some use cases are not bad. Should you try it? Why not, it's fun!\n\nHighly customisable. Just change the lua scripts to your own custom commands!  \nThe demo uses [GitHub Copilot](https://github.com/github/copilot.vim) (AI code suggestion), [Nvim-Tree](https://github.com/nvim-tree/nvim-tree.lua) (file explorer), and [nvim-treesitter-textobjects](https://github.com/nvim-treesitter/nvim-treesitter-textobjects) (peep function definition).\n\n## Prerequisites\n\n\nYou need an Nvidia GPU on a Linux computer. I tested with Ubuntu 22.04, GTX 1080 Ti and RTX 3060. The Nvidia driver has to support CUDA 11.3 (see `nvidia-smi` command).  \nI'm sorry, no Windows or Mac support as of yet.\n\n## Installation\nThis plugin depends on a number of softwares so there's no easy way to install using plugin managers.  \nThe easiest way to get started is using Docker.\n\nYou need to install [Nvidia-docker](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html). From their official guide,  \n\n```bash\ncurl https://get.docker.com | sh \\\n  \u0026\u0026 sudo systemctl --now enable docker\n\ndistribution=$(. /etc/os-release;echo $ID$VERSION_ID) \\\n      \u0026\u0026 curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \\\n      \u0026\u0026 curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \\\n            sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \\\n            sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list\n\nsudo apt-get update\nsudo apt-get install -y nvidia-docker2\nsudo systemctl restart docker\n```\n\n### Pull the repo and the docker container.  \nWarning: this will download around 7GB. This program has many dependencies that makes it huge.\n\n```bash\ngit clone https://github.com/kiyoon/nvim-hand-gesture\ndocker pull kiyoon/nvim-hand-gesture\n```\n\n### Before testing with Neovim, see if the program works.\n\n\n```bash\n# You may need to change the variables\nWEBCAM=/dev/video0\nREPO_PATH=~/nvim-hand-gesture\ndocker run --gpus all --rm -it \\\n    --device=$WEBCAM:/dev/video0 \\\n    -v \"$REPO_PATH\":/workspace kiyoon/nvim-hand-gesture\n```\n\nTo enable the GUI demo,\n```bash\nxhost +local:docker\ndocker run --gpus all --rm -it \\\n    --device=$WEBCAM:/dev/video0 \\\n    -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix \\\n    -v \"$REPO_PATH\":/workspace kiyoon/nvim-hand-gesture --gui\n```\n\n### Once you saw it working, make vim bindings.\n\n```vim\n\" With GUI demo\nnmap \u003cleader\u003eG \u003cCmd\u003ecall system(\"docker run --gpus all --rm --device=/dev/video0:/dev/video0 -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix -v ~/project/nvim-hand-gesture:/workspace -v /run/user:/run/user kiyoon/nvim-hand-gesture --gui --nvim_socket_path \" . v:servername . \" \u0026\")\u003cCR\u003e\n\" Without GUI\nnmap \u003cleader\u003eg \u003cCmd\u003ecall system(\"docker run --gpus all --rm --device=/dev/video0:/dev/video0 -v ~/project/nvim-hand-gesture:/workspace -v /run/user:/run/user kiyoon/nvim-hand-gesture --nvim_socket_path \" . v:servername . \" \u0026\")\u003cCR\u003e\n\" Quit running process\nnmap \u003cleader\u003e\u003cleader\u003eg \u003cCmd\u003elet g:quit_nvim_hand_gesture = 1\u003cCR\u003e\n```\n\nNote that you need to remove `-it` option, and may change the webcam device and nvim-hand-gesture repo path to the correct one.  \n`-v /run/user` mount is because Neovim's `v:servername` is usually `/run/user/$USER/nvim.$pid.0`. It may depend on the system.  \n\n## Customisation\n\nChange lua files in [gesture_mappings](./gesture_mappings) to your likings. If the action is in [persistent_gestures.txt](./persistent_gestures.txt), the lua script will keep being executed until you stop that action. If not, it will only be executed once and be ignored for the rest of the duration.\n\n### Setup tips\n\nYou may not want to make a gesture command intrusive to your original neovim workflow. To make it as practical as possible, try to avoid moving your cursor or amending text.\n\nInstead, some example use cases include:  \n- Opening / closing a side bar (e.g. nvim-tree) without focussing on it\n- Opening a floating window (e.g. peek function definition).\n- Adjusting size of splits\n\nI'd be happy if anyone shares their own use cases and good sets of defaults!\n\n\n## Acknowledgement\n\nThis is a porting of [TSM demo](https://github.com/mit-han-lab/temporal-shift-module/tree/master/online_demo) in order to use it to control Neovim.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiyoon%2Fnvim-hand-gesture","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkiyoon%2Fnvim-hand-gesture","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkiyoon%2Fnvim-hand-gesture/lists"}