niwaniwa0.1.2
saru-id/niwa
niwaniwa

System settings

Six calls declare what macOS itself does: preference domains, the Dock, the Finder, and three machine-wide settings.

niwa.defaults

niwa.defaults(domain: string, values: { [string]: Plist }, options: { restart: string? }?) -> Result

Set keys in a preference domain, user or /Library. Each key is its own resource, so two modules can declare different keys of one domain and only a real collision is a conflict. restart names the application to restart once the keys change.

niwa.dock

niwa.dock(settings: { autohide: boolean?, tilesize: number?, apps: { string }?, minimize_effect: ("genie" | "scale" | "suck")? }) -> Result

Declare the Dock. It is sugar over defaults for the four settings people change, and it restarts the Dock for you.

niwa.finder

niwa.finder(settings: { show_hidden: boolean?, default_view: ("list" | "icon" | "column" | "gallery")?, path_in_title: boolean? }) -> Result

Declare the Finder. The same sugar as the Dock call, for three settings.

niwa.hosts

niwa.hosts(entries: { [string]: string }) -> Result

Declare entries in /etc/hosts. Keys are host names, values are addresses, and each entry is its own resource. Lines you did not declare stay where they are.

niwa.login_shell

niwa.login_shell(path: string) -> Result

Set the login shell. It adds the path to /etc/shells and runs chsh, and it needs administrator rights.

niwa.hostname

niwa.hostname(name: string) -> Result

Set the machine's hostname. It needs administrator rights.

Next

↑↓ navigate · enter opens · esc closes