{"id":18010181,"url":"https://github.com/p-e-w/shin","last_synced_at":"2025-04-07T15:09:20.644Z","repository":{"id":62052297,"uuid":"542437373","full_name":"p-e-w/shin","owner":"p-e-w","description":"A shell in every text input on your system","archived":false,"fork":false,"pushed_at":"2024-04-07T14:40:03.000Z","size":58,"stargazers_count":283,"open_issues_count":9,"forks_count":12,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-31T12:09:13.871Z","etag":null,"topics":["ibus","input-method","linux","shell"],"latest_commit_sha":null,"homepage":"","language":"Go","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/p-e-w.png","metadata":{"files":{"readme":"README.md","changelog":"history.go","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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-28T06:18:10.000Z","updated_at":"2025-03-23T00:11:11.000Z","dependencies_parsed_at":"2024-06-20T03:01:54.116Z","dependency_job_id":"ca300b49-4c89-4dc0-81e2-0e887ae0bd1a","html_url":"https://github.com/p-e-w/shin","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/p-e-w%2Fshin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-e-w%2Fshin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-e-w%2Fshin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/p-e-w%2Fshin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/p-e-w","download_url":"https://codeload.github.com/p-e-w/shin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247675597,"owners_count":20977376,"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":["ibus","input-method","linux","shell"],"created_at":"2024-10-30T02:13:15.215Z","updated_at":"2025-04-07T15:09:20.624Z","avatar_url":"https://github.com/p-e-w.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# Shin: Shell input method\n\nShin lets you run shell commands anywhere you can type text. Watch this:\n\n![Screencast](https://user-images.githubusercontent.com/2702526/197121193-1ec1956b-06d4-45bd-b145-b4c4aa82cf67.gif)\n\n**This works in almost every Linux application,** including Firefox, Chrome,\nLibreOffice, all GTK and Qt applications, and many more. The possibilities\nare endless as static editing and dynamic evaluation become one.\n\nShin stays completely out of your way until you press the magic key that\nbrings it to life. When not in use, Shin consumes *zero* CPU time and memory.\nI despise software that wastes computing resources, and Shin is designed\naccordingly.\n\nReady to give it a try?\n\n\n## Installation\n\nInstalling Shin is a painless procedure on most Linux distributions.\n\n### Step 1: Set up IBus\n\nShin is implemented as an [IBus](https://github.com/ibus/ibus) input engine.\nBefore Shin can be installed, IBus must be installed and configured.\n\n**If you use GNOME, you can skip this step,** because the GNOME desktop comes\nwith a fully configured IBus installation out of the box.\n\nOn KDE, it usually suffices to install any IBus input method (e.g. Typing Booster)\nfrom the KDE Software Center, after which you will be prompted to switch to\nIBus as the system input method. After logging out and back in, you should\nbe ready to go.\n\nFor other desktop environments and window managers, the setup may involve\nmanually installing the IBus daemon, and setting environment variables.\nSee [this ArchWiki article](https://wiki.archlinux.org/title/IBus) for more\ninformation.\n\n**Before filing an issue of the type \"Shin is not working!\", please verify\nthat you have a functioning IBus setup.** You can do this by trying out any\nother IBus input method, such as Typing Booster or Pinyin.\n\n### Step 2: Install Shin\n\nMake sure you have [Go](https://go.dev/), a C compiler, Make, and Git.\nThen run:\n\n```\ngit clone https://github.com/p-e-w/shin.git\ncd shin\nmake\nsudo make install\nibus restart\n```\n\n*__Note 1:__ Occasionally, `ibus restart` fails to actually restart IBus.\nIn that case, you have to restart the IBus daemon manually, or simply\nrestart your system.*\n\n*__Note 2:__ The above commands assume that your IBus installation is located\nin `/usr/share`. In the vast majority of cases, this is correct. If you have\ninstalled IBus elsewhere, you must run both `make` and `make install` with\nthe `IBUS_INSTALL_DIR` variable set to the actual location, e.g.\n`make IBUS_INSTALL_DIR=/usr/share`.*\n\n### Step 3: Make Shin activatable\n\nThe Shin input engine is intended to be activated using a hotkey, and\nautomatically deactivates itself after a shell command has been entered.\nThis allows for normal text editing to continue without having to manually\nswitch back to the default input method.\n\nFor this reason, **it is not recommended to add Shin to the desktop's\ninput method switcher.**\n\nInstead, simply bind the command `ibus engine shin` to a global keyboard\nshortcut such as \u003ckbd\u003eAlt\u003c/kbd\u003e+\u003ckbd\u003eSpace\u003c/kbd\u003e. On GNOME, this can be done\nusing *Settings \u003e Keyboard \u003e View and Customize Shortcuts \u003e Custom Shortcuts*.\nOn KDE, *System Settings \u003e Shortcuts \u003e Custom Shortcuts* does the same thing.\nFor other desktop environments and window managers, see the appropriate\ndocumentation.\n\nThat's it! Shin is now just a keypress away whenever you need it.\n\n\n## The `shin/bin` directory\n\nIf you use Shin frequently, it's quite natural to want to define custom commands\nfor inserting commonly needed text. For example, you might like to have a\n`sig` command that inserts a signature with your name and address for use in\nemails and online discussions.\n\nOf course, you could just create a shell script which prints that text, and place\nit in any of the directories in the shell's search path. But then `sig` would\nalso be available in regular interactive shells, and you probably don't want to\npollute your global command namespace with Shin-specific commands. You may also\nwish to override some of the standard commands in Shin, *but only* in Shin.\n\nTo solve these problems, Shin prepends the directory `$XDG_CONFIG_HOME/shin/bin`\n(which usually expands to `~/.config/shin/bin`) to the shell's search path when\nrunning commands. To define Shin-specific commands, simply create that directory,\nand drop executable scripts with the desired names there. They will be available\nin Shin, without affecting the behavior of the shell anywhere else.\n\n\n## Security considerations\n\nBy design, Shin turns every text input on your system into a basic terminal\nemulator with full shell access. This shouldn't be a problem under normal\ncircumstances, since anyone with unsupervised access to your computer can just\nlaunch a terminal anyway, but in some situations, such as a system running in\n\"kiosk mode\", extra caution may be warranted.\n\nMost screen locking applications explicitly disable input methods, but if you\nuse a non-standard screen locker, you should verify that Shin cannot be\naccessed from the lock screen inputs, because that would create a trivial way\nto bypass the lock by running a shell command that kills the lock screen process.\n\nTo the best of my knowledge, web browsers do not allow JavaScript code to\nsynthesize the low-level input events needed to control an IME. I therefore\nbelieve that Shin is safe to use in browser inputs, even on untrusted websites.\nA carefully designed website might however use concealed inputs and fake\ninput overlays to trick you into thinking that you have typed something\ndifferent from what you actually did. This represents a rather low security\nrisk though, since the site still cannot *control* which commands are entered\nand executed.\n\n\n## Acknowledgments\n\nShin depends on the [xdg](https://github.com/adrg/xdg),\n[go-sqlite3](https://github.com/mattn/go-sqlite3), and\n[dbus](https://github.com/godbus/dbus) Go packages,\nas well as on\n[BambooEngine's fork](https://github.com/BambooEngine/goibus)\nof the goibus package (the only fork with proper Wayland support).\n\nThis project was my first encounter with IBus, a system that in practice\nis used almost exclusively for typing East Asian scripts. I was pleasantly\nsurprised to find that IBus is flexible enough to support a use case like\nShin, which it was obviously not intended for and yet able to accommodate.\nMy respect goes to the creators of IBus for their clean and versatile design.\n\n\n## License\n\nCopyright \u0026copy; 2022  Philipp Emanuel Weidmann (\u003cpew@worldwidemann.com\u003e)\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttps://www.gnu.org/licenses/\u003e.\n\n**By contributing to this project, you agree to release your\ncontributions under the same license.**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-e-w%2Fshin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fp-e-w%2Fshin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fp-e-w%2Fshin/lists"}