hs.settings.bundleID
defaults
or other tools which allow access to the User Defaults
of applications, to access these outside of Hammerspoonhs.settings.dateFormat
hs.setDate()
. e.g. os.date(hs.settings.dateFormat)
hs.settings.clear(key) -> bool
hs.settings.get(key) -> string or boolean or number or nil or table or binary data
hs.settings.set()
, hs.settings.setData()
and hs.settings.setDate()
hs.settings.getKeys() -> table
ipairs(hs.settings.getKeys())
to iterate over all available settingshs.settings.getKeys()["someKey"]
to test for the existance of a particular keyhs.settings.set(key[, val])
hs.settings.setDate()
and hs.settings.setData()
hs.settings.clear
hs.settings.setData(key, val)
hs.settings.setDate(key, val)
1970-01-01 00:00:00 +0000
(e.g. os.time()
), or a string containing a date in RFC3339 format (YYYY-MM-DD[T]HH:MM:SS[Z]
)hs.settings.dateFormat
for a convenient representation of the RFC3339 format, to use with other time/date related functionshs.settings.watchKey(identifier, key, [fn]) -> identifier | current value
| | -----------------------------------------------------|---------------------------------------------------------------------------------------------------------| | Type | Function | | Description | Get or set a watcher to invoke a callback when the specified settings key changes | | Parameters |