-
Notifications
You must be signed in to change notification settings - Fork 627
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
Set pane name when hash is passed to panes config #548
Conversation
The tmux man says the pane title can be set via the "OSC title setting" That's exactly what this does, just after the pane is created and before all other commands are sent
Constructor changed
Passed rubocop but broke the condition in a previous commit It's fixed nao
Fixes the test
OK, a couple thoughts:
|
This was indeed a quick and dirty (possibly too dirty) PR while on holiday. Would a "flag" at the project or window level make this PR more acceptable (of course with all the other concerns addressed)? e.g pane_titles: True # Project level flag
windows:
- editor:
pane_titles: True # Window level flag Cheers |
@LoveIsGrief not sure I understand the purpose of a flag in this case... What would that be for? If it's to simply enable/disable the functionality, I don't think that's necessary. I feel as though my comments were taken to be critical of the intent of the PR; far from it, I think this is a good change. But it's a change nonetheless, which means we have to make sure it's documented in the README and noted in the CHANGELOG (per the contribution guidelines). I do think that there's probably some edge cases that should be covered by tests, but this is a gut-feel more than anything else (@Soliah, @ethagnawl, @J3RN any opinions?). IMO it's just better to work through any issues before we merge it in than after. As for the Vagrant stuff, again, I'm not against it, but it'd just be better to not mix it in with this functionality. I don't see us rejecting that (it's not very invasive), but personally I haven't used Vagrant in years, so someone with fresher knowledge in that area would be better-suited to take a look at that. Looks like you could simply create a branch with just a6e5862, fc1feb3, and e42416a and submit that as a PR, and then either push this without Vagrant support (probably best) or rebase it off the vagrant branch. While you're at it, you could probably also squash 92008a1 and 4016bcf, as well. |
A few thoughts:
|
Thank you for this contribution @LoveIsGrief. I'm sorry that it sat dormant for so long. However, I think a better (i.e. persistent) way forward would be to use a user provided variable and |
Hi. Don't worry about it. I think it was a quick hack. It's so old now 😂 Have a great day |
Motivation
tmux allows setting pane titles and with the
set-option set-title on
it is possible to pass these on to the terminal emulator e.g konsole, gnome-terminal, etc.man tmux
Example config
Result
When calling
display-message -p "#{pane_title}"
in tmux, the pane title (or the window title if the pane title isn't set) is returnedTests have been added and rubocop is ok with it too.
Extra
I was running on windows machine and had no way of testing, so I added a
Vagrantfile
with the bare minimum.