I would like to only, always run a single instance of Obsidian:
- if it is not started, start it
- if it is running, focus on it
Since launching Obsidian always starts a new instance, I am doing this through AutoHotkey where I search for the instance and act accordingly.
When reading the forum and Github, I noticed that there are discussions of people who would like to be able to run multiple instances of Obsidian - this implies that they cannot, and this strongly suggests that they are forced into the one instance which is already running → exactly what I would like.
My question: how is this in reality?
Case 1: by default Obsidian reuses an existing instance → I am special and would like to know how to set up the normal, default way
Case 2: by default Obsidian starts a new instance → I am in that default and
- maybe there is a way to set a single instance?
- if not I will open a feature request
EDIT: in case someone would be interested in the AHK code:
ensureObsidianIsOpen()
{
obsidianWindowName := "ahk_exe Obsidian.exe"
DetectHiddenText True
if (WinExist(obsidianWindowName)) {
WinActivate(obsidianWindowName)
} else {
Run "C:\Users\yop\AppData\Local\Obsidian\Obsidian.exe"
}
WinWaitActive(obsidianWindowName)
}