Is it possible for a modified plist file to take effect *without* relaunching the affected app?

Hi all,

During my first venture into modifying .plist files on my own, I discovered that apparently I must relaunch the affected app for the modification to take effect. My question is, how do I work around this limitation, if possible?

For context: I’m using MarginNote to read some PDFs. Because its Dark theme applies to embedded images as well, I frequently find myself changing from the Dark theme to the White theme briefly to view the images. Unfortunately, the theme options are buried in the app preferences and inaccessible from the menubar, so the only way I can think of is by modifying the .plist file:

defaults write QReader.MarginStudyMac mindbooks_uitheme Default

I can then use Keyboard Maestro to run this one-liner with a hotkey. The problem is, the modification doesn’t take effect until I relaunch MarginNote.

Thank you in advance!

When a change in a plist file takes effect is down to when an app reads in and applies a setting from a file. Apps will rarely monitor a file for changes, but rather apply a change when the app itself is responsible for application of the change. It all comes down to what the code in a particular app has been set to do.

Keyboard Maestro could be used to send the appropriate clicks and keystrokes to automate the switch you describe. The best solution might be to contact the developer and ask for an easy way to access the app’s inbuilt method of switching the theme. E.g. A toggle hotkey trigger.


Thank you for the explanation, Stephen!

I guess there’s always the option of UI scripting via KM, and I’ll definitely give this method a try:

I would generally agree with your assessment, but given the slow development of this particular app, I figured I would be better off taking matters into my own hand instead of waiting for a Future Update™.

UI scripting rather than plist editing to change preferences? I think I’d go with that deal, fragile and ugly though it is.

Indeed, that was my reason for avoiding UI scripting at first, too. But I’ll still take it over manually switching themes any day of the week!

1 Like

Surely it would be better to take the Keyboard Maestro approach as an interim and put the request in to the developer(s) as soon as possible? Then even if development is slow, the developer(s) are aware of the request and might be able to do something about it for a future release. Maybe even the next one, even if that were six months away, that’s a lot sooner than probably never.

When you note development is slow it may simply be that development releases are infrequent and they batch together a lot of features in a release. That is often the approach for non-subscription apps.

It looks like they have a pretty active feature request discussion area on their forum, so it should be as easy as having a search through there for any requests that might match your requirements and lending your support to it, or posting your own request to have an option you could use. A hot key, a menu item, etc. But, given that there are four themes, it is not simply a binary toggle - there is a little more complexity there. I would suggest a menu setting would be preferable as you could then assign your own keyboard shortcuts and access it with any automation tool capable of addressing menu options.

FWIW, I just downloaded and installed the app and had a quick look at the details - I couldn’t find any other way to get to the theme settings. There is AppleScript support, but unsurprisingly, theme switching is not an option there. That would be another option for where it could be supported - it is just then a bit more technical to apply something to illicit the changes you would want to occur.


Thank you for the reply! And yes, I definitely will post a request to raise awareness.

S/illicit/elicit/ :slight_smile: - unless that was a Freudian Slit. :slight_smile:

1 Like