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

How to implement in Python powerline as segment? #24

Open
frdmn opened this issue Feb 1, 2015 · 4 comments
Open

How to implement in Python powerline as segment? #24

frdmn opened this issue Feb 1, 2015 · 4 comments
Labels

Comments

@frdmn
Copy link

frdmn commented Feb 1, 2015

Hello,

I'm using https://github.com/powerline/powerline and try to add rainbarf. By default it looks like this in tmux:

bildschirmfoto 2015-02-01 um 17 39 37

When I now add the rainbarf through my `.tmux.conf, it'll look like this:

bildschirmfoto 2015-02-01 um 17 41 58

As you can see, it'll replace the complete right segement group of Powerline, but i actually want to add it as additional segment in there.

Any ideas how to do so?

(Please note, I usually have wider shell windows, so the width in the screenshots above is not the issue of this problem)

Thanks in advance.

@creaktive
Copy link
Owner

Hi! The thing is, tmux itself will limit your right status to 40 characters (by default). Which is exactly the size of the rainbarf segment. A workaround is to add this to your ~/.tmux.conf:

set-option -g status-right-length 128
@frdmn
Copy link
Author

frdmn commented Feb 2, 2015

@creaktive Thank you for your reply. I just changed my .tmux.conf to:

# Rainbarf
set-option -g status-utf8 on
set -g status-right '#(rainbarf --battery --remaining --rgb --no-bright)'
set-option -g status-right-length 128

but it still looks like this:

bildschirmfoto 2015-02-02 um 13 12 10

I would love to have it somehow integrated in the right segment group of powerline.

@creaktive
Copy link
Owner

When you use set -g status-right ..., you're overriding the Powerline with rainbarf. I don't use the Python Powerline, but in my case, the status-right setting looks like:

set-option -g status-right "#(~/tmux-powerline/powerline.sh right)"

And then Powerline is configured to handle the rainbarf segment properly. However, I have no idea how Python Powerline segments are configured.

@frdmn
Copy link
Author

frdmn commented Feb 3, 2015

@creaktive Ah alright. Then I assume the issue is Python Powerline.

Do you plan to make it compatible to it, since tmux-powerline is deprecated in favour of Python Powerline?

Would love to use rainbarf, but don't really go back to the non-unified powerlines.

You can find more information about it's segments here, in case you are interested: https://powerline.readthedocs.org/en/latest/develop/segments.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 participants