Skip to content

Commit

Permalink
new history section
Browse files Browse the repository at this point in the history
  • Loading branch information
santagada committed Mar 14, 2017
1 parent 61bbac8 commit 356ab07
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name='xontrib-powerline',
version='0.3.0',
version='0.3.1',

description='Powerline for Xonsh shell',
long_description=long_description,
Expand Down
7 changes: 6 additions & 1 deletion xontrib/powerline.xsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Section = namedtuple('Section', ['line', 'fg', 'bg'])

$PL_PARTS = 10
$PL_DEFAULT_PROMPT = 'short_cwd>rtns'
$PL_DEFAULT_RPROMPT = 'time'
$PL_DEFAULT_RPROMPT = 'history>time'
$PL_DEFAULT_TOOLBAR = 'who>cwd>branch>virtualenv>full_proc'

$PL_SEP = ''
Expand All @@ -24,6 +24,11 @@ def register_sec(f):
return f


@register_sec
def history():
return Section(' %d ' % len(__xonsh_history__), 'WHITE', '#333')


@register_sec
def time():
return Section(strftime(' %H:%M '), 'WHITE', 'BLUE')
Expand Down

0 comments on commit 356ab07

Please sign in to comment.