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

Unable to modify to background of Powerline on tmux? #907

Closed
phongvcao opened this issue Jun 29, 2014 · 10 comments

Comments

@phongvcao
Copy link

commented Jun 29, 2014

Hi everyone,

I am having trouble changing the background of Powerline, particularly on the tmux's session name section. Here is the screenshot:

screenshot from 2014-06-29 10 39 14

So those black spots in the tmux's session name background are not in sync with the whole background color of Powerline on tmux. Is this an issue with either tmux or Powerline or it's just me who doesn't know how to adjust it?


Want to back this issue? Place a bounty on it! We accept bounties via Bountysource.

@ZyX-I ZyX-I added tmux and removed enhancement labels Jun 29, 2014

@ZyX-I

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2014

These lines only pretend to be emitted by powerline, actually they are hardcoded in tmux configuration. I recently trued to check whether I can put them under powerline control, but it appeared that tmux has funny things going on: consider command

tmux display -t '%1' -p '#{client_prefix}'

. This will emit information whether user has pressed <C-b> key (or whatever prefix is) under following circumstances:

  • When run from shell inside the pane with id %1.
  • When run from shell that is not run inside tmux and if this command was not run from a shell that is not inside the pane with id %1 (actually, not inside the same screen as shell with given id), but is inside tmux.

I.e. if I press <C-b>, switch to another terminal with tmux running and run this command there it will show 0.

If I launch this command in cycle inside the window where I pressed <C-b> or if I switch to terminal without tmux active it will correctly show 1.

This means this command is unreliable, yet I need it to replicate the functionality of the segments you highlighted.

@ZyX-I

This comment has been minimized.

Copy link
Contributor

commented Jun 29, 2014

So the only way to adjust the colors currently is copying relevant bits of powerline_*.conf tmux configuration file just after you source powerline tmux configuration and adjusting colors there.

@phongvcao

This comment has been minimized.

Copy link
Author

commented Jun 29, 2014

@ZyX-I Thank you for your answer. So if I am using tmux 1.9a on Fedora then I should copy the content of powerline_tmux_1.9_plus.conf and powerline_tmux_1.8_plus.conf to the end of powerline.conf and edit the colors there right? But I don't know which code segments represent that particular spot. Can you drop me more hints?

@phongvcao

This comment has been minimized.

Copy link
Author

commented Jun 29, 2014

@ZyX-I Oh Okay I figured it out already. Thank you so much ZyX-I. Maybe powerline should change its settings somehow to let users change this configuration in the json files.

For anyone having this issue, the line should be adjusted (in the bindings/tmux/powerline.conf file) is:

set -g window-status-current-format "#[fg=colour234,bg=colour31]#[fg=colour117,bg=colour31] #I  #[fg=colour231,bold]#W #[fg=colour31,bg=colour234,nobold]"

@phongvcao phongvcao closed this Jun 29, 2014

@ZyX-I ZyX-I reopened this Jun 29, 2014

@ghost

This comment has been minimized.

Copy link

commented Jul 29, 2014

I seem to be having a similar or related issue. When I first installed powerline, I'm pretty sure it was working correctly. But, now powerline in tmux looks like this:
example

The background is green and there is a space between the list of tmux windows and the segment to the left of them.

I haven't changed anything from the defaults. Have I done something wrong?

Edit: It appears to be working correctly as a zsh prompt and within vim as well.

EDIT 2: I checked the version of tmux I was using and it turned out to be 1.6. Found 1.9 in Debian's wheezy-backports repo. After installing tmux 1.9, powerline works as expected.

@GEverding

This comment has been minimized.

Copy link

commented Aug 26, 2014

I seem to be having the same or similar problem as @nrvilk even when running tmux 1.9a

@ZyX-I

This comment has been minimized.

Copy link
Contributor

commented Nov 29, 2014

Should be resolved by #1200.

@ZyX-I ZyX-I closed this Nov 29, 2014

@phongvcao

This comment has been minimized.

Copy link
Author

commented Mar 5, 2015

Today I am back to using Tmux and Powerline and the Black spot still persists. Does anyone know how to setup Solarized Powerline for Tmux so that we can get rid of this little black spot on the left of the bottom Tmux powerline bar?

selection_002

Also, in order to get this theme works, I have done lots of customization. I may fork the project and create a Pull Request for the tmux/solarized.json theme if this black spot can be fixed. I use Solarized for everything in my desktop. Thanks guys!

@kejadlen

This comment has been minimized.

Copy link

commented Mar 5, 2015

This works for me:

❯ cat powerline/colorschemes/tmux/default.json
{
        "groups": {
                "background":           {"bg": "gray1"},
                "active_window_status": {"bg": "gray1"},
                "window_status":        {"bg": "gray1"},
                "activity_status":      {"bg": "gray1"},
                "bell_status":          {"bg": "gray1"},
                "window":               {"bg": "gray1"},
                "window:divider":       {"bg": "gray1"}
        }
}
@phongvcao

This comment has been minimized.

Copy link
Author

commented Mar 5, 2015

@kejadlen thanks bro I finally got it working! Problem solved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.