{ "info": { "author": "vaaaaanquish", "author_email": "6syun9@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# Xontrib Powerline 2\n---\n\nxontrib-powerline fork by [santagada/xontrib-powerline](https://github.com/santagada/xontrib-powerline).\n\n\"example\"\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, ``$PROMPT`` for main prompt, ``$PL_PROMPT`` for the right prompt and ``$PL_TOOLBAR`` for the bottom toolbar.\nThey contain a list of sections that can be used separated by ``>``. The value ``!`` means not to use that prompt.\n\nExamples:\n\n```\n$PL_PROMPT='cwd>branch'\n$PL_RPROMPT = '!' # for no toolbar\n$PL_TOOLBAR = 'who>virtualenv>branch>cwd>full_proc'\nxontrib load powerline\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\"example\"\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>cwd>branch'\n$PL_TOOLBAR='!'\n$PL_RPROMPT='!'\nxontrib load powerline\n```\n\"example\"\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|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## Separate mode\n\nWe can change the way of separation mode by `$PL_SEP_MODE`.\n\n|mode|separate char|\n|---|---|\n|powerline| \ue0b0, \ue0b1, \ue0b2, \ue0b3|\n|round| \ue0b4, \ue0b5, \ue0b6, \ue0b7 |\n|down| \ue0b8, \ue0b9, \ue0ba, \ue0bb |\n|up| \ue0bc, \ue0bd, \ue0be, \ue0bf |\n|flame| \ue0c0, \ue0c1, \ue0c2, \ue0c3 |\n|squares| \ue0c6, \ue0c4, \ue0c7, \ue0c5 |\n|ruiny| \ue0c8, \ue0c1, \ue0ca, \ue0c3 |\n|lego| \ue0d1, \ue0d0 |\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\"example\"\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 = '\u25a0'\n$PL_ORG_SEP_THIN = '\u25a1'\n$PL_ORG_RSEP = '\u25a0'\nxontrib load xontrib-powerline2\n```\n\"example\"\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\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/6syun9/xontrib-powerline2", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "xontrib-powerline2", "package_url": "https://pypi.org/project/xontrib-powerline2/", "platform": "any", "project_url": "https://pypi.org/project/xontrib-powerline2/", "project_urls": { "Homepage": "https://github.com/6syun9/xontrib-powerline2" }, "release_url": "https://pypi.org/project/xontrib-powerline2/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Powerline for Xonsh shell", "version": "1.0.0" }, "last_serial": 5763965, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "faa668772e0a3bbfc2a09da0107a29eb", "sha256": "2721248b79beb84f6d29ff7b3647be9289e8cc90a93317068b44046349ee8941" }, "downloads": -1, "filename": "xontrib_powerline2-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "faa668772e0a3bbfc2a09da0107a29eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6572, "upload_time": "2019-08-31T09:31:11", "url": "https://files.pythonhosted.org/packages/31/2e/298dcc8305dcee5edbcd114b1b06dadac79dd9e58a7f6d47247b411d7920/xontrib_powerline2-1.0.0-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "faa668772e0a3bbfc2a09da0107a29eb", "sha256": "2721248b79beb84f6d29ff7b3647be9289e8cc90a93317068b44046349ee8941" }, "downloads": -1, "filename": "xontrib_powerline2-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "faa668772e0a3bbfc2a09da0107a29eb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6572, "upload_time": "2019-08-31T09:31:11", "url": "https://files.pythonhosted.org/packages/31/2e/298dcc8305dcee5edbcd114b1b06dadac79dd9e58a7f6d47247b411d7920/xontrib_powerline2-1.0.0-py3-none-any.whl" } ] }