How to ensure the overall zoom level stays as set after restarting Obsidian?

Hi!

What I’m trying to do

After setting the overall zoom level of the obsidian app I like to restart Obsidian and keep the setting.

Things I have tried

I set the zoom level to 144% and then restart Obsidian.

Sadly every time I do that zoom level resets to 100%.

Is there anything I can do about that?

Thanks for reading!

I have reverted to 1.8.10 where zoom is persistent. Zoom in 1.9.12 is not persistent. I used the code snippet

body { zoom: 110%; }

and enabled it, which restores the zoom on startup, but the pop-out menus (like the vault menu and “More Options” menus) go off of the window frame. I realize it may be an Electron bug, but is there any way to fix it in user space?

So this is a bug then?

I tried the CSS you suggested and you are right - some hover lines and also popups like the settings popup are complete misplaced or not complete visible…

Hmm…

I tried with the flatpak and also the native version in KDE.

Shell commands offer Obsidian starts event. I’m not sure whether you can run Obsidian commands using the plugin but Advanced URI offers it.

Linux:

xdg-open "obsidian://adv-uri?commandid="

PowerShell:

Start-Process "obsidian://adv-uri?commandid="

Mac:

open --background "obsidian://adv-uri?commandid="

 

There is zoom in command palette command that can be used in your shell command.

Thank you for your links!

Sadly I cannot understand how to use this - I use OpenSUSE Tumbleweed and can easily change the start command of an application.

  • I cannot find the correct start command. “xdg.open” does open obsidian obviously but the zoom level is the exactly the same - way too small.

  • searching all your links I do not find any examples for the use of “zoom in” or even “zoom”. Could you link me to the documentation of the “zoom in” command you mentioned?

  • In your examples to open Obsidian via the command line - how do you add a command in there? To my understanding xdg-open is used to open an URL or a file with a specified program. So I do not understand where the command would go… - I do not want to apply the command to this URL, right? - I want to add a command to starting Obsidian… - so I guess I don’t want to add the command to “xdg-open” itself but rather add it within the URL?

How do I have to add the “zoom in” command you mentioned?


Still my main concern remains that Obsidian just doesn’t keep it’s setting.

Shouldn’t the setting of the zoom level be stored in the Obsidian settings file just like all other setting? The other settings stick around after a restert - it’s only the overall zoom level that fails…

How can I make Obsidian stick to the setting applied in the zoom settings?

Thanks for helping out!

Cheers,
jhhh

Zoom in command:

Go to settings (Shell commands)

Input new shell command (should be compatible with your system, this example is for mac)

open --background "obsidian://adv-uri?commandid=window%3Azoom-in"

(Advanced URI plugin is used as well)

If you want more zoom, then repeat that command in new lines as shown.

 

Go to events

Check “Obsidian starts”

 

Now zoom in command is executed always when you startup Obsidian.

This is a linux specific bug in 1.9.10

I did manage to work around this issue in a not too ugly way Setting Zoom at startup

Thank you so much! - your explanation is amazing!

This works perfectly - it’s a great workaround until the bug is fixed.

For linux the “zoom in” command is

xdg-open "obsidian://adv-uri?commandid=window%3Azoom-in"

And it works fine with the standard bash shell setting.

Looks a bit weird to zoom in the whole Obsidian application four times (I use the 144% zoom level - that’s 4 times zooming :slight_smile: ) - but it works reliably.

Also settings window pop-ups works and doesn’t get hidden or scaled beneath the applications edge. Just the “Vaults” pop-up doesn’t get zoomed
at all. But I think this is always the case…

Thank you for the step by step walk-through - now I get how to use the Advanced URL and the Shell Commands plugins… - and I learned another trick! Solved it for me.

Cheers!
jhhh