wezterm icon indicating copy to clipboard operation
wezterm copied to clipboard

show pane title

Open xiangpeng2008 opened this issue 2 years ago • 5 comments

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Many times I need to open many panes, each for a specific task. It would be good to know which pane is for which task.

Describe the solution you'd like A clear and concise description of what you want to happen. It would be handy if we could set and show pane title Tmux supports this image

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. If there's no specific place for pane title reserved in wezterm, then to have a shortcut to show pane title on top of each pane would also work.

Additional context Add any other context or screenshots about the feature request here.

I will include pane id in the pane title, like this I could know easily the pane id of pane to which I want to wezterm cli send-text

xiangpeng2008 avatar May 10 '22 12:05 xiangpeng2008

The pane title for the active pane is shown in the title of the tab in the tab bar.

You can use the same escape sequence as is used in your tmux_rename shell function to set the pane title.

For wezterm cli send-text you probably want the pane id rather than the title, which you can see by:

echo $WEZTERM_PANE

wez avatar May 10 '22 13:05 wez

the problem here is, say I have 10 panes opened ( I have 3 screens ), I want to send some text to one of them, I don't want to do echo $WEZTERM_PANE on each of the pane, because that's not efficient.

xiangpeng2008 avatar May 10 '22 13:05 xiangpeng2008

You'd only need to do it in the one to which you wished to send text.

You can use https://wezfurlong.org/wezterm/config/lua/window-events/format-tab-title.html to change the default tab title to always show the pane id.

wez avatar May 10 '22 13:05 wez

You may also wish to look at wezterm cli list which shows the pane ids and titles of all of the panes in a list.

Can you tell me more about what you're trying to do? I'm not sure if I'm missing something!

wez avatar May 25 '22 03:05 wez

hi @wez

What I want to do is to make wezterm acting like Emacs, but in a more flexible way.

Imagine like this, I have a pretty big screen.

  1. Each pane would be used for different task, e.g. python computing.
  2. Now for one of my project I have 3 python tasks to run, ( in reality we could have much many than that ).
  3. I would open 4 panes, Left , Center, Right Top, Right Bottom.
  4. In the center I open a vim, with 3 vim buffers. This vim will be my control pane, and I could use it to send any commands to any other panes. There are already some vim-script could doing so, like https://github.com/jpalardy/vim-slime, supporting some terminal simulator already. This is why I requested https://github.com/wez/wezterm/issues/888, which is critical for this functionality.
  5. Left, RT, RB are reserved to pythons, as they are for different tasks, I put a short description into their pane title to distinguish them.
  6. From vim, in 1 buffer I press some shortcut, then each pane shows an alphabet, "a","b","c","d", I press "a", then this vim buffer knows that every commands I send since there goes to pane which just shown "a". In a similar way, in another buffer -> some short cut -> "c" -> that vim buffer knows that every commands I send since there goes to pane which just shown "c". Similar for 3rd buffer. ( I need do some work on vim-script. )
  7. Now the 3 python sessions are running some tasks using commands send from vim, they are NOT finished yet, but they start to output something, and 1 of them outputs interesting things. I don't have a good memory, to know what task that pane is for, I need to check pane title, as you mentioned previously, I could click that pane and see it in tab title. However it would be better if there's shortcut to show all pane title on top of pane similar to here, because I could see all tasks once, which is why I have request on this page image

Would what I do here makes sense to you ? It's a bit cumbersome.

xiangpeng2008 avatar May 26 '22 14:05 xiangpeng2008

I like how Terminator handles this. For me it provides obvious visual aid of the pane border too. Terminator supports reordering of the panes by dragging from this title too. But I don't really use that feature. image

madushan1000 avatar Aug 16 '23 17:08 madushan1000