build 1437 - moving to new config system
build 1437 - moving to new config system
Hi everyone,
Here're the first results on new config system for Files:
http://filesmanager.info/downloads/prev ... (1437).zip
Currently (as of 1.1.0) most of application's settings are stored in system "defaults" (also known as NSUserDefaults).
That worked fine so far but there're some drawbacks there:
- defaults are almost impossible to edit by own hands
- it's hard to share them (no cmd+c / cmd+v)
- no cloud-based sync
- hard to make backups/reverts
So, I wanted to achieve the following for next configuration system:
- fast, lightweight (as Files is)
- plain text with comments, readable and editable
- possibility to share settings (like posting here on the forum)
- friendly to external editing (including cloud-based sync systems like Dropbox etc)
And thus, what is available now:
- JSON-based config
- Default settings stored in Files.app/Contents/Resources/Config.json and overwritten values (values that differs from defaults) are stored in ~/Library/Application Support/FIles/Config/Config.json
- saving and loading on the fly, overwrites config file can be edited with any text editor and changes will be immediately reflected in running Files
- most of current settings are migrated automatically
What next:
- move rest of options to plaintext readable&editable JSON (network connections settings, shortcuts, history etc)
- option to set ../Config/ directory to arbitrary place, like for instance placing it in shared Dropbox folder - so any running instances of Files (i.e. home/work machines for examples) will share the same config
What do you think on these coming changes?
Mike.
Here're the first results on new config system for Files:
http://filesmanager.info/downloads/prev ... (1437).zip
Currently (as of 1.1.0) most of application's settings are stored in system "defaults" (also known as NSUserDefaults).
That worked fine so far but there're some drawbacks there:
- defaults are almost impossible to edit by own hands
- it's hard to share them (no cmd+c / cmd+v)
- no cloud-based sync
- hard to make backups/reverts
So, I wanted to achieve the following for next configuration system:
- fast, lightweight (as Files is)
- plain text with comments, readable and editable
- possibility to share settings (like posting here on the forum)
- friendly to external editing (including cloud-based sync systems like Dropbox etc)
And thus, what is available now:
- JSON-based config
- Default settings stored in Files.app/Contents/Resources/Config.json and overwritten values (values that differs from defaults) are stored in ~/Library/Application Support/FIles/Config/Config.json
- saving and loading on the fly, overwrites config file can be edited with any text editor and changes will be immediately reflected in running Files
- most of current settings are migrated automatically
What next:
- move rest of options to plaintext readable&editable JSON (network connections settings, shortcuts, history etc)
- option to set ../Config/ directory to arbitrary place, like for instance placing it in shared Dropbox folder - so any running instances of Files (i.e. home/work machines for examples) will share the same config
What do you think on these coming changes?
Mike.
Re: build 1437 - moving to new config system
Few observations.
Could be a good idea to have a way how to migrate the old settings into the new format - an utility of sorts? Or, being new to Mac, I am missing something obvious here.
Next - connection settings. Do I understand correctly that passwords are stored in Keychain?
Just checking.
Could be a good idea to have a way how to migrate the old settings into the new format - an utility of sorts? Or, being new to Mac, I am missing something obvious here.
Next - connection settings. Do I understand correctly that passwords are stored in Keychain?
Just checking.
Re: build 1437 - moving to new config system
Ok, the only setting that went off is the panels and fonts.
Recovered.
Other settings seem to have been migrated.
Recovered.
Other settings seem to have been migrated.
Re: build 1437 - moving to new config system
Ok. I like the idea.
Checked the file and moved them into backup folder - migrating this stuff will be quite easy.
All good!
Checked the file and moved them into backup folder - migrating this stuff will be quite easy.
All good!
Re: build 1437 - moving to new config system
Oh yeah! This is the kind of stuff I like. Easy to backup and share with others. Also allows you to add extra, advanced options available for people who like to tinker with stuff. Cool!
BTW, it looks like everything migrated fine on my side. But I haven't had many customizations, to be honest, so it was easy
BTW, it looks like everything migrated fine on my side. But I haven't had many customizations, to be honest, so it was easy
Re: build 1437 - moving to new config system
Guys,
Thanks for comments!
Passwords for network connections are currently stored in OS X Keychain (and that is Apple's recommended way), but I think it might be useful to allow storing (and thus editing) them in config files so they can be synchronised between multiple instances of Files.
However, that's a trade-off between usability and security, not sure what is right here.
BTW, there's already a plenty of options which can be tuned only by editing a config file.
Mike.
Thanks for comments!
Passwords for network connections are currently stored in OS X Keychain (and that is Apple's recommended way), but I think it might be useful to allow storing (and thus editing) them in config files so they can be synchronised between multiple instances of Files.
However, that's a trade-off between usability and security, not sure what is right here.
BTW, there's already a plenty of options which can be tuned only by editing a config file.
Mike.
Re: build 1437 - moving to new config system
Re passwords - from my perspective the Keychain is the best place to keep them.
What options are available through the file config only?
We desperately need a wiki!
What options are available through the file config only?
We desperately need a wiki!
Re: build 1437 - moving to new config system
Don,
Yep, Keychain is quite convenient, but in case of shared config you'll have to enter passwords on every machine - that's the point of having password stored directly in config.
As for options available only in config - mostly that's a fine tuning like extensions white lists, but I expect more of them to come.
(you can take a look at Config.json itself, there're comments there and I think key names are self-explaining)
Wiki manual will be written, I plan to work on that direction after renaming Files and moving to new domain/website.
Mike.
Yep, Keychain is quite convenient, but in case of shared config you'll have to enter passwords on every machine - that's the point of having password stored directly in config.
As for options available only in config - mostly that's a fine tuning like extensions white lists, but I expect more of them to come.
(you can take a look at Config.json itself, there're comments there and I think key names are self-explaining)
Wiki manual will be written, I plan to work on that direction after renaming Files and moving to new domain/website.
Mike.
Re: build 1437 - moving to new config system
Hello, I hope the JSON based config will be one of the options to interface with saved preferences, while File.app still maintaining proper format with system's default. The reason is because of uniformity; I use the system command "defaults," to set and manage all my preferences when possible (quite useful when setting up new users and moving to new macs), and it would be great for people like me who still follow the system developer's way of applying settings.
Cheers.
Cheers.
Re: build 1437 - moving to new config system
Hi grapte and welcome to forum!
Frankly I'm quite surprised with using defaults system for deploying/migration purposes.
IMHO defaults are not intended for this usage, are you running own scripts or some app to modify app's settings via defaults?
I think that copying a bunch of config files is much simpler approach for settings migration.
Speaking about Files - there were already some settings stored in ~/Library/Application Support/ directory, like hotkey overrides, external editors settings, viewer history and so on...
Mike.
Frankly I'm quite surprised with using defaults system for deploying/migration purposes.
IMHO defaults are not intended for this usage, are you running own scripts or some app to modify app's settings via defaults?
I think that copying a bunch of config files is much simpler approach for settings migration.
Speaking about Files - there were already some settings stored in ~/Library/Application Support/ directory, like hotkey overrides, external editors settings, viewer history and so on...
Mike.