-
Notifications
You must be signed in to change notification settings - Fork 424
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
Restoring pane title #342
base: master
Are you sure you want to change the base?
Restoring pane title #342
Conversation
I would love to see this part of the next release! |
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 ? |
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 I set this in my ~/.tmux.conf to set the title of each pane: Could someone with experience look at the branch conflict and see what the problem is to introduce this basic feature? |
@@ -194,6 +194,7 @@ restore_pane() { | |||
else | |||
new_session "$session_name" "$window_number" "$window_name" "$dir" "$pane_index" | |||
fi | |||
tmux select-pane -t "$session_name":"$window_number"."$pane_index" -T "${pane_title}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of naming the pane with a standalone command, can we somehow set the correct pane_title when the pane is created?
@@ -50,6 +50,8 @@ pane_format() { | |||
format+="#{pane_pid}" | |||
format+="${delimiter}" | |||
format+="#{history_size}" | |||
format+="${delimiter}" | |||
format+="#{pane_title}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if we grouped all pane_
interpolations together? Maybe add pane_title
after pane_index
?
This will be a breaking change when performing a restore with the old resurrect file, but that's a separate concern.
@@ -313,7 +315,7 @@ main() { | |||
start_spinner "Saving..." "Tmux environment saved!" | |||
fi | |||
save_all | |||
if show_output; then | |||
if show_output; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please use tabs for indentation?
I'm also not happy with tabs and would like to change to two-space indentation, but I need help from someone that's willing to do that for all the repos in tmux-plugins
github org.
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:
|
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? |
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. |
Great!
Not sure, I think you have to create your own.
We don't want to litter the plugin source code with migration logic. I'd prefer the |
That's a valid point, noted.
Line 51 has delimiter on it, did you mean 52? |
Ah, yes! |
FYI: There is a bug in tmux-resurrect/scripts/restore.sh Line 281 in 5c69748
|
I have just pushed this PR with fixes. |
Hi,
I made a little improvement adding the restoring of pane title. Simply, I added
#{pane_title}
topane_format
andtmux select-pane -T <title>
in restoring.This PR will fix also issue #330