Append path or root directory to title bar to easily identify multiple Typora windows
Perhaps this could be a configuration option.
I have multiple Typora instance open: blog, books, work, ideas, etc.
Each instance is pointing to a different directory.
When I'm selecting which Typora window I want to open, I am often opening multiple because the file name alone is not enough for me to differentiate which project it relates to.
If I could prepend the root directory name (the top-most directory from my File-Tree View) to the title then this would be easier.
Which OS?
Linux/Windows version could be possible, while on macOS the titlebar follows macOS' logic (same as TextEdit.app).
OSX sorry.
Any chance this could be prioritized? It's a very longstanding issue, and has more votes (in the form of duplicates) than most issues.
Linux/Windows version could be possible, while on macOS the titlebar follows macOS' logic (same as TextEdit.app).
sooo... iOS has been holding us back for 6+ years??? ummm yeahhh... keep it simple.
anyway...
I just wrote this little hack of script, its working 95% of the time. If your on windows and know how to to use AutoHotkey v1 you can put this in your script.
SetTimer, SetPathInTyoporaTitleBar, 1000
SetPathInTyoporaTitleBar:
IfWinNotExist, - Typora ahk_class Chrome_WidgetWin_1 ahk_exe Typora.exe
Return
WinGetTitle, TypoTitle, - Typora ahk_class Chrome_WidgetWin_1 ahk_exe Typora.exe
TypoTitle := StrSplit(TypoTitle," - Typora").1
Recent := AppData "\Microsoft\Windows\Recent"
If FileExist(Recent "\" TypoTitle ".lnk")
{
FileGetShortcut, %Recent%\%TypoTitle%.lnk, TypoANX_filepath
WinSetTitle, - Typora ahk_class Chrome_WidgetWin_1 ahk_exe Typora.exe,, %TypoANX_filepath% - Typora
}
Return
alternatively
typo keeps a log of recently opened files (when turned on in prefs)... %appdata%\Typora\typora.log , the file paths could be parsed and applied to the title bar.
macOS is not preventing this from being fixed. NSWindow has a subtitle property which lets you add extra details to a window's title. You just need to loop through the existing open windows whenever a document opens/closes and update the appropriate subtitles if there is ever a conflict.
if let win = self.view.window {
win.subtitle = "~/path"
}
The document window's title bar still behaves the same: