Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings and preferences import/export CLI #255

Open
kdeldycke opened this issue Dec 29, 2020 · 2 comments
Open

Settings and preferences import/export CLI #255

kdeldycke opened this issue Dec 29, 2020 · 2 comments

Comments

@kdeldycke
Copy link

kdeldycke commented Dec 29, 2020

Is your feature request related to a problem? Please describe.

Since #159 & #119, we can export and import iGlance settings by the way of a JSON file. That's a great feature which is working well!

Now I'd like to script the loading of these settings, so I can automate even more the deployment of my dotfiles.

Describe the solution you'd like

I'd like to have the option of starting/invoking iGlance with a CLI to load up defaults settings.

Something in the spirit of:

$ /Applications/iGlance.app --import-settings ~/dotfiles/assets/iglance-settings.json

Describe alternatives you've considered

I tried to tweak settings via the preferences plist file (located ~/Library/Preferences/io.github.iglance.iGlance.plist).

But it seems user settings are somewhat serialized binary format (is that JSON?):

$ defaults read io.github.iglance.iGlance
{
    SUHasLaunchedBefore = 1;
    SULastCheckTime = "2020-12-29 12:22:59 +0000";
    iGlanceUserSettings = {length = 985, bytes = 0x62706c69 73743030 da010203 04050607 ... 00000000 00000311 };
}
@kdeldycke
Copy link
Author

For reference, this is related to: #142

@kdeldycke
Copy link
Author

kdeldycke commented Dec 29, 2020

For inspiration, I'd like to point to Aerial (an open-source Swift project), which managed to persist all its settings in a JSON serialized string. I guess there is some good code/practice in its code to follow. See the discussion at JohnCoates/Aerial#976 to get a good understanding of this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant