{"id":13638236,"url":"https://github.com/vaaaaanquish/xontrib-powerline2","last_synced_at":"2025-04-19T17:33:23.020Z","repository":{"id":43400538,"uuid":"201914088","full_name":"vaaaaanquish/xontrib-powerline2","owner":"vaaaaanquish","description":"Powerline for Xonsh shell","archived":false,"fork":true,"pushed_at":"2022-11-18T23:15:20.000Z","size":672,"stargazers_count":34,"open_issues_count":5,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-06T14:09:08.540Z","etag":null,"topics":["shell","xonsh","xontrib"],"latest_commit_sha":null,"homepage":"","language":"Xonsh","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"santagada/xontrib-powerline","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vaaaaanquish.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},"funding":{"github":"vaaaaanquish"}},"created_at":"2019-08-12T11:06:39.000Z","updated_at":"2023-10-06T16:24:49.000Z","dependencies_parsed_at":"2023-01-21T14:49:04.469Z","dependency_job_id":null,"html_url":"https://github.com/vaaaaanquish/xontrib-powerline2","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaaaanquish%2Fxontrib-powerline2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaaaanquish%2Fxontrib-powerline2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaaaanquish%2Fxontrib-powerline2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vaaaaanquish%2Fxontrib-powerline2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vaaaaanquish","download_url":"https://codeload.github.com/vaaaaanquish/xontrib-powerline2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223805130,"owners_count":17205855,"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":["shell","xonsh","xontrib"],"created_at":"2024-08-02T01:00:42.499Z","updated_at":"2024-11-09T08:30:53.965Z","avatar_url":"https://github.com/vaaaaanquish.png","language":"Xonsh","funding_links":["https://github.com/sponsors/vaaaaanquish"],"categories":["Prompts"],"sub_categories":[],"readme":"# Xontrib Powerline 2\n---\n\nxontrib-powerline fork by [santagada/xontrib-powerline](https://github.com/santagada/xontrib-powerline).\n\n\u003cimg src=\"https://github.com/6syun9/xontrib-powerline2/raw/master/img/example.png\" alt=\"example\" title=\"example\"\u003e\n\n# Install\n\n```\npip install xontrib-powerline2\n```\n\nAnd them load it on your ``.xonshrc``\n\n```\nxontrib load powerline2\n```\n\n\n# Configuration\n\nThere are two variables that can be set, ``$PL_PROMPT`` for main prompt, ``$RPL_PROMPT`` for the right prompt and ``$PL_TOOLBAR`` for the bottom toolbar.\nThey contain a list of sections that can be used separated by ``\u003e``. The value ``!`` means not to use that prompt.\n\nExamples:\n\n```\n$PL_PROMPT='cwd\u003ebranch'\n$PL_RPROMPT = '!'  # for no toolbar\n$PL_TOOLBAR = 'who\u003evirtualenv\u003ebranch\u003ecwd\u003efull_proc'\nxontrib load powerline2\n```\n\n## Bulid prompt\n\nIf you want to override the settings after `xontrib load`, so commit changes to your prompt execute ``pl_build_prompt`` command.\n\n## Check config\n\nTo see all available sections type ``pl_available_sections`` command.\n\n\u003cimg src=\"https://github.com/6syun9/xontrib-powerline2/raw/master/img/example_available.png\" alt=\"example_available\" width=\"400px\" title=\"example_available\"\u003e\n\n## Default sections\n\n|section|description|\n|---|---|\n|who| {user}@{hostname} |\n|virtualenv| {env_name} |\n|branch| {curr_branch} |\n|cwd| $pwd using $pl_colors['cwd', 'git_root', 'git_sub_dir'] and $pl_parts |\n|short_cwd| {short_cwd} |\n|full_proc| run time of the previous command from history |\n|timing| diff from previous command's executed time |\n|time| strftime(' %h:%m ') |\n|history| len(\\_\\_xonsh\\_\\_.history) |\n|rtns| '!' if \\_\\_xonsh\\_\\_.history.rtns else none |\n|full_rtns| rtns[-1] if \\_\\_xonsh\\_\\_.history.rtns else none |\n\n\nIf you want to know about `{}` sections, please look [xonsh document](https://xon.sh/tutorial.html#customizing-the-prompt).\n\n\n## Custom sections\n\nWe can add customize origin section by `$PL_EXTRA_SEC`.\n```\n# func return [format string, text color, background color]\n$PL_EXTRA_SEC = {\"user\": lambda: [' I'm {user} ', 'BLACK', '#fd971f']}\n$PL_PROMPT='user\u003ecwd\u003ebranch'\n$PL_TOOLBAR='!'\n$PL_RPROMPT='!'\nxontrib load powerline2\n```\n\u003cimg src=\"https://github.com/6syun9/xontrib-powerline2/raw/master/img/example_custom_sec.png\" alt=\"example\" title=\"custom_sec\"\u003e\n\n\n## Section's color\n\nWe can change section color by `$PL_COLORS`.\n\n`$PL_COLORS` is `dict`. Basically, the value is `(text_color, background_color)`.\n\n|key|default value|description|\n|---|---|---|\n|who| (\"BLACK\", \"#a6e22e\") |-|\n|venv| (\"BLACK\", \"INTENSE_GREEN\") |-|\n|branch| (\"#333\") | background color from $PROMPT_FIELDS['branch_bg_color'] |\n|cwd| (\"WHITE\", \"#444\") |-|\n|git_root| (\"BLACK\", \"#00adee\") | used by cwd |\n|git_sub_dir| (\"WHITE\", \"#00adee\") | used by cwd |\n|short_cwd| (\"WHITE\", \"#444\") |-|\n|full_proc| (\"WHITE\", \"RED\", \"#444\") |There are two types of background depending on the situation|\n|timing| (\"WHITE\", \"#444\") |-|\n|time| (\"BLACK\", \"#00adee\") |-|\n|history| (\"WHITE\", \"#333333\") |-|\n|rtns| (\"WHITE\", \"RED\") |-|\n|full_rtns| (\"WHITE\", \"RED\", \"#444\") |There are two types of background depending on the situation|\n\n\n## Multi line prompt\n\nWe can use multi line prompt by `\\n`.\n```\n$PL_PROMPT='\\nuser\u003emode\u003e\\ncwd'\n```\n\n\u003cimg src=\"https://github.com/vaaaaanquish/xontrib-powerline2/raw/master/img/example_multiline.png\" alt=\"example\" title=\"multiline\"\u003e\n\n## Separate mode\n\nWe can change the way of separation mode by `$PL_SEP_MODE`.\n\n|mode|separate char|\n|---|---|\n|powerline| , , , |\n|round| , , ,  |\n|down| , , ,  |\n|up| , , ,  |\n|flame| , , ,  |\n|squares| , , ,  |\n|ruiny| , , ,  |\n|lego| ,  |\n\nFor example\n```\n# set $PL_SEP_MODE or using pl_set_mode alias\n$PL_SEP_MODE='round'\npl_set_mode round\n```\n\u003cimg src=\"https://github.com/6syun9/xontrib-powerline2/raw/master/img/example_round.png\" alt=\"example\" title=\"round\"\u003e\n\nIf you want to use original separeter, you can use `$PL_ORG_SEP`, `$PL_ORG_SEP_THIN`, `$PL_ORG_RSEP`.\n```\n$PL_ORG_SEP = '■'\n$PL_ORG_SEP_THIN = '□'\n$PL_ORG_RSEP = '■'\nxontrib load powerline2\n```\n\u003cimg src=\"https://github.com/6syun9/xontrib-powerline2/raw/master/img/example_origin_sep.png\" alt=\"example\" title=\"origin_sep\"\u003e\n\n# Credits\n\n - `laerus/cookiecutter-xontrib`: https://github.com/laerus/cookiecutter-xontrib\n - `santagada/xontrib-powerline`: https://github.com/santagada/xontrib-powerline\n\n# Similer Projects\n\n - `jnoortheen/xontrib-powerline3`: https://github.com/jnoortheen/xontrib-powerline3\n    - That is also compatible with `ASYNC_PROMPT`!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaaaaanquish%2Fxontrib-powerline2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvaaaaanquish%2Fxontrib-powerline2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvaaaaanquish%2Fxontrib-powerline2/lists"}