Is tab title alterable within the Obsidian API?

Currently, the title of the tab is the name of the file; we’d like to alter it to be the path of the file (or whatever we want). However, we don’t know whether there is an option in the Obsidian API to alter what is displayed in the tab’s title. Is there?

Supporting info:

“Tab title” might not be the right name for what I’m talking about, so here’s what I’m talking about if it isn’t. The name of this tab is “coding1”; we’d like to change it to be “coding/coding1” (or anything).

Screen Shot 2023-01-19 at 15.07.24

There are existing plugins which do something similar, but not this.

Screen Shot 2023-01-19 at 15.10.27

1 Like

I want this.

It would help me in project management.

I have a folder per project. Each project has files like Events, Tasks, Phases, Resources and so on.

If I have my Events file from project A open at the same time as my events file from project B then Obsidian shows me two tabs called Events and I don’t know which is which.

Therefore I would like the option to show the path (even just the parent folder name) in the tab.

I, too, would benefit from this. In my currently developed plugin, obsidian-file-diff, I open a new view to display the differences between two files. Currently, the title reads “No file,” which is confusing. I’d like to change it to “Differences.”

You can just change it through the DOM if you want?

document.querySelector('.workspace-tabs.mod-active .workspace-tab-header.is-active .workspace-tab-header-inner-title').innerText = 'New text'

Inspect to find out what your specific selector is, depending on what you have focused in the app.