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

[wish] TMUX status line integration #475

Open
2 tasks done
tigerinus opened this issue Mar 2, 2021 · 8 comments
Open
2 tasks done

[wish] TMUX status line integration #475

tigerinus opened this issue Mar 2, 2021 · 8 comments
Labels
🚀 feat New feature

Comments

@tigerinus
Copy link

Prerequisites

  • I have read and understand the CONTRIBUTING guide
  • I looked for duplicate issues before submitting this one

Description

The only reason I am still staying with Powerline is its integration with TMUX. I've been looking for an alternative to Powerline + TMUX + bash for a long time, but no luck. OMP has a cross-shell prompt customizer seems to be promising. It'd be nice to support TMUX.

@JanDeDobbeleer
Copy link
Owner

@tigerinus what exactly do you mean by supporting TMUX? The way I understand it, TMUX is a multiplexer running a shell (which we already support).

@JanDeDobbeleer JanDeDobbeleer added the 🚀 feat New feature label Mar 2, 2021
@tigerinus
Copy link
Author

@tigerinus what exactly do you mean by supporting TMUX? The way I understand it, TMUX is a multiplexer running a shell (which we already support).

TMUX has a customizable status line. The legacy powerline has a TMUX plugin that shares its segments within TMUX status line.
See https://powerline.readthedocs.io/en/latest/usage/other.html#tmux-statusline

@SunMar SunMar mentioned this issue May 28, 2021
@JanDeDobbeleer JanDeDobbeleer changed the title [wish] TMUX integration [wish] TMUX/VIM integration May 28, 2021
@bewing
Copy link
Contributor

bewing commented Oct 1, 2021

I'm interested in this as I'm currently only running powerline-daemon to render a tmux status line, and spent the last day or two of my vacation doing research.

Powerline supports a large amount of tmux versions -- 1.7 through 2.1+

tmux used to (pre-2.9) only support rendering a left bar, the window list (center), and a right bar. Powerline's default config was to statically set the window list coloring during init, and then tell tmux to call powerline every 2 seconds for the left and right bar lines, as separate commands. The default config only had the session name in the left bar, a powerline-like window list in the current colorscheme, and then uptime, load, time, date, and hostname in the right statusbar.

Newer tmux (2.9+) supports rendering the entire status line via the status-format array. By default, status-format[0] keeps with the tmux standard of the left bar, the window list, and the right bar, but this could be overwritten.

Given the current approach of posh regarding static shell inits without coloring information present, and only using the engine and renderer when rendering a status line, the best approach might be to only support tmux 2.9+ via the status-format line, and have tmux be a different "shell", with different config files for your standard shell and tmux. Then we could tell tmux to completely delegate status-format[0] (and perhaps other lines, in a multi-line format) to omp.

I'm happy to slowly work on this if there is interest in my copious spare time, but given my lack of familiarity with the current codebase, would welcome any advice or guidance regarding the above.

@toolonely
Copy link

Another example of prompt/vim/tmux integration would be promptline.vim / tmuxline.vim (both are on GitHub)

@stale stale bot added the 💤 stale label Oct 8, 2022
Repository owner deleted a comment from stale bot Oct 8, 2022
@heaths
Copy link

heaths commented Nov 30, 2022

What might this look like for configuration? I too run powerline for the statusline support and works love to switch to OMP, but powerline supports different shells for different layouts. You certainly wouldn't want a typical shell e.g., pwsh or bash, layout in vim. Would we first need to add support for different configurations?

I suppose one way is just to point to a different config file when starting OMP from inside vim. Would likely need vim-specific segments, though.

@JanDeDobbeleer
Copy link
Owner

The main reason this one's still open is that the documentation on the subject is (for me at least) impossible to find. And I mean actual implementation examples.

@hugo-ricateau
Copy link

Perhaps it might be worth closing this issue in favour of a dedicated one per target tool. By the way, support for ipython prompt customisation would be similarly nice, and enable even more powerline users to migrate to oh-my-posh (event though hybrid configurations work, it is a bit cumbersome to setup).

Definitely not an official documentation, but the source code of the powerline projet might be of some help on these subjects.

For tmux, the following configuration guides might help as well: here, here or here; for ipython, there is fortunately an official documentation.

@tigerinus tigerinus changed the title [wish] TMUX/VIM integration [wish] TMUX integration Jan 19, 2023
@tigerinus tigerinus changed the title [wish] TMUX integration [wish] TMUX status line integration Mar 12, 2023
@xborke
Copy link

xborke commented Sep 3, 2024

@tigerinus what exactly do you mean by supporting TMUX? The way I understand it, TMUX is a multiplexer running a shell (which we already support).

but seems like it is not possible to run TMUX in Windows Terminal Powershell, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚀 feat New feature
Projects
None yet
Development

No branches or pull requests

7 participants