Yet another powerline theme for xonsh with async prompt support.
Project description
Powerline3
Yet another powerline theme for xonsh with async prompt support.
Why another one?
- It uses
$PROMPT_FIELDS
and no need to have a separate functions and renderer. Since the addition of$PROMPT_TOKENS_FORMATTER
it is possible to use the existing set of functions to emulate powerline theme for xonsh prompts. - Async prompt mode works as well.
Installation
To install use pip:
xpip install xontrib-powerline3
# or: xpip install -U git+https://github.com/jnoortheen/xontrib-powerline3
Usage
xontrib load powerline3
# update the default set of colors for
# the fields by updating the env variable
$PROMPT_FIELD_COLORS = {
"cwd": ("WHITE", "CYAN"),
"gitstatus": ("WHITE", "BLACK"),
"ret_code": ("WHITE", "RED"),
"full_env_name": ("white", "green"),
"hostname": ("white", BLUE),
"localtime": ("#DAF7A6", "black"),
}
# choose the powerline glyph used
$POWERLINE_MODE = "powerline"
# Other choices are
# round/down/up/flame/squares/ruiny/lego
# by default it chooses at radom
Extra PROMPT_FIELDS
1. full_env_name
- When the
env_name
is.venv
show the name of the parent folder- contains
-py3.*
(when it is poetry created) shows the project name part alone
2. background_jobs
- show number of running background jobs
3. py_pkg_info
- show python package
name-version
if current directory has poetry-pyproject.toml
Examples
Credits
This package was created with xontrib cookiecutter template.
- https://www.nerdfonts.com/cheat-sheet?set=nf-ple-
- https://github.com/romkatv/powerlevel10k#meslo-nerd-font-patched-for-powerlevel10k
Similar Projects
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for xontrib_powerline3-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b896eb9c1aae64fff492e4d1f0b71608b4fdd4d5e7acaf37e7577125e01679c7 |
|
MD5 | 0631cbc0c35aaa8ccef9d27b50188c17 |
|
BLAKE2b-256 | e4777b86f8fa7789fc3cf0b3f00d8d6ce85fc7bd21b864aa247795566fe4989e |