The bar theme for xonsh shell.
Project description
The bar theme for xonsh shell.
If you like the idea of bar theme click ⭐ on the repo and stay tuned.
Install
xpip install -U xontrib-prompt-bar
echo 'xontrib load prompt_bar' >> ~/.xonshrc
# Reload xonsh
Use cases
Fields and colors
The bar theme supports xonsh default fields and colors notation.
To customize the appearance of the fields on the bar you can use wrappers:
{hostname}
- no wrapper{hostname#section}
- add backlight for the text{hostname#accent}
- bold font and lighter color- Also you can create your own fields and wrapper. See the section below.
Add custom fields and wrappers
How to add two new fields called my_left_custom
and my_left_custom
and one new wrapper called brackets
.
$PROMPT_FIELDS['my_left_custom'] = 'Hello left!'
$PROMPT_FIELDS['my_right_custom'] = lambda: '>'*3 + ' {YELLOW}Hello right!'
$XONTRIB_PROMPT_BAR_WRAPPERS = {
'brackets': lambda v: f'[{v}]'
}
$XONTRIB_PROMPT_BAR_LEFT = '{hostname}{user}{pwd#accent}{my_left_custom#brackets}'
$XONTRIB_PROMPT_BAR_RIGHT = '{my_right_custom#section}{env_name#section}{gitstatus_noc#section}{date_time_tz}'
xontrib load prompt_bar
Result:
Future
It will be great if it will be reimplemented as shown in awesome example from Jonathan Slenders. Xonsh guru help wanted :)
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
File details
Details for the file xontrib-prompt-bar-0.1.0.tar.gz
.
File metadata
- Download URL: xontrib-prompt-bar-0.1.0.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bba783df5b588d32ad944d3b8105f9b5f2b985a2a3a6e6303a2ecb597ab3a7a4 |
|
MD5 | c300a1bbfd05f5376f5b956ff44ffa63 |
|
BLAKE2b-256 | f338ff9d48fe88458861625cbc642c16d452680524699787bb7122b19f187fad |
File details
Details for the file xontrib_prompt_bar-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: xontrib_prompt_bar-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200325 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54a865fcb36cde8f1975a5670d2181de38d707849a4297678ea0b13947a3a04f |
|
MD5 | d0d1554a29bb3f8cbb53d78f14591f58 |
|
BLAKE2b-256 | 5cb6fee22f3877955ce9757e7f17b0e892f0ea5db06884e2b6b95418a974273e |