Skip to content

Allow to configure title bar information #1723

Closed

Description

It would be great if we could configure the information that gets displayed in the title bar. I use ManicTime a lot, and it's hard to auto tag my activities when the title bar basically only displays the file name and root folder name. Having the full path to the file and the git branch name would be super helpful.

For some other ideas, this VS plugin is super rad and affords complete control over what gets displayed in the title bar. https://visualstudiogallery.msdn.microsoft.com/2e8ebfe4-023f-4c4d-9b7a-d05bbc5cb239

Activity

  1. changed the title [-]More information in the title bar, please. [/-] [+]Allow to configure title bar information[/+] on Jan 3, 2016
  2. added
    feature-request
    on Jan 3, 2016
  3. added
    help wanted
    on Feb 8, 2016
  4. alexdresko commented on Apr 1, 2016

    @alexdresko
    Author

    Benjamin Pasero (@bpasero) By assigning this to yourself, does that mean it might happen? If so, please let me know if you would like some help, even if it's just for feedback.

  5. bpasero commented on Apr 2, 2016

    @bpasero
    Contributor

    This issue is currently assigned to the backlog. Every sprint we pick items from the backlog to plan for the current iteration. Please see https://github.com/Microsoft/vscode/wiki/Issue-Tracking#planning

  6. removed
    help wanted
    on Jul 12, 2016
  7. jamietre commented on Aug 9, 2016

    @jamietre

    +1. The more I use VS Code on bigger projects, it's becoming frustrating to be unable to distinguish between open windows. I wish I could configure the title to just show [Root Folder] - [File], since it's hard to distinguish between open projects when the file name is shown first. But some simple templating system would probably solve everyone's problem.

  8. bpasero commented on Nov 1, 2016

    @bpasero
    Contributor

    #12625 for the issue to show the full path in the title bar. This might resolve many (but not all) concerns of this issue.

  9. jamietre commented on Nov 2, 2016

    @jamietre

    Benjamin Pasero (@bpasero) i do appreciate the effort but actually this still does not address the issue (at least as far as Windows) is concerned. It may actually make it worse (though since it's an option that's not an issue).

    The problem is that in Windows, the taskbar shows a preview of all windows for a given application, and there is only limited space to show the title. Showing the full path would give me exactly the opposite problem I have now: I'd just see the part of the path, starting with the root, that fits in the display. So with this enabled, I'd most likely have no information at all about which window was which, since they likely all share a common root path.

    What is really needed is the ability to show project-root/../filename or project-root * filename. The parent folder is nearly always the identifying feature for a project. I don't even care if the filename gets cut off- because I really just want to be able to determine which project is open from the title bar.

    In the example below the only one I can tell which project is open is iter8 because the file name happens to be very short. But even when it's visible, it's hard to visually parse because it's not aligned to anything. I want the project root folder on the left (instead of after the filename) so it is always visible.

    image

  10. bpasero commented on Nov 2, 2016

    @bpasero
    Contributor

    James Treworgy (@jamietre) we can still tweak this experience and I welcome the problem description you gave, though I am not sure how to best solve it.

    Here is how your scenario looks like without the new option enabled:

    image

    And here with the option turned on:

    image

    This makes it hard to see the currently opened file but you can easily see the full path when you compare the 2 window titles in full (not from this experience).

    I think this feature request is still valid for that particular scenario because you could then really compose the title you want, I am not sure we should change the experience by default with the new option.

    I am open for suggestions though if the default experience when this new option is turned on should be changed.

  11. jamietre commented on Nov 2, 2016

    @jamietre

    Thanks for all the feedback, it's very appreciated.

    In my case almost all my code is under a single heirarchy like d:/users/jtreworgy/code/... -- so if I were lucky I might get a few characters of the root folder. But I also work in subfolders with groups of projects, too, so it would be quite realistic for there to be nothing unique at all. I could try to keep everything under shallow heirarchies but I guess I'd rather not have to design my file system architecture around accomodating VS Code ;)

    The perfect world for me would be the ability to pass a template like "{rootFolder} - {fileName}" instead of boolean options for predefined templates. Just having rootFolder, fileName and fullPath as available parameters would accomodate everything that's been discussed here as well as the current state.

    Even more perfect world, the ability to invoke a javascript function that I wrote to return my title given the path as input :) but then I've written a plugin haven't I..

  12. 27 remaining items

  13. tommck commented on Feb 15, 2017

    @tommck

    UPDATE: Ignore this - not a problem

    This doesn't seem to be working for me. I'm not seeing the file name first.. just seeing

    "C:\Path\To\Project - Visual Studio Code - Insiders"

    "window.title": "${dirty}${activeEditorName}${separator}${rootPath}${separator}${appName}",
    

    I restarted the app and opened various files.

    Also, does it require a restart to work? Kind of hard to test what you're doing that way

  14. alexdresko commented on Feb 15, 2017

    @alexdresko
    Author

    Pro tip: You won't see the setting changes when editing the settings file. You have to switch to another file in your workspace to see the changes you've made in the settings. Not sure why that is exactly.

    And it does not require a restart.

  15. tommck commented on Feb 15, 2017

    @tommck

    The tooltip help for it isn't formatting properly either :)
    Should I open a bug?

    image

  16. tommck commented on Feb 15, 2017

    @tommck

    Huh.. I think it's actually updating, but taking a LONG time to do so on this machine. So, I think my problem with the title bar is not a problem.

  17. tommck commented on Feb 15, 2017

    @tommck

    Hmm.. now we just need this feature for the "recent window" list, which just shows the folder name for me, which isn't specific enough (lots of "main" listed in there)

  18. bpasero commented on Feb 22, 2017

    @bpasero
    Contributor

    Small update, I added ${activeFilePathRelative} to be able to show a shorter path to the active opened file if the file is from within the workspace opened. E.g. instead of /Users/Development/myProject/myFolder/myFile.txt showing myFolder/myFile.txt if myFolder is opened. Together with ${rootName} this allows to show a file path as myProject/myFolder/myFile.txt if desired.

  19. bpasero commented on Feb 24, 2017

    @bpasero
    Contributor

    Another update after feedback from testing during this week from the team: ${activeFilePath} and ${activeFilePathRelative} are working only if a file is opened, making the configuration of the window.title hard when non-file editors are opened.

    I decided to revisit the variables around file paths and change them because things are getting complicated when an editor is not showing a file.

    Here is my new solution:

    • ${activeEditorLong}: e.g. /Users/Development/myProject/myFolder/myFile.txt
    • ${activeEditorMedium}: e.g. myFolder/myFile.txt
    • ${activeEditorShort}: e.g. myFile.txt

    If there is no long editor label, the medium one will be used. And the same is true for medium and short.

    Basically:

    • replace ${activeFilePath} with ${activeEditorLong}
    • replace ${activeFilePathRelative} with ${activeEditorMedium}

    I hope this works for everyone, should be available in today's insider build.

  20. nfour commented on Feb 24, 2017

    @nfour

    Benjamin Pasero (@bpasero) is there a way to remove the [Unsupported] suffix in the title, when vscode has a modified installation (I'm using custom CSS)?

    Looks like MyFancyProject [Unsupported] in the title bar.

  21. bpasero commented on Feb 24, 2017

    @bpasero
    Contributor

    No, we strongly advice against using extensions that modify our bits so it is in the best interest to show this not only to you as a user but also to us when we have to investigate bugs which are caused by extensions that patch our bits.

  22. VojtechVitek commented on Mar 22, 2017

    @VojtechVitek

    Benjamin Pasero (@bpasero) "window.title" is a neat addition, thanks. Can we have something similar for tabs?

    screen shot 2017-03-22 at 2 12 13 pm

    I'd love to see the last directory name as a prefix to the filename on all tabs.

    Vim tabs are very smart about tab names btw.

  23. bpasero commented on Mar 23, 2017

    @bpasero
    Contributor

    Yeah this was reported already as feature request.

  24. nileshp87 commented on Apr 26, 2017

    @nileshp87

    I made a quick extension for setting the title for the workspace: https://marketplace.visualstudio.com/items?itemName=nilpatel.title

    Those who find this thread may find it useful.

  25. VojtechVitek commented on Apr 26, 2017

    @VojtechVitek

    Nilesh (@nileshp87) works great, thank you!

    screen shot 2017-04-26 at 7 15 02 pm

  26. locked and limited conversation to collaborators on Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

feature-request

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions