Skip to content

Commit

Permalink
0.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
d2iq-shadowbq committed Jan 21, 2020
1 parent f7350f8 commit bac3467
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
15 changes: 8 additions & 7 deletions powerline-inject/__init__.py → powerline_inject/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from powerline.theme import requires_segment_info

_BEGINNING_OF_LIST=0
_INJ_SYMBOL = u'\U0001F489 '
#:syringe:

Expand Down Expand Up @@ -31,25 +32,25 @@ def context(pl, segment_info, show_env=True, env_list=()):
if render_injects != 'YES':
return []

if not any([show_env]):
return []

segments_list = []

if show_env:
for item in env_list:
highlight_group = 'powerline_inject'
segments_list.append(
{'contents': item,
{'contents': segment_info['environ'].get(item) + " ",
'highlight_groups': [highlight_group],
}
)


# Add the inject symbol before the first segment
first_highlight_group = segments_list[0]['highlight_groups']
segments_list.insert(0, {'contents': _INJ_SYMBOL,
'highlight_groups': first_highlight_group
}
segments_list.insert(
_BEGINNING_OF_LIST,
{
'contents': _INJ_SYMBOL,
'highlight_groups': first_highlight_group
}
)
return segments_list
3 changes: 0 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,13 @@
from distutils.core import setup

INSTALL_REQUIRES = [
'kubernetes-py>=1.10.7.4',
'powerline-status>=2.7',
]

def version():
with open(os.path.abspath(__file__).replace('setup.py', 'version.meta'), 'r') as v:
return v.read().replace('\n', '')

# Heavily inspired by the powerline-kubernetes library written by Vincent De Smet
# (vincent.drl@gmail.com) and located at https://github.com/so0k/powerline-kubernetes
setup(
name='powerline-inject',
version=version(),
Expand Down
2 changes: 1 addition & 1 deletion version.meta
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.1.0
0.1.1

0 comments on commit bac3467

Please sign in to comment.