tmux-resurrect icon indicating copy to clipboard operation
tmux-resurrect copied to clipboard

Restoring pane title

Open c3r34lk1ll3r opened this issue 4 years ago • 11 comments

Hi,

I made a little improvement adding the restoring of pane title. Simply, I added #{pane_title} to pane_format and tmux select-pane -T <title> in restoring.

This PR will fix also issue #330

c3r34lk1ll3r avatar May 07 '20 08:05 c3r34lk1ll3r

I would love to see this part of the next release!

zachthedev avatar Sep 09 '20 22:09 zachthedev

Tried this patch , named titles are saved and restored , howevers panes with empty titles are restored with current directory path . Can you please fix that too ?

neerajbadlani avatar Jun 04 '21 07:06 neerajbadlani

I too would really appreciate if this PR can be introduced. I took several hours to make 'panestankingly' create a beautiful system dashboard with each pane having a descriptive title. When I used tmux-resurrect and restored my session, all that work was lost.

This was quite unexpected as I thought tmux-resurrect saves all the little details from your tmux environment so it can be completely restored after a system restart and pane titles have been around for quite a while now.

I set this in my ~/.tmux.conf set -g pane-border-status top

to set the title of each pane: tmux select-pane -t 1 -T title2

Could someone with experience look at the branch conflict and see what the problem is to introduce this basic feature?

ioogithub avatar Feb 27 '22 02:02 ioogithub

Hi,

I'm in favor of adding this feature, but I don't have time to work on it.

I'll provide support and guidance if anyone is willing to step up and take the ownership of this feature. The code changes in this PR should already work so the next steps would be:

  • Rebase with master
  • Address PR comments
  • Test, test, test
  • Merge if all looks good

bruno- avatar Feb 27 '22 07:02 bruno-

Hi @bruno-, I'll take care of this PR. Can I somehow continue in this PR or do I have to create a new one?

Hologos avatar Mar 23 '22 21:03 Hologos

Just a note - for easier migration, I'll check number of saved pane parameters since you don't want the pane title to be last.

Hologos avatar Mar 23 '22 21:03 Hologos

I'll take care of this PR

Great!

Can I somehow continue in this PR or do I have to create a new one?

Not sure, I think you have to create your own.

for easier migration, I'll check number of saved pane parameters since you don't want the pane title to be last.

We don't want to litter the plugin source code with migration logic. I'd prefer the pane_title parameter to be on line 51.

bruno- avatar Mar 24 '22 06:03 bruno-

We don't want to litter the plugin source code with migration logic.

That's a valid point, noted.

I'd prefer the pane_title parameter to be on line 51.

Line 51 has delimiter on it, did you mean 52?

Hologos avatar Mar 24 '22 11:03 Hologos

Line 51 has delimiter on it, did you mean 52?

Ah, yes!

bruno- avatar Mar 24 '22 11:03 bruno-

FYI: There is a bug in restore.sh on line 281 in restore_shell_history() function, there should be $11 instead of $10 since in this version, there is still window_name saved with each pane.

https://github.com/tmux-plugins/tmux-resurrect/blob/5c69748392decb52383c41edb0294ba68d9f5025/scripts/restore.sh#L281

Hologos avatar Mar 28 '22 14:03 Hologos

I have just pushed this PR with fixes.

Hologos avatar Mar 28 '22 17:03 Hologos