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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persist custom tab title #225

Merged
merged 4 commits into from Mar 10, 2019
Merged

Conversation

@ericcornelissen
Copy link
Contributor

ericcornelissen commented Mar 8, 2019

As I described in this comment some processes would overwrite the custom tab title set by the user. Should be fixed with these small changes 馃槂

Implementing and testing this made me think that we may consider adding a feature to unset the custom title? Not sure how useful that would be though 馃

@skipmeister123

This comment has been minimized.

Copy link
Contributor

skipmeister123 commented Mar 8, 2019

@ericcornelissen

This comment has been minimized.

Copy link
Contributor Author

ericcornelissen commented Mar 8, 2019

I like that idea @skipmeister123 (I remember seeing it before 馃), it's related to #214 as well I guess

@felixse

This comment has been minimized.

Copy link
Owner

felixse commented Mar 8, 2019

I think we should also provide a way to go back to shell controlled titles. Right now if you don't put in anything you see no title at all. We should handle empty strings by setting Title to Terminal.FallbackTitle and set _customTitlte to false.

@skipmeister123

This comment has been minimized.

Copy link
Contributor

skipmeister123 commented Mar 8, 2019

@ericcornelissen

This comment has been minimized.

Copy link
Contributor Author

ericcornelissen commented Mar 9, 2019

I think we should also provide a way to go back to shell controlled titles. Right now if you don't put in anything you see no title at all. We should handle empty strings by setting Title to Terminal.FallbackTitle and set _customTitle to false.

In light of @skipmeister123's comment I did this a little bit different, but when you set the title to "" it should now go back to the default behaviour.1

I would prefer to set my tab title with precmd() {print -Pn "\e]0;%(4~|%-1~/鈥/%2~|%4~)\a"}... but I would also like to have my window title be the full command that's running. (I have my tabs on the bottom for this exact reason.) Currently, there's no way to do that, as the window title is always equal to the tab title. I recall having the ability to do this in iTerm2.

So basically what you want is that the application title is/can be different from the tab title? I tried to add something like that to this PR. However, I think this should be configurable in some sense, here are the different options I can think of:

  • Sync the application and tab title (regardless of whether its edited or not)
  • Let the application title be the shell title and have an optional custom tab title
  • Have the custom title be overridden when a command is running but restore it when the command is completed

Thoughts? I'm willing to implement this (including configuration) but I think it is out of scope for this PR.


1: I tested it from before #220 and rebased to felixse/master because of this, so I'm not 100% sure it is actually working 馃槄

@skipmeister123

This comment has been minimized.

Copy link
Contributor

skipmeister123 commented Mar 9, 2019

Here's an example of what I mean.
Screen Shot 2019-03-09 at 10 19 57 AM

Note that the tab text differs from the application title text.

@ericcornelissen

This comment has been minimized.

Copy link
Contributor Author

ericcornelissen commented Mar 9, 2019

Okay @skipmeister123, then I understood correctly and that should be the current behaviour. But I still think it should be configurable.

@felixse

This comment has been minimized.

Copy link
Owner

felixse commented Mar 10, 2019

Fixed some minor issue where ApplicationView.Title (displayed in Windows Taskbar) was not in line with the tab title.

From what I understand we would need to to the following to make @skipmeister123 happy:

  • Introduce third title to TerminalViewModel: WindowTitle.
  • Bind Titlebar on MainPage to WindowTitle instead of TabTitle
  • ApplicationView.Title should be kept in sync with WindowTitle
  • Add an option whether WindowTitle should be synchronized with TabTitle or ShellTitle
  • Bonus: Disable 'Edit Title' in TitleBar (not TabBar) when WindowTitle is set to ShellTitle
@ericcornelissen

This comment has been minimized.

Copy link
Contributor Author

ericcornelissen commented Mar 10, 2019

Fixed some minor issue where ApplicationView.Title (displayed in Windows Taskbar) was not in line with the tab title.

Ah, I figured the ApplicationView.Title was the WindowTitle

Add an option whether WindowTitle should be synchronized with TabTitle or ShellTitle

Does that also mean that ApplicationView.Title is synced with TabTitle or ShellTitle?

Other than that that seems right to me 馃憤 For me, if I were to adopt the layout of @skipmeister123 (which I'm considering), I would add to that an option to show the command that is running if the WindowTitle is synced with the TabTitle, which I think should be possible using Terminal.FallbackTitle.


For me this PR is ready to merge @felixse, although I cannot use it myself due to #220

@felixse felixse merged commit 6b64d39 into felixse:master Mar 10, 2019
@ericcornelissen ericcornelissen deleted the ericcornelissen:persistent-tab-title branch Mar 10, 2019
@danilocode

This comment has been minimized.

Copy link

danilocode commented Mar 11, 2019

There is an issue where the title reverts back to default right after I enter any command even after I have set it to be 'xyz'

@ericcornelissen

This comment has been minimized.

Copy link
Contributor Author

ericcornelissen commented Mar 12, 2019

@danilocode are you talking about the ApplicationView.Title (what you see in the Windows taskbar) or the tab title in FluentTerminal itself. And in case of the latter, do you have a single tab or multiple tabs. Also, do you have "Always show tabs" enabled?

@felixse

This comment has been minimized.

Copy link
Owner

felixse commented Mar 12, 2019

@danilocode Are you using the released version or did you build from current master?

@danilocode

This comment has been minimized.

Copy link

danilocode commented Apr 11, 2019

Thanks for the prompt reply, I was out for a few weeks and could not follow up
@ericcornelissen I was talking about tab title. And yes I have multiple tabs opened and yes, always show tabs is also enabled.

@felixse I am using released version

besides great job guys, I really like using this terminal. And I really hope UWP can support administrative tasks as well in future

@ericcornelissen

This comment has been minimized.

Copy link
Contributor Author

ericcornelissen commented Apr 11, 2019

No problem. Are you currently running the latest version (0.4.1.0) and do you still have the issue (I think your original comment was before the feature in this PR was release)? If so, what command/program are you trying to execute?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can鈥檛 perform that action at this time.