Path in tab title

by d9k
5
4
3
2
1
Score: 35/100

Description

This plugin has not been manually reviewed by Obsidian staff. Show folders names in the tabs titles.

Reviews

No reviews yet.

Stats

stars
14
downloads
0
forks
1
days
NaN
days
NaN
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
0
commits

Latest Version

Invalid date

Changelog

README file from

Github

Obsidian path in tab title plugin

plugin screenshot

Installation

Copy over main.js, manifest.json to your vault into subfolder .obsidian/plugins/path-in-tab-title/. Restart Obsidian, enable plugin in settings ([Cogwheel button] -> Community plugins -> Installed Plugins)

Known limitations

  • There is the delay before updating tab title.
  • Tabs titles are reset to default after the app restart.
  • Only focused tabs titles are changed

Styling

Recommended styles:

.workspace-tab-header-inner-title small {
  opacity: 70%;
}

Build with

See also

Alternative approach

Better to replace this code in app.js

            t.prototype.getDisplayText = function() {
                return this.file ? this.file.basename : im.interface.noFile()
            }

with something like

            t.prototype.getDisplayText = function() {
    			      // return this.file ? this.file.basename : im.interface.noFile()
                if (!this.file) {
                    return im.interface.noFile();
                }

                return this.file.path.split('/').slice(-2).join('/')
            }

But I don't know how to patch Electron app :man_shrugging: