Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define custom segments #407

Closed
wants to merge 1 commit into from
Closed

define custom segments #407

wants to merge 1 commit into from

Conversation

gtatgh
Copy link

@gtatgh gtatgh commented May 30, 2018

Add ability to define custom segments in a config.json file as shown below:

{
  "segments": [
    "/Users/xxx/.config/powerline-shell/segments/my_segment.py",
    "username"
  ],
  "theme": "/Users/xxx/.config/powerline-shell//themes/my_theme.py"
}

b-ryan pushed a commit that referenced this pull request Jun 20, 2018
Closes #407

The changes in 407 were on the right track, but didn't take it all the
way. Some issues it had:

- Did not call `expanduser` to handle paths like `~/segment.py`
- Did not appear to work on both Python 2 and Python 3
- Did not show a meaningful message when a segment cannot be found

This commit repurposes the code written to import custom themes for
segments.
@b-ryan
Copy link
Owner

b-ryan commented Jun 20, 2018

Thanks for this change. There are some problems with the implementation, however. Since a few people really want this feature I decided to just implement this separately rather than making comments on here / waiting for those changes. I described the problems and you can see the change here: af919e1

@b-ryan b-ryan closed this Jun 20, 2018
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.

None yet

2 participants