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

hs.preferences - Property List Editor with NSKeyedArchiver support #1498

Open
latenitefilms opened this issue Jul 23, 2017 · 3 comments
Open

Comments

@latenitefilms
Copy link
Contributor

Thank you so much @cmsj for giving us hs.plist - HUGELY appreciated!

Apologies for the delay in testing it - I've only just had a chance to have a proper play.

hs.plist.read and hs.plist.write are awesome - and seem to work as advertised.

However, I'd love something like hs.plist.edit(filepath, key, value), so that we can easily edit existing plist files (similar to how the defaults command line tool works). I'd imagine most Hammerspoon users that make use of hs.plist will be using it to modify macOS Preferences - so I feel like an edit feature would be really handy. As you say yourself in the documentation, it's a little bit risky reading, modifying then re-writing a plist via Lua.

Also, as discussed here, given that a lot of macOS Preferences files now use NSKeyedArchiver, having support to be able to unarchiver then re-archive preferences would also be amazing. I have no idea how complicated this is to do however.

Thoughts?

Thanks again for all your amazing work!!

@latenitefilms
Copy link
Contributor Author

FYI - It looks like @asmagill has already played around with NSKeyedArchiver in readArchiverDataForUTI?

@latenitefilms
Copy link
Contributor Author

@asmagill - I'm considering having a play with your hs._asm.preferences extension, and see if I can work out how to add NSKeyedArchiver support myself. I know you're very busy, but any tips or hints before I begin?

@latenitefilms latenitefilms mentioned this issue Dec 25, 2017
19 tasks
@latenitefilms latenitefilms changed the title hs.plist.edit() & NSKeyedArchiver support? Add hs.preferences with NSKeyedArchiver support Dec 25, 2017
@latenitefilms latenitefilms changed the title Add hs.preferences with NSKeyedArchiver support hs.preferences - Plist file manipulator with NSKeyedArchiver support Dec 25, 2017
@latenitefilms latenitefilms changed the title hs.preferences - Plist file manipulator with NSKeyedArchiver support hs.preferences - Property List Editor with NSKeyedArchiver support Dec 25, 2017
@latenitefilms
Copy link
Contributor Author

I wonder if this (i.e. NSKeyedArchiver support) is something you'd be interested in tackling @waynezhang ?

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