<p align="center">
<a href="https://github.com/starship/starship">Starship</a> cross-shell prompt in xonsh shell.
<br><br>
<img src="https://repository-images.githubusercontent.com/345190141/5ab8de00-7ed9-11eb-8545-3582ec7e054a">
</p>
<p align="center">
If you like the idea click ⭐ on the repo and <a href="https://twitter.com/intent/tweet?text=Nice%20prompt%20for%20the%20xonsh%20shell!&url=https://github.com/anki-code/xontrib-xontrib-prompt-starship" target="_blank">tweet</a>.
</p>
Additional features:
* You can split the prompt to left, right and bottom parts.
## Installation
To install use pip:
```bash
# You already have Starship installed. Then:
xpip install xontrib-prompt-starship
# or: xpip install -U git+https://github.com/anki-code/xontrib-prompt-starship
```
## Usage
```bash
xontrib load prompt_starship
```
## Recommendation
We suggest to use `@` character to remember about [you're using xonsh syntax](https://github.com/anki-code/xonsh-cheatsheet/blob/main/README.md#three-most-frequent-things-that-newcomers-overlook) and to potentially [spread the word about xonsh](https://github.com/xonsh/xonsh#the-xonsh-shell-community) if you make a screenshot or show your terminal to friends or collegues:
```ini
mkdir -p ~/.config/ && echo @("""
[character]
success_symbol = "[@](bold green)"
error_symbol = "[@](bold red)"
""".strip()) > ~/.config/starship_xonsh.toml
$STARSHIP_CONFIG = '~/.config/starship_xonsh.toml'
xontrib load prompt_starship
```
## Configuration
You can set the different starship configs for left, right and bottom parts of prompt when your shell type is prompt-toolkit:
```python
$XONTRIB_PROMPT_STARSHIP_LEFT_CONFIG = "~/.config/starship_xonsh_left.toml"
$XONTRIB_PROMPT_STARSHIP_RIGHT_CONFIG = "~/.config/starship_xonsh_right.toml"
$XONTRIB_PROMPT_STARSHIP_BOTTOM_CONFIG = "~/.config/starship_xonsh_bottom.toml"
xontrib load prompt_starship
```
In case of [using starship as part of another prompt](https://github.com/anki-code/xontrib-prompt-bar#using-starship-cross-shell-prompt-to-rendering-right-sections) you can add starship prompt to `$PROMPT_FIELDS` without replacing the current prompt:
```python
$XONTRIB_PROMPT_STARSHIP_REPLACE_PROMPT = False
xontrib load prompt_starship
print($PROMPT_FIELDS['starship_left']())
```
[Prompt bar with starship](https://github.com/anki-code/xontrib-prompt-bar#using-starship-cross-shell-prompt-to-rendering-right-sections):
<img src="https://raw.githubusercontent.com/anki-code/xontrib-prompt-bar/master/static/xontrib-prompt-bar-starship.png" alt="Prompt bar with starship sections.">
## Known issues
* [Prompt toolkit issue: the right prompt at the bottom.](https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1241)
* The using of bottom toolbar is not properly tested and adopted to cute appearance.
## Credits
* The xontrib-prompt-starship can be used as part of [xontrib-prompt-bar](https://github.com/anki-code/xontrib-prompt-bar).
* This package is the part of [ergopack](https://github.com/anki-code/xontrib-ergopack) - the pack of ergonomic xontribs.
* This package was created with [xontrib cookiecutter template](https://github.com/xonsh/xontrib-cookiecutter).
* [Adding support for xonsh inside Starship](https://github.com/starship/starship/pull/2807)
Raw data
{
"_id": null,
"home_page": "https://github.com/anki-code/xontrib-prompt-starship",
"name": "xontrib-prompt-starship",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": "anki-code",
"author_email": "no@no.no",
"download_url": "https://files.pythonhosted.org/packages/34/5b/c858bebb3577b3d6b219ebec2398520b2a8976250790c7c40bf25f8cbf67/xontrib-prompt-starship-0.3.6.tar.gz",
"platform": "any",
"description": "<p align=\"center\">\n<a href=\"https://github.com/starship/starship\">Starship</a> cross-shell prompt in xonsh shell.\n<br><br>\n<img src=\"https://repository-images.githubusercontent.com/345190141/5ab8de00-7ed9-11eb-8545-3582ec7e054a\">\n</p>\n\n<p align=\"center\"> \nIf you like the idea click \u2b50 on the repo and <a href=\"https://twitter.com/intent/tweet?text=Nice%20prompt%20for%20the%20xonsh%20shell!&url=https://github.com/anki-code/xontrib-xontrib-prompt-starship\" target=\"_blank\">tweet</a>.\n</p>\n\nAdditional features:\n\n* You can split the prompt to left, right and bottom parts.\n\n## Installation\n\nTo install use pip:\n\n```bash\n# You already have Starship installed. Then:\nxpip install xontrib-prompt-starship\n# or: xpip install -U git+https://github.com/anki-code/xontrib-prompt-starship\n```\n\n## Usage\n\n```bash\nxontrib load prompt_starship\n```\n\n## Recommendation\n\nWe suggest to use `@` character to remember about [you're using xonsh syntax](https://github.com/anki-code/xonsh-cheatsheet/blob/main/README.md#three-most-frequent-things-that-newcomers-overlook) and to potentially [spread the word about xonsh](https://github.com/xonsh/xonsh#the-xonsh-shell-community) if you make a screenshot or show your terminal to friends or collegues:\n```ini\nmkdir -p ~/.config/ && echo @(\"\"\"\n[character]\nsuccess_symbol = \"[@](bold green)\"\nerror_symbol = \"[@](bold red)\"\n\"\"\".strip()) > ~/.config/starship_xonsh.toml\n\n$STARSHIP_CONFIG = '~/.config/starship_xonsh.toml'\nxontrib load prompt_starship\n```\n\n## Configuration\n\nYou can set the different starship configs for left, right and bottom parts of prompt when your shell type is prompt-toolkit:\n\n```python\n$XONTRIB_PROMPT_STARSHIP_LEFT_CONFIG = \"~/.config/starship_xonsh_left.toml\"\n$XONTRIB_PROMPT_STARSHIP_RIGHT_CONFIG = \"~/.config/starship_xonsh_right.toml\"\n$XONTRIB_PROMPT_STARSHIP_BOTTOM_CONFIG = \"~/.config/starship_xonsh_bottom.toml\"\nxontrib load prompt_starship\n```\n\nIn case of [using starship as part of another prompt](https://github.com/anki-code/xontrib-prompt-bar#using-starship-cross-shell-prompt-to-rendering-right-sections) you can add starship prompt to `$PROMPT_FIELDS` without replacing the current prompt:\n```python\n$XONTRIB_PROMPT_STARSHIP_REPLACE_PROMPT = False\nxontrib load prompt_starship\nprint($PROMPT_FIELDS['starship_left']())\n```\n\n[Prompt bar with starship](https://github.com/anki-code/xontrib-prompt-bar#using-starship-cross-shell-prompt-to-rendering-right-sections):\n\n<img src=\"https://raw.githubusercontent.com/anki-code/xontrib-prompt-bar/master/static/xontrib-prompt-bar-starship.png\" alt=\"Prompt bar with starship sections.\">\n\n\n## Known issues\n\n* [Prompt toolkit issue: the right prompt at the bottom.](https://github.com/prompt-toolkit/python-prompt-toolkit/issues/1241)\n* The using of bottom toolbar is not properly tested and adopted to cute appearance.\n\n## Credits\n* The xontrib-prompt-starship can be used as part of [xontrib-prompt-bar](https://github.com/anki-code/xontrib-prompt-bar).\n* This package is the part of [ergopack](https://github.com/anki-code/xontrib-ergopack) - the pack of ergonomic xontribs.\n* This package was created with [xontrib cookiecutter template](https://github.com/xonsh/xontrib-cookiecutter).\n* [Adding support for xonsh inside Starship](https://github.com/starship/starship/pull/2807)\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Starship prompt in xonsh shell.",
"version": "0.3.6",
"project_urls": {
"Code": "https://github.com/anki-code/xontrib-prompt-starship",
"Documentation": "https://github.com/anki-code/xontrib-prompt-starship/blob/master/README.md",
"Homepage": "https://github.com/anki-code/xontrib-prompt-starship",
"Issue tracker": "https://github.com/anki-code/xontrib-prompt-starship/issues"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d0d88760885606c9ff5c0750cf22be2e10713fd700c10d624ab35bcb7cf6017d",
"md5": "7f1a57cbdf97558b2f4d056f4ff2f3f1",
"sha256": "55bcb6d978e4ddd0a8aacb441f6f7dda90d3908f7ae1e32d015cae599f6d4790"
},
"downloads": -1,
"filename": "xontrib_prompt_starship-0.3.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7f1a57cbdf97558b2f4d056f4ff2f3f1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 4477,
"upload_time": "2024-04-04T23:45:28",
"upload_time_iso_8601": "2024-04-04T23:45:28.232718Z",
"url": "https://files.pythonhosted.org/packages/d0/d8/8760885606c9ff5c0750cf22be2e10713fd700c10d624ab35bcb7cf6017d/xontrib_prompt_starship-0.3.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "345bc858bebb3577b3d6b219ebec2398520b2a8976250790c7c40bf25f8cbf67",
"md5": "c9199a23f4bb5c332692baabbbaef915",
"sha256": "7b4420f496de923993553c1dc50944338196e982d48d652132e967280f01867c"
},
"downloads": -1,
"filename": "xontrib-prompt-starship-0.3.6.tar.gz",
"has_sig": false,
"md5_digest": "c9199a23f4bb5c332692baabbbaef915",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4279,
"upload_time": "2024-04-04T23:45:30",
"upload_time_iso_8601": "2024-04-04T23:45:30.240035Z",
"url": "https://files.pythonhosted.org/packages/34/5b/c858bebb3577b3d6b219ebec2398520b2a8976250790c7c40bf25f8cbf67/xontrib-prompt-starship-0.3.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-04 23:45:30",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "anki-code",
"github_project": "xontrib-prompt-starship",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "xontrib-prompt-starship"
}