{"id":13570870,"url":"https://github.com/daipeihust/im-select","last_synced_at":"2025-05-16T05:04:33.320Z","repository":{"id":39109212,"uuid":"135247346","full_name":"daipeihust/im-select","owner":"daipeihust","description":"📟 Switch your input method through terminal","archived":false,"fork":false,"pushed_at":"2024-05-25T08:30:24.000Z","size":25670,"stargazers_count":1106,"open_issues_count":25,"forks_count":76,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-08T15:06:13.869Z","etag":null,"topics":["im","keyboard-layout","linux","mac","terminal","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","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/daipeihust.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":"support_me.jpeg","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["daipeihust"],"patreon":"daipeihust","open_collective":"daipeihust","ko_fi":"daipeihust","tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2018-05-29T05:52:30.000Z","updated_at":"2025-04-08T02:52:06.000Z","dependencies_parsed_at":"2024-10-24T17:07:08.306Z","dependency_job_id":null,"html_url":"https://github.com/daipeihust/im-select","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daipeihust%2Fim-select","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daipeihust%2Fim-select/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daipeihust%2Fim-select/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daipeihust%2Fim-select/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daipeihust","download_url":"https://codeload.github.com/daipeihust/im-select/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254471060,"owners_count":22076585,"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":["im","keyboard-layout","linux","mac","terminal","windows"],"created_at":"2024-08-01T14:00:55.928Z","updated_at":"2025-05-16T05:04:28.665Z","avatar_url":"https://github.com/daipeihust.png","language":"C++","funding_links":["https://github.com/sponsors/daipeihust","https://patreon.com/daipeihust","https://opencollective.com/daipeihust","https://ko-fi.com/daipeihust"],"categories":["C++"],"sub_categories":[],"readme":"# Welcome to **im-select** 👋\n\n\n![image](https://user-images.githubusercontent.com/13344830/232276894-f84ee7d9-091e-40dd-8ad4-0b8840456a58.png)\n\n\n\n\u003cdiv align=\"center\"\u003e\nSwitch your input method in shell. This project is a basic support for VSCodeVim. It provides the command line program for VSCodeVim's autoSwitchIM function.   \n\n\u0026nbsp;\n\n![](https://img.shields.io/badge/Author-daipeihust-blue)\n![GitHub repo size](https://img.shields.io/github/repo-size/daipeihust/im-select)\n![GitHub repo file count](https://img.shields.io/github/directory-file-count/daipeihust/im-select)\n![GitHub release (by tag)](https://img.shields.io/github/downloads/daipeihust/im-select/1.0.1/total)\n![GitHub issues](https://img.shields.io/github/issues/daipeihust/im-select)\n![GitHub](https://img.shields.io/github/license/daipeihust/im-select)\n![GitHub release (latest by date)](https://img.shields.io/github/v/release/daipeihust/im-select)\n![GitHub commit activity](https://img.shields.io/github/commit-activity/y/daipeihust/im-select)\n![GitHub contributors](https://img.shields.io/github/contributors/daipeihust/im-select)\n![GitHub last commit](https://img.shields.io/github/last-commit/daipeihust/im-select)\n![GitHub Discussions](https://img.shields.io/github/discussions/daipeihust/im-select)\n![GitHub Repo stars](https://img.shields.io/github/stars/daipeihust/im-select?style=social)\n\n\u003c/div\u003e\n\n\u0026nbsp;\n\n[English](./README.md) | [简体中文](./README_CN.md)\n\n\n## Prerequisites\n\n- using [VSCodeVim](https://github.com/VSCodeVim/Vim)\n- have a Mac/Windows/Linux device\n- download [git-bash](https://gitforwindows.org/)(if you on windows)\n- know how to use [shell](https://zh.wikipedia.org/wiki/Unix_shell)\n\n## Install\n\n### macOS\n\n#### Homebrew\n\n```shell\nbrew tap daipeihust/tap\nbrew install im-select\n```\n\nOr you can run following command in your console:\n\n```shell\ncurl -Ls https://raw.githubusercontent.com/daipeihust/im-select/master/install_mac.sh | sh\n```\n\nThe im-select program will be downloaded to your `/usr/local/bin/` path.\n\n### windows\n\nDownload the [im-select.exe](https://github.com/daipeihust/im-select/raw/master/win/out/x86/im-select.exe), and move it to the proper path.(If you need the 64 bit version, you can download [this one](https://github.com/daipeihust/im-select/raw/master/im-select-win/out/x64/im-select.exe).)\n\n### linux\n\nYou don't have to install this for linux. linux have tools to switch input methods\n\n## Usage\n\n## macOS\nIf your PATH contains `/usr/local/bin`, you can just use `im-select` instead of `/usr/local/bin/im-select`\n### To get current input method key\n```shell\n/usr/local/bin/im-select\n```\n### To switch current input method\n```shell\n/usr/local/bin/im-select imkey\n```\nFor example `/usr/local/bin/im-select com.apple.keylayout.US`\n\n## linux\n\n### ibus\n\n[@mengbo](https://github.com/mengbo) provided this configuration for ibus\n\n```\n\"vim.autoSwitchInputMethod.enable\": true,\n\"vim.autoSwitchInputMethod.defaultIM\": \"xkb:us::eng\",\n\"vim.autoSwitchInputMethod.obtainIMCmd\": \"/usr/bin/ibus engine\",\n\"vim.autoSwitchInputMethod.switchIMCmd\": \"/usr/bin/ibus engine {im}\"\n```\n\n### xkb-switch\n\n[@VEL4EG](https://github.com/VEL4EG) provided this configuration for xkb-switch\n\n```\n\"vim.autoSwitchInputMethod.enable\": true,\n\"vim.autoSwitchInputMethod.defaultIM\": \"us\",\n\"vim.autoSwitchInputMethod.obtainIMCmd\": \"/usr/local/bin/xkb-switch\",\n\"vim.autoSwitchInputMethod.switchIMCmd\": \"/usr/local/bin/xkb-switch -s {im}\"\n```\n\n### fcitx\n\n[@yunhao94](https://github.com/yunhao94) provided this configuration for fcitx\n\n```\n\"vim.autoSwitchInputMethod.enable\": true,\n\"vim.autoSwitchInputMethod.defaultIM\": \"1\",\n\"vim.autoSwitchInputMethod.obtainIMCmd\": \"/usr/bin/fcitx-remote\",\n\"vim.autoSwitchInputMethod.switchIMCmd\": \"/usr/bin/fcitx-remote -t {im}\",\n```\n\n### gdbus\n\n[@d-r-q](https://github.com/d-r-q) provide this configuration for gdbus\n\nPut `gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval \"imports.ui.status.keyboard.getInputSourceManager().currentSource.index\" | awk -F'[^0-9]*' '{print $2}'` into get-im.sh.\n\nPut `gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval \"imports.ui.status.keyboard.getInputSourceManager().inputSources[$1].activate()\"` into set-im.sh.\n\n```\n\"vim.autoSwitchInputMethod.enable\": true,\n\"vim.autoSwitchInputMethod.defaultIM\": \"0\",\n\"vim.autoSwitchInputMethod.obtainIMCmd\": \"\u003cpath to get-im.sh\u003e\",\n\"vim.autoSwitchInputMethod.switchIMCmd\": \"\u003cpath to set-im.sh\u003e {im}\",\n```\n\n### qdbus (KDE)\n\n[@igorechek06](https://igorek.dev) provided this configuration for qdbus\n\n```\n\"vim.autoSwitchInputMethod.enable\": true,\n\"vim.autoSwitchInputMethod.defaultIM\": \"0\",\n\"vim.autoSwitchInputMethod.obtainIMCmd\": \"/usr/bin/qdbus org.kde.keyboard /Layouts getLayout\",\n\"vim.autoSwitchInputMethod.switchIMCmd\": \"/usr/bin/qdbus org.kde.keyboard /Layouts setLayout {im}\",\n```\n\n## windows\nThe im-select.exe is command line program, but it can't work in cmd or powershell. It's microsoft's bug, the keyboard API doesn't support in cmd and powershell. I recommend you git-bash.\n\n\u003e Note: The git-bash is not required. It's only used to get current input method key, which needed in VSCodeVim's configuration.\n\n## Run tests\n\n### To get current keyboard locale\n\n```shell\n/path/to/im-select.exe\n```\n\n### To switch current keyboard locale\n\n```shell\n/path/to/im-select.exe locale\n```\n\n\u003e Note: The path in windows is like: C:\\Users\\path\\to\\file\n\n## Author\n\n\u003ca href=\"https://github.com/daipeihust\"\u003e\u003cimg width='50px' height='50px' src=\"https://avatars.githubusercontent.com/u/13344830?\u0026v=4\"\u003e\u003c/a\u003e\n\u003ca href=\"https://github.com/liwanwhu\"\u003e\u003cimg width='50px' height='50px' src=\"https://avatars.githubusercontent.com/u/22877659?v=4\"\u003e\u003c/a\u003e \n \n\n## 🤝 Contributing\n\nIf you find some issues, welcome to create pull request!\n\n## Show your support\n\nGive a ⭐️ if this project helped you!\n\nBuy me a coffee, if you like it! If you have any problems, you can contact me via email!\n\n\u003cdiv align=\"left\"\u003e\n    \u003cimg src=\"contact_me.jpeg\" height=\"300\"\u003e\n    \u003cimg src=\"support_me.jpeg\" height=\"300\"\u003e\n\u003c/div\u003e\n\n## 📝 License\n\nThis project is licensed under the terms of the MIT license.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaipeihust%2Fim-select","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaipeihust%2Fim-select","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaipeihust%2Fim-select/lists"}