aerobounce / defaults.sh Goto Github PK
View Code? Open in Web Editor NEW User Defaults Plist → Shell Script converter with Regex filtering
License: GNU Affero General Public License v3.0
User Defaults Plist → Shell Script converter with Regex filtering
License: GNU Affero General Public License v3.0
When I use ds save
, I see NSGlobalDomain.currentHost.sh
, including modifier keys like:
defaults -currentHost write NSGlobalDomain "com.apple.keyboard.modifiermapping.1118-1957-0" '
<array>
<dict>
<key>HIDKeyboardModifierMappingDst</key>
<real>30064771299</real>
<key>HIDKeyboardModifierMappingSrc</key>
<real>30064771302</real>
</dict>
<dict>
<key>HIDKeyboardModifierMappingDst</key>
<integer>30064771303</integer>
<key>HIDKeyboardModifierMappingSrc</key>
<integer>30064771298</integer>
</dict>
<dict>
<key>HIDKeyboardModifierMappingDst</key>
<real>30064771298</real>
<key>HIDKeyboardModifierMappingSrc</key>
<real>30064771303</real>
</dict>
<dict>
<key>HIDKeyboardModifierMappingDst</key>
<integer>30064771302</integer>
<key>HIDKeyboardModifierMappingSrc</key>
<real>30064771299</real>
</dict>
</array>
'
Is there a way to access this directly?
ds -d NSGlobalDomain
doesn't include these, and ds
doesn't have a -currentHost
flag. Anything I'm missing?
I'm a big fan of defaults.sh! I converted a number of my plists in git into shell scripts over last weekend.
One of my goals, though, was to stop seeing changes that I don't care about. I was encountering issues where Sparkle, for example, would update a plist value that I don't actually care about.
If I wanted to filter out a single Sparkle entry, I could do something like this, and not have to worry about it
ds com.some.app | grep -v SULastCheckTime
This doesn't necessarily scale well, IMO, and for values that are multi-line, I wouldn't expect it to work at all.
I'm curious whether you'd be open to adding arguments so it would be possible to run
ds com.some.app --ignore 'SU*' --ignore SomeKeyIDoNotCareAbout --allow SUThisIActuallyCareAbout
In my mind, allow would override ignore, and either would accept multiple values. I'd be happy to send a PR if you're interested.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.