Skip to content

Feature adding extra sections#16

Open
ericktucto wants to merge 2 commits into
santagada:masterfrom
ericktucto:add-feature-extra-section
Open

Feature adding extra sections#16
ericktucto wants to merge 2 commits into
santagada:masterfrom
ericktucto:add-feature-extra-section

Conversation

@ericktucto

Copy link
Copy Markdown

Create a new method, pl_add_section, to add new sections
Examples:

On .xonshrc

$PL_EXTRA_SEC = { 'user': lambda: [' {user} ', 'WHITE', '#555'] }
$PL_PROMPT = 'user>time'
xontrib load powerline

Or (.xonshrc)

def user():
    return [' {user} ', 'WHITE', '#555']


$PL_EXTRA_SEC = { 'user': user }
$PL_PROMPT = 'user>time'
xontrib load powerline

On terminal

>>> $PL_EXTRA_SEC = { 'user': lambda: [' {user} ', 'WHITE', '#555'] }
>>> $PL_PROMPT = 'user>time'
>>> pl_build_prompt

Create a new method, pl_add_section, to add new sections
Examples:

On .xonshrc
```python
$PL_EXTRA_SEC = { 'user': lambda: [' {user} ', 'WHITE', '#555'] }
$PL_PROMPT = 'user>time'
xontrib load powerline
```

On terminal
```
>>> $PL_EXTRA_SEC = { 'user': lambda: [' {user} ', 'WHITE', '#555'] }
>>> $PL_PROMPT = 'user>time'
>>> pl_build_prompt
```
vaaaaanquish added a commit to vaaaaanquish/xontrib-powerline2 that referenced this pull request Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant