{"id":20121759,"url":"https://github.com/bus-stop/x-terminal","last_synced_at":"2025-05-06T16:32:13.992Z","repository":{"id":37049981,"uuid":"114833063","full_name":"bus-stop/x-terminal","owner":"bus-stop","description":"An xterm based Atom plugin for providing terminals inside your Atom workspace.","archived":false,"fork":false,"pushed_at":"2025-02-15T21:58:26.000Z","size":46365,"stargazers_count":39,"open_issues_count":20,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T14:13:36.000Z","etag":null,"topics":["atom","console","emulator","pty","shell","term","terminal","tty","xterm"],"latest_commit_sha":null,"homepage":"https://atom.io/packages/x-terminal","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bus-stop.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-12-20T02:23:32.000Z","updated_at":"2024-05-31T19:36:35.000Z","dependencies_parsed_at":"2023-10-17T12:15:00.650Z","dependency_job_id":"c6d8c333-9878-4100-8bb2-7a742fff753f","html_url":"https://github.com/bus-stop/x-terminal","commit_stats":null,"previous_names":[],"tags_count":171,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bus-stop%2Fx-terminal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bus-stop%2Fx-terminal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bus-stop%2Fx-terminal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bus-stop%2Fx-terminal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bus-stop","download_url":"https://codeload.github.com/bus-stop/x-terminal/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252721083,"owners_count":21793748,"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":["atom","console","emulator","pty","shell","term","terminal","tty","xterm"],"created_at":"2024-11-13T19:32:18.401Z","updated_at":"2025-05-06T16:32:12.945Z","avatar_url":"https://github.com/bus-stop.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"                  ██╗  ██╗  ████████╗███████╗██████╗ ███╗   ███╗██╗███╗   ██╗ █████╗ ██╗     \n                  ╚██╗██╔╝  ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██║████╗  ██║██╔══██╗██║     \n                   ╚███╔╝█████╗██║   █████╗  ██████╔╝██╔████╔██║██║██╔██╗ ██║███████║██║     \n                   ██╔██╗╚════╝██║   ██╔══╝  ██╔══██╗██║╚██╔╝██║██║██║╚██╗██║██╔══██║██║     \n                  ██╔╝ ██╗     ██║   ███████╗██║  ██║██║ ╚═╝ ██║██║██║ ╚████║██║  ██║███████╗\n                  ╚═╝  ╚═╝     ╚═╝   ╚══════╝╚═╝  ╚═╝╚═╝     ╚═╝╚═╝╚═╝  ╚═══╝╚═╝  ╚═╝╚══════╝\n\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/bus-stop/x-terminal/actions?query=workflow%3ACI\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/workflow/status/bus-stop/x-terminal/CI?style=flat-square\u0026logo=github\u0026label=CI%20status\" alt=\"actions status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/bus-stop/x-terminal/tags\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/tag/bus-stop/x-terminal.svg?label=current%20version\u0026style=flat-square\" alt=\"version\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/bus-stop/x-terminal/stargazers\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/stars/bus-stop/x-terminal.svg?style=flat-square\" alt=\"stars\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/bus-stop/x-terminal/network\"\u003e\n    \u003cimg src=\"https://img.shields.io/github/forks/bus-stop/x-terminal.svg?style=flat-square\" alt=\"forks\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://david-dm.org/bus-stop/x-terminal\"\u003e\n    \u003cimg src=\"https://img.shields.io/david/dev/bus-stop/term.js.svg?label=dependencies\u0026style=flat-square\" alt=\"dependencies\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://david-dm.org/bus-stop/x-terminal?type=dev\"\u003e\n    \u003cimg src=\"https://img.shields.io/david/dev/bus-stop/term.js.svg?label=devdependencies\u0026style=flat-square\" alt=\"dependencies\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\u003ch3 align=\"center\"\u003e\n  An xterm based Atom plugin for providing terminals inside your Atom workspace!\u0026nbsp;❤️\n\u003c/h3\u003e\n\u003ch5 align=\"center\"\u003eA fork of\n  \u003ca href=\"https://atom.io/packages/atom-xterm\"\u003eatom.io/packages/atom-xterm\u003c/a\u003e\n\u003c/h5\u003e\n\u003ch5 align=\"center\"\u003e\n  \u003ca href=\"https://atom.io/packages/x-terminal\"\u003eatom.io packages x-terminal\u003c/a\u003e\n\u003c/h5\u003e\n\u003cbr\u003e\n\n## Updates\n\n1. Updated dependencies\n   - xterm v4 introduced new plugins\n   - faster performance with webgl\n2. Themes\n   - Easily change terminal colors in settings\n3. Font Family\n   - Change font family in settings\n4. PlatformIO IDE API\n   - Works with packages that consume the `platformioIDETerminal` service\n\n![X-Terminal demo](https://cdn.statically.io/gh/bus-stop/x-terminal/master/resources/x-terminal-demo.gif)\n\n## Atom Feature Request for a Built in Terminal\n\nIf you're reading this and you would rather see Atom have a built-in terminal\nby default, please go over to the built-in terminal feature request thread\n[here](https://github.com/atom/atom/issues/14490), give it a thumbs up, **and**\ngive an explanation as to why you need a built-in terminal in Atom by default.\n\n# Installation\n\nGo to \u003chttps://atom.io/packages/x-terminal\u003e and click install, or search for\nthe *x-terminal* package via Atom's package manager. It can also be installed\nvia command-line with the [apm](https://github.com/atom/apm) command.\n\n```sh\napm install x-terminal\n```\n\n## Opening Terminals\n\nTo open terminals, you can open them through the menu or through the available key bindings.\n\n![X-Terminal menu](https://cdn.statically.io/gh/bus-stop/x-terminal/master/resources/x-terminal-packages-menu.png)\n\nSee [the available key bindings](https://github.com/bus-stop/x-terminal/blob/master/keymaps/x-terminal.json) for the x-terminal package.\n\nThere's also menu items available for opening terminals via right clicking on a\ntext editor or on a terminal.\n\nFinally, terminal tabs are automatically reopened at the spot you placed them\nwhen you last exited Atom.\n\n## Active Terminal\n\nThe active terminal is the terminal that will be used when sending commands to\nthe terminal with commands like `x-terminal:insert-selected-text` and\n`x-terminal:run-selected-text`\n\nThe active terminal will always have an astrix (`*`) in front of the title.\nBy default when a terminal is hidden it becomes inactive and the last used\nvisible terminal will become active. If there are no visible terminals none are\nactive.\n\nThe `Allow Hidden Terminal To Stay Active` setting will change the\ndefault behavior and keep a terminal that is hidden active until another\nterminal is focused.\n\n## Organizing Terminals\n\nTo quickly organize your terminal tabs, simply use the main menu. You can also\nfind menu items by right-clicking on a terminal to organize your terminals.\n\nAnd of course, there's the old fashion way of just moving the tabs where you\nwant them. Feel free to place your terminal tabs anywhere in your workspace to\ninclude any of the docks.\n\n![X-Terminal moving terminals demo](https://cdn.statically.io/gh/bus-stop/x-terminal/master/resources/x-terminal-moving-terminals-demo.gif)\n\n## Profiles\n\nThe x-terminal package supports saving and loading profiles. What this allows\nyou to do is save commonly used commands and settings for later use.\n\n![X-Terminal profiles demo](https://cdn.statically.io/gh/bus-stop/x-terminal/master/resources/x-terminal-profiles-demo.gif)\n\n## Notifications\n\nThe x-terminal package provides notifications about terminal process exit\nsuccesses and failures. Notifications will appear in Atom's own notification\nmanager as well as on the terminal tab triggering the notification.\n\nSuccess\n\n![X-Terminal exit success](https://cdn.statically.io/gh/bus-stop/x-terminal/master/resources/x-terminal-exit-success.png)\n\nFailure\n\n![X-Terminal exit failure](https://cdn.statically.io/gh/bus-stop/x-terminal/master/resources/x-terminal-exit-failure.png)\n\nThere are also activity notifications for terminal tabs not in focus.\n\n![X-Terminal activity notification](https://cdn.statically.io/gh/bus-stop/x-terminal/master/resources/x-terminal-activity-notification.gif)\n\n## Services\n\nFor plugin writers, the `x-terminal` package supports three services, `terminal`, `atom-xterm`, and `platformioIDETerminal`, which\ncan be used to easily open terminals. These methods are provided using Atom's [services](http://flight-manual.atom.io/behind-atom/sections/interacting-with-other-packages-via-services/)\nAPI.\n\nTo use a service, add a consumer method to consume the service, or\nrather a JavaScript object that provides methods to open terminals and run commands.\n\n### 'terminal' service v1.0.0\n\nThe `terminal` service provides an object with `updateProcessEnv`, `run`, `getTerminalViews`, and `open` methods.\n\nAs an example on how to use the provided `run()` method, your\n`package.json` should have the following.\n\n```json\n{\n  \"consumedServices\": {\n    \"terminal\": {\n      \"versions\": {\n        \"^1.0.0\": \"consumeTerminalService\"\n      }\n    }\n  }\n}\n```\n\nYour package's main module should then define a `consumeTerminalService`\nmethod, for example.\n\n```js\nimport { Disposable } from 'atom'\n\nexport default {\n  terminalService: null,\n\n  consumeTerminalService (terminalService) {\n    this.terminalService = terminalService\n    return new Disposable(() =\u003e {\n      this.terminalService = null\n    })\n  },\n\n  // . . .\n}\n```\n\nOnce the service is consumed, use the `run()` method that is provided\nby the service, for example.\n\n```js\n// Launch `somecommand --foo --bar --baz` in a terminal.\nthis.terminalService.run([\n   'somecommand --foo --bar --baz'\n])\n```\n\n### 'atom-xterm' service v2.0.0\n\nThe `atom-xterm` service provides the\n[openTerminal()](https://github.com/bus-stop/x-terminal/blob/42ddb71523a393178cacabca17b38d681b87f292/src/x-terminal.js#L262) method. The `openTerminal()` method behaves just like Atom's\n[open()](https://github.com/atom/atom/blob/917a00e195b93c8c2a9adc349fd8fa1844f61dbc/src/workspace.js#L1076)\nmethod except that the first argument must be a JSON object describing the\nterminal profile that should be opened. Docs about this JSON object can be\nfound [here](https://github.com/bus-stop/x-terminal/blob/42ddb71523a393178cacabca17b38d681b87f292/src/config.js#L25).\n\nAs an example on how to use the provided `openTerminal()` method, your\n`package.json` should have the following.\n\n```json\n{\n  \"consumedServices\": {\n    \"atom-xterm\": {\n      \"versions\": {\n        \"^2.0.0\": \"consumeAtomXtermService\"\n      }\n    }\n  }\n}\n```\n\nYour package's main module should then define a `consumeAtomXtermService`\nmethod, for example.\n\n```js\nimport { Disposable } from 'atom'\n\nexport default {\n  atomXtermService: null,\n\n  consumeAtomXtermService (atomXtermService) {\n    this.atomXtermService = atomXtermService\n    return new Disposable(() =\u003e {\n      this.atomXtermService = null\n    })\n  },\n\n  // . . .\n}\n```\n\nOnce the service is consumed, use the `openTerminal()` method that is provided\nby the service, for example.\n\n```js\n// Launch `somecommand --foo --bar --baz` in a terminal.\nthis.atomXtermService.openTerminal({\n  command: 'somecommand',\n  args: [\n    '--foo',\n    '--bar',\n    '--baz'\n  ]\n})\n```\n\n### 'platformioIDETerminal' service v1.1.0\n\nThe `platformioIDETerminal` service provides an [object](https://github.com/bus-stop/x-terminal/blob/42ddb71523a393178cacabca17b38d681b87f292/src/x-terminal.js#L365) with `updateProcessEnv`, `run`, `getTerminalViews`, and `open` methods.\n\nAs an example on how to use the provided `run()` method, your\n`package.json` should have the following.\n\n```json\n{\n  \"consumedServices\": {\n    \"platformioIDETerminal\": {\n      \"versions\": {\n        \"^1.1.0\": \"consumePlatformioIDETerminalService\"\n      }\n    }\n  }\n}\n```\n\nYour package's main module should then define a `consumePlatformioIDETerminalService`\nmethod, for example.\n\n```js\nimport { Disposable } from 'atom'\n\nexport default {\n  platformioIDETerminalService: null,\n\n  consumePlatformioIDETerminalService (platformioIDETerminalService) {\n    this.platformioIDETerminalService = platformioIDETerminalService\n    return new Disposable(() =\u003e {\n      this.platformioIDETerminalService = null\n    })\n  },\n\n  // . . .\n}\n```\n\nOnce the service is consumed, use the `run()` method that is provided\nby the service, for example.\n\n```js\n// Launch `somecommand --foo --bar --baz` in a terminal.\nthis.platformioIDETerminalService.run([\n   'somecommand --foo --bar --baz'\n])\n```\n\n# Development\n\nWant to help develop x-terminal? Here's how to quickly get setup.\n\nFirst use the [apm](https://github.com/atom/apm) command to clone the\n[x-terminal repo](https://github.com/bus-stop/x-terminal).\n\n```sh\napm develop x-terminal\n```\n\nThis should clone the x-terminal package into the `$HOME/github/x-terminal`\ndirectory. Go into this directory and install its dependencies.\n\n```sh\ncd $HOME/github/x-terminal\nnpm install\n```\n\nYou shouldn't need to rebuild any [node-pty](https://github.com/Tyriar/node-pty)\nsince they are pre-compiled, however in the event they aren't available,\nyou can rebuild them with:\n\n```sh\napm rebuild\n```\n\nFinally, open this directory in Atom's dev mode and hack away.\n\n```sh\natom --dev\n```\n\nThere's a test suite available for automated testing of the x-terminal package.\nSimply go to `View \u003e Developer \u003e Run Package Specs` in Atom's main menu or\nuse the hotkey. You can run the full test suite (which includes running lint\ntools) via command-line by running `npm run test` inside the x-terminal\ndirectory.\n\nVarious lint tools are being used to keep the code \"beautified\". To run only\nthe lint tools, simply run `npm run lint`.\n\n## Pull Requests\n\nWhenever you're ready to submit a pull request, be sure to submit it\nagainst a fork of the main [x-terminal repo](https://github.com/bus-stop/x-terminal)\nmaster branch that you'll own. Fork the repo using Github and make note of the\nnew `git` URL. Set this new git URL as the URL for the `origin` remote in your\nalready cloned git repo is follows.\n\n```sh\ngit remote set-url origin ${NEW_GIT_URL}\n```\n\nEnsure your new changes passes the test suite by running `npm run test`.\nAfterwards, push your changes to your repo and then use Github to submit a new\npull request.\n\n## [xterm.js](https://github.com/xtermjs/xterm.js)\n\nThe terminals that users interact with in this package is made possible with\nmajor help from the [xterm.js](https://github.com/xtermjs/xterm.js) library. As\nsuch, often times it's necessary to make changes to xterm.js in order to fix\nsome bug or implement new features.\n\nIf you want to work on xterm.js for the benefit of a bug fix or feature to be\nsupported in x-terminal, here's how you can quickly get setup.\n\nFirst make a fork of [xterm.js](https://github.com/xtermjs/xterm.js). Next,\nclone your newly created fork as follows.\n\n```sh\ngit clone ${YOUR_XTERMJS_FORK} ${HOME}/github/xterm.js\n```\n\nGo into your newly cloned repo for xterm.js.\n\n```sh\ncd ${HOME}/github/xterm.js\n```\n\nInstall all needed dependencies.\n\n```sh\nnpm install\n```\n\nBuild xterm.js.\n\n```sh\nnpm run build\n```\n\nEnsure the test suite passes.\n\n```sh\nnpm run test\nnpm run lint\n```\n\nAdd a global link for xterm.js to your system.\n\n```sh\nnpm link\n```\n\nInside your x-terminal directory, link against the global `xterm` link.\n\n```sh\ncd ${HOME}/github/x-terminal\nnpm link xterm\n```\n\nFinally, perform a rebuild with the [apm](https://github.com/atom/apm) program\ninside the x-terminal directory.\n\n```sh\napm rebuild\n```\n\nYou're all set for developing xterm.js. Hack away in your xterm.js directory,\nrun `npm run build`, then reload your Atom window to see the changes to your\nterminals.\n\n# Credits and Legal\n\nClick for copyright and license info about this package.\n\n[![LICENSE and © INFO](https://img.shields.io/badge/©%20\u0026#38;%20LICENSE-MIT-blue.svg?longCache=true\u0026style=flat-square)](LICENSE)\n\n# Feedback\n\nNeed to submit a bug report? Have a new feature you want to see implemented in\n*x-terminal*? Please feel free to submit them through the appropriate\n[issue template](https://github.com/bus-stop/x-terminal/issues/new/choose).\n\nFor bug reports, please provide images or demos showing your issues if you can.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbus-stop%2Fx-terminal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbus-stop%2Fx-terminal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbus-stop%2Fx-terminal/lists"}