{"id":17494333,"url":"https://github.com/lkubb/salt-tool-macos-formula","last_synced_at":"2026-02-01T01:04:59.162Z","repository":{"id":134852597,"uuid":"483880981","full_name":"lkubb/salt-tool-macos-formula","owner":"lkubb","description":"Configure macOS with idempotent state definitions.","archived":false,"fork":false,"pushed_at":"2024-12-02T17:07:30.000Z","size":5146,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T22:01:46.564Z","etag":null,"topics":["devops","macos","salt-formula","saltstack"],"latest_commit_sha":null,"homepage":"","language":"SaltStack","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lkubb.png","metadata":{"files":{"readme":"docs/README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-04-21T02:34:04.000Z","updated_at":"2024-12-02T17:07:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2a64c83-b758-444d-a135-f79e3ac539e3","html_url":"https://github.com/lkubb/salt-tool-macos-formula","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lkubb/salt-tool-macos-formula","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-macos-formula","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-macos-formula/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-macos-formula/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-macos-formula/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lkubb","download_url":"https://codeload.github.com/lkubb/salt-tool-macos-formula/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lkubb%2Fsalt-tool-macos-formula/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28963203,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T00:42:38.011Z","status":"ssl_error","status_checked_at":"2026-02-01T00:42:35.920Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["devops","macos","salt-formula","saltstack"],"created_at":"2024-10-19T13:06:13.402Z","updated_at":"2026-02-01T01:04:59.145Z","avatar_url":"https://github.com/lkubb.png","language":"SaltStack","funding_links":[],"categories":[],"sub_categories":[],"readme":".. _readme:\n\nmacOS Configuration Formula\n===========================\n\nConfigures MacOS. This formula is a collection of knowledge I collected or discovered. It is intended as both documentation and to provide automation. Many of the options in MacOS are poorly documented and change frequently and without notice. This is my attempt to mitigate a small part of that (especially **for macOS Monterey**).\n\nPlease be aware that this formula reaches deeply into your system and is to be considered highly experimental. Use it as you see fit. Things are probably going to be fine, but there are no warranties.\n\n.. contents:: **Table of Contents**\n   :depth: 1\n\nUsage\n-----\nApplying ``tool_macos`` will make sure MacOS is configured as specified.\n\nTo manage defaults for sandboxed applications (like Mail, Messages), your terminal emulator will need **Full Disk Access** (grant it in System Preferences -\u003e Security \u0026 Privacy). This is also true for Time Machine configuration and some other protected files.\n\nExecution and state module\n~~~~~~~~~~~~~~~~~~~~~~~~~~\nThis formula provides several execution modules and states to manage ``defaults``, profiles and power management settings as well as default handlers for files and URL schemes. The functions are self-explanatory, please see the source code or the rendered docs at :ref:`execution_modules:` and :ref:`state_modules`.\n\nSome of them are patched variants of modules written by other people, mostly `mosen \u003chttps://github.com/mosen/salt-osx\u003e`_ in particular (``macprofile``, afaik he is also the original author of the official ``macdefaults`` modules). They were either not working on modern systems (profile installation cannot be done non-interactively without being enrolled in an MDM anymore) or lacking features I needed (e.g. ``defaults -currentHost``).\n\nConfiguration\n-------------\nThe options described below are organized as I saw fit. If you don't understand something or want further information, look in ``docs/settings`` or the state source files. The state files that apply the settings are laid out exactly like the option dictionary.\n\nPerformance\n~~~~~~~~~~~\nThis formula bends Salt quite a bit. It also features an exorbitant amount of atomic state files that are always rendered during every run. Since Salt currently `has some caching issues \u003chttps://github.com/saltstack/salt/issues/39017\u003e`_ regarding Jinja variables, it was necessary to introduce a workaround to avoid excessive rendering times.\n\nThis workaround requires to have access to a pillar dictionary found at ``tool_macos``. It can be empty if you so desire, just has to be there. In case you do all your configuration in fileserver YAML files, make sure to **include** ``tool_macos: {}`` **in your pillar**, otherwise your system might go for an extended run on an imaginary hamster wheel while you are sitting there reconsidering your life choices.\n\nThis formula\n~~~~~~~~~~~~\nThe general configuration structure is in line with all other formulae from the `tool` suite, for details see :ref:`toolsuite`. An example pillar is provided, see :ref:`pillar.example`. Note that you do not need to specify everything by pillar. Often, it's much easier and less resource-heavy to use the ``parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml`` files for non-sensitive settings. The underlying logic is explained in :ref:`map.jinja`.\n\nUser-specific\n^^^^^^^^^^^^^\nThe following shows an example of ``tool_macos`` per-user configuration. If provided by pillar, namespace it to ``tool_global:users`` and/or ``tool_macos:users``. For the ``parameters`` YAML file variant, it needs to be nested under a ``values`` parent key. The YAML files are expected to be found in\n\n1. ``salt://tool_macos/parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml`` or\n2. ``salt://tool_global/parameters/\u003cgrain\u003e/\u003cvalue\u003e.yaml``.\n\n.. code-block:: yaml\n\n  user:\n\n      # Persist environment variables used by this formula for this\n      # user to this file (will be appended to a file relative to $HOME)\n    persistenv: '.config/zsh/zshenv'\n\n      # Add runcom hooks specific to this formula to this file\n      # for this user (will be appended to a file relative to $HOME)\n    rchook: '.config/zsh/zshrc'\n\n      # This user's configuration for this formula. Will be overridden by\n      # user-specific configuration in `tool_macos:users`.\n      # Set this to `false` to disable configuration for this user.\n    macos:\n      animations:\n          # False to disable, or dict: {on: float, off: float} for periods\n        cursor_blinking:\n          'off': 1.5\n          'on': 1.5\n          # Enable/disable app icons bouncing when needing attention.\n        dock_bounce: true\n        dock_launch: true\n          # genie, scale, suck\n        dock_minimize: genie\n          # This mostly affects the `File Info` dialog.\n        finder_windows: true\n          # Focus ring blend-in animation.\n        focus_ring: true\n          # New window animations in MacOS.\n        macos_windows: true\n          # Mission Control animation time (float).\n        mission_control: 0.5\n          # `reduce motions` in `Accessibility`.\n          # E.g. changes space swiping to fade.\n        motion_reduced: false\n        multidisplay_swoosh: true\n        window_resize_time: 0.5\n      apps:\n        messages:\n          read_receipts: true\n      audio:\n        charging_sound: true\n          # Basso, Blow, Bottle, Frog, Funk, Glass, Hero, Morse, Ping,\n          # Pop, Purr, Sosumi, Submarine, Tink\n        sound_effect_alert: Tink\n          # Sound effect volume in parts of current output volume. 0.5 = 50% etc.\n        sound_effect_volume: 1\n        sound_effect_volumechange: false\n          # This only affects macOS, not apps.\n        sound_effects_system: true\n          # This is the global default for any app.\n        sound_effects_ui: true\n          # Spatial audio follows head movements.\n        spatial_follow_head: true\n        # Default \"background/magic\" behavior. Find UI/UX in uix.\n      behavior:\n          # Default behavior: silently save changes and exit.\n          # Set to true to force prompts.\n        confirm_on_close: false\n        crashreporter: true\n          # Controls whether `Feedback Assistant` autogathers large files.\n        feedback_assistant_autogather: true\n        handoff_allow: true\n        help_window_floats: true\n          # Controls what happens when media was inserted.\n          # Can be str [ignore / ask / finder / itunes / disk_utility]\n          # to control all or dict for specific types.\n        media_inserted:\n          blank_cd: ask\n          blank_dvd: ask\n          music: itunes\n          picture: ask\n          video: ask\n          # `Mission Control groups windows by application`\n        mission_control_grouping: true\n          # Display time for notifications in seconds.\n        notification_display_time: 5\n          # Photos app is launched automatically when iPhone is plugged in.\n        photos_hotplug: true\n          # Controls the behavior when the power button is pressed.\n          # true = power button induces sleep, false = prompt what to do\n        power_button_sleep: true\n          # Controls the default state of the print panel.\n        print_panel_expanded: false\n          # Automatically quit print app when all jobs are finished.\n        printqueue_autoquit: false\n          # By default, recreate previously open windows.\n        resume_app: true\n          # Controls the default state of the save panel.\n        save_panel_expanded: false\n          # `Automatically rearrange spaces based on recent usage`\n        spaces_rearrange_recent: true\n        spaces_span_displays: false\n          # When clicking a running app in the Dock, switch to a containing workspace.\n        spaces_switch_running: true\n          # Generally prefer tabs to windows:\n          #     manual, fullscreen or always\n        tab_preference: fullscreen\n          # When clicking the wallpaper, hide open windows to reveal desktop items.\n        wallpaper_click_hides_windows: true\n      display:\n          # false = disabled (default), true = enabled\n        antialias_subpixel: false\n          # Threshold for enabling antialiasing (font size in pixels).\n        antialias_threshold: 4\n          # disabled(0) / light(1) /medium(2) / heavy(3)\n        font_smoothing: medium\n        nightshift:\n          enabled: true\n          schedule:\n            # 'HH:mm' or HH\n            # Make sure to quote the former to stop YAML from doing weird stuff.\n            # Why is 22:15 = 1335?\n            end: '13:37'\n            start: 3\n            # 2700-6000\n          temperature: 4100\n        truetone: true\n      dock:\n        autohide:\n          delay: 0.5\n          enabled: false\n          time: 0.5\n        hint_hidden: false\n        hint_running: true\n        magnification:\n          enabled: false\n          size: 128\n        minimize_to_icon: true\n          # Persistent Dock tiles. `false` for running apps only.\n        persistent_tiles: true\n          # Dock position: bottom, left, right\n        position: bottom\n        recently_opened: true\n        scroll_to_open: false\n          # Single-app mode: Launching from dock hides all other apps.\n        single_app: false\n        size:\n          immutable: false\n          tiles: 48\n        spring_loading: false\n        stack_hover: false\n        tiles:\n          apps:\n                # Paths can be specified, type will be autodetected.\n            - /Applications/TextEdit.app\n              # Empty items are small-spacer[s].\n            -\n              # This is the verbose variant for app definition.\n                # The label will otherwise equal the app name without .app.\n            - label: Sublime\n              path: /Applications/Sublime Text.app\n              type: file\n                # Add different spacers with [small-/flex-]spacer.\n            - small-spacer\n            - label: FF\n                # The type will be autodetected as above.\n              path: /Applications/Firefox.app\n          others:\n                # Sort by: name / added / modified / created / kind\n            - arrangement: added\n                # View items as `stack` or `folder`.\n              displayas: stack\n                # The label would be set to `Downloads` otherwise.\n              label: DL\n              path: /Users/user/Downloads\n                # Layout: auto / fan / grid / list.\n              showas: grid\n                # The type will be autodetected as well.\n              type: directory\n            - spacer\n                # Defaults: sort by added, display as stack,\n                #           layout auto. Label: Documents.\n            - /Users/user/Documents\n            - flex-spacer\n                # URL can be added as well.\n            - https://www.github.com\n            # Don't append, make it exactly like specified.\n            # Note: Currently forced to `true`.\n          sync: true\n      files:\n        default_handlers:\n            # File extensions will be automatically resolved to all associated UTI.\n            # Handlers can be specified by name, bundle ID or absolute path.\n          extensions:\n            csv: Sublime Text\n            html: Firefox\n          schemes:\n              # This will set https as well, a user prompt is shown for confirmation.\n            http: org.mozilla.Firefox\n            ipfs: /Applications/Brave Browser.app\n            torrent: Transmission\n          utis:\n            public.plain-text: TextEdit\n          # Avoid cluttering usb / network / all [= both types] / none\n          # mounts with .DS_Store files.\n        dsstore_avoid: all\n          # Default location of \"Save as...\". iCloud vs local.\n        save_icloud: true\n        screenshots:\n          basename: custom_prefix\n            # Image format: png / bmp / gif / jp(e)g / pdf / tiff\n          format: png\n            # Whether to show the cursor in screenshots.\n          include_cursor: false\n            # Whether to include date in the filename.\n          include_date: true\n            # Default: ~/Desktop. Needs absolute path!\n          location: /Users/h4xx0r/screenshots\n            # Actually called `dropshadow`.\n          shadow: true\n            # Show floating thumbnail.\n          thumbnail: true\n      finder:\n          # Enable AirDrop over Ethernet and on unsupported Macs.\n        airdrop_extended: false\n        desktop_icons:\n            # Arrange icons automatically by:\n            #   none, grid, name, kind, last_opened, added,\n            #   modified, created, size, tags\n          arrange: grid\n          info: false\n          info_bottom: true\n          show: true\n          size: 64\n          spacing: 54\n          text_size: 12\n        dmg_verify: true\n        fileinfo_popup:\n          comments: false\n          metadata: true\n          name: false\n          openwith: true\n          privileges: true\n        folders_on_top: false\n          # New finder windows open at:\n          #   computer / volume / home / desktop / documents / \u003c/my/custom/path\u003e\n        home: recent\n          # Open a new window on mount of volume of type.\n        new_window_on_mount:\n          - ro\n          - rw\n          - disk\n        pathbar_home_is_root: false\n        prefer_tabs: true\n          # Finder can be quit =\u003e no desktop icons shown.\n        quittable: false\n          # Finder searches by default relative to\n          #   mac, current, previous\n        search_scope_default: mac\n          # Show external HDD on the desktop.\n        show_ext_hdd: true\n        show_extensions: false\n          # Show hidden files.\n        show_hidden: false\n          # Show internal HDD on the desktop.\n        show_int_hdd: false\n        show_library: false\n          # Show mounted NAS drives on the desktop.\n        show_nas: true\n        show_pathbar: false\n          # Open folder when dragging file on top.\n        spring_loading:\n          delay: 0.5\n          enabled: true\n          # Delay on hover for proxy icons to show up.\n        title_hover_delay: 0.5\n          # Show full POSIX path in window title.\n        title_path: false\n          # Remove items older than 30 days automatically from trash.\n        trash_old_auto: true\n        view:\n          column:\n              # By default, sort items by\n              #   none, name, kind, last_opened, added, modified, created, size, tags\n            arrange: name\n            col_width: 245\n            folder_arrow: true\n            icons: true\n            preview: true\n            preview_disclosure: true\n            shared_arrange: kind\n            text_size: 13\n            thumbnails: true\n          gallery:\n              # By default, sort items by\n              #   none, name, kind, last_opened, added, modified, created, size, tags\n            arrange: name\n            icon_size: 48\n            preview: true\n            preview_pane: true\n            titles: false\n          icon:\n              # By default, sort items by\n              #   none, name, grid, kind, last_opened, added,\n              #   modified, created, size, tags\n            arrange: grid\n            info: false\n            info_bottom: true\n            size: 64\n            spacing: 54\n            text_size: 12\n          list:\n            calc_all_sizes: false\n            icon_size: 16\n            preview: true\n            relative_dates: true\n              # By default, sort rows by\n              #   name, kind, last_opened, added, modified, created, size, tags\n            sort_col: name\n            text_size: 13\n          preferred:\n              # By default, automatically group by:\n              #   name, app, kind, last_opened, added, modified, created, size, tags\n            groupby: none\n              # By default, open Finder folders with layout set as\n              #   icon / list / gallery / column [coverflow deprecated]\n            style: icon\n          # Show warning when changing a file extension.\n        warn_on_extchange: true\n          # Show warning when removing files from iCloud Drive.\n        warn_on_icloud_remove: true\n          # Show warning when emptying the trash.\n        warn_on_trash: true\n      keyboard:\n          # Fn triggers:\n          #   none, dictation, emoji, input_source\n        fn_action: none\n          # Use function keys as standard function keys instead of system keys\n          # by default. Press Fn + F1-12 to trigger system actions.\n        function_keys_standard: false\n      localization:\n          # `12h` or `24h`. This forces the format, regardless of locale.\n        force_124h: 24h\n          # List of active system languages. `name-country` separated by dash.\n        languages:\n          - en-US\n          - en-NZ\n          # Show measurements in\n          #   metric, US, UK\n        measurements: metric\n        # Customize Mail.app. Note that your terminal application\n        # needs Full Disk Access for this to work.\n      mail:\n          # Those accounts will be installed interactively (as profile).\n        accounts:\n          - address: elliotalderson@protonmail.ch\n              # Account description. Default: \u003caddress\u003e\n            description: dox\n              # Name shown as sender. Default: \u003cusername portion of address\u003e\n            name: Elliot\n              # Incoming mailserver settings.\n            server_in:\n                # IMAP/POP authentication type is\n                #   none, password, crammd5, ntlm, httpmd5\n              auth: password\n              domain: 127.0.0.1\n                # IMAP/POP port on the server. Default: 993\n              port: 1143\n              ssl: true\n                # Username for IMAP/POP auth. Default: \u003caddress\u003e\n              username: elliotalderson@protonmail.ch\n            server_out:\n                # SMTP authentication type is\n                #   none, password, crammd5, ntlm, httpmd5\n              auth: password\n              domain: 127.0.0.1\n                # Use the same password as for IMAP/POP and SMTP.\n              password_sameas_in: true\n                # SMTP port on the server. Default: 465\n              port: 1025\n              ssl: true\n                # Username for SMTP auth. Default: \u003caddress\u003e\n              username: elliotalderson@protonmail.ch\n              # The protocol used by the MUA for this account:\n              #   imap, pop\n            type: imap\n          # Whether to animate sending replies.\n        animation_reply: true\n          # Whether to animate sending messages.\n        animation_sent: true\n          # Whether to show attachments inline.\n        attachments_inline: true\n          # Suppress warning on fail, silently try later again.\n        auto_resend_later: true\n          # Whether to mark all messages as read when viewing conversation.\n        conv_mark_all_read: true\n          # Whether to display the latest message on top (sort asc/desc).\n        conv_most_recent_top: true\n          # Unread count in dock depends on\n          #   inbox / all\n        dock_unread_count: inbox\n          # Delete unedited attachments on: never, app_quit, message_deleted\n        downloads_remove: when_deleted\n          # Automatically match format when replying (HTML vs plaintext)\n        format_match_reply: true\n          # Prefer sending messages in\n          #   rich / plain\n        format_preferred: rich\n          # Highlight conversations with color when not grouped.\n        highlight_related: true\n          # Whether to include names when copying mail addresses.\n        include_names_oncopy: true\n          # Include related messages.\n        include_related: true\n          # Show notification when a new message is received in / from:\n          #   inbox, vips, contacts, all\n        new_message_notifications: inbox\n          # '' to disable, else see `audio.sound_effect_alert`.\n        new_message_sound: New Mail\n          # Poll for new mesages:\n          #   auto, manual or int [minutes between polls]\n        poll: auto\n          # Whether to load remote content in mails automatically.\n        remote_content: true\n        respond_with_quote: true\n          # Set custom shortcut to send message. E.g., this is Cmd + Enter.\n        shortcut_send: '@\\U21a9'\n          # Show unread messages in bold font.\n        unread_bold: false\n          # This is different from highlight_related.\n        view_conversations_highlight: true\n        view_date_time: false\n          # Preview messages in split view when in fullscreen mode.\n        view_fullscreen_split: true\n          # Display message sizes in overview.\n        view_message_size: false\n        view_threaded: true\n      menubar:\n        accessibility:\n          control: false\n          menu: false\n        airdrop: false\n        autohide_desktop: false\n        autohide_fullscreen: true\n        battery:\n          control: false\n          menu: true\n          percentage: false\n        bluetooth: false\n        clock:\n          analog: false\n          flash_seconds: false\n          format: EEE HH:mm\n        display: when_active\n        focus: when_active\n        keyboard_brightness: false\n        now_playing: when_active\n        screen_mirroring: when_active\n        siri: true\n          # Show sound icon: true, false, when_active\n        sound: when_active\n        spotlight: false\n        timemachine: false\n        userswitcher:\n          control: false\n          menu: false\n            # Userswitcher shows:\n            #   icon, username, fullname\n          menu_show: icon\n        wifi: true\n      performance:\n        app_nap: true\n        auto_termination: true\n        screensaver:\n            # Seconds of inactivity until screensaver starts. 0 to disable.\n          after: 300\n            # Show clock with screensaver.\n          clock: false\n      privacy:\n        allow_targeted_ads: true\n        searches_share: true\n        siri_share_recordings: false\n      security:\n        airdrop: true\n          # Require password after sleep.\n          # This is sadly deprecated and would\n          # need to install a profile to be supported still.\n        password_after_sleep:\n          delay: 0\n          require: true\n        password_hint_after: 3\n          # Fun fact: MacOS keeps a log of all downloaded files ever.\n        quarantine_logs:\n            # Enable this to clear logs during the salt run.\n          clear: false\n            # Disable this to prevent keeping logs at all.\n          enabled: true\n          # Allows to hide this user from login window\n          # and public share points as well as his home dir from Finder.\n        user_hidden: false\n          # Remove this user from FileVault. Cannot be added back automatically.\n        user_no_filevault: false\n        # User-specific services management.\n        # (system-wide is available in formula config)\n      services:\n          # List of Login Items to disable.\n        unwanted:\n          - com.spotify.client.startuphelper\n          # List of Login Items to enable.\n        wanted:\n          - com.raycast.macos.RaycastLauncher\n      siri:\n          # Mind that toggling this setting via System Preferences does much more.\n        enabled: false\n          # Trigger siri with\n          #   default (=off/hold microphone key), cmd_space, opt_space, fn_space\n        keyboard_shortcut: default\n          # Locale as shown.\n        language: en-US\n        voice_feedback: true\n        voice_variety:\n            # Accent\n          language: en-AU\n            # The speaker's name.\n          speaker: gordon\n      textinput:\n        autocapitalization: true\n        autocorrection: true\n        dictation: false\n          # Trigger alternative chars when long-pressing keys.\n          # Disable this for faster key repeats.\n        press_and_hold: true\n        repeat:\n          delay: 10\n          rate: 1\n        slow_keys: false\n        smart_dashes: true\n        smart_periods: true\n        smart_quotes: true\n        # Touch gesture configuration is a bit weird regarding three finger gestures.\n        # [three finger] drag and swipe_pages, when set to three [fingers] or\n        # both [two and three], need both axes, so app_expose_mission_control and\n        # swipe_fullscreen need to be four [fingers] or disabled.\n        # You will be warned about misconfiguration, but that might result in an unknown state.\n        # Also note that currently, these settings will only be applied after a\n        # reboot. I'm working on an execution module to be able to set those on the fly.\n      touch:\n          # Enable/disable App Exposé gesture.\n        app_expose: true\n          # App Expose and Mission Control gestures use\n          # `three` [fingers], `four` or false (disabled)\n        app_expose_mission_control: three\n        drag: false\n        force_click: true\n        haptic_feedback_click: true\n          # low (=light) / medium / high (=firm)\n        haptic_resistance_click: medium\n          # Enable/disable Launchpad pinch gesture.\n        launchpad: true\n          # Trigger lookup:\n          #   true [force click] / three [finger tap] / false\n        lookup: true\n          # Enable/disable Mission Control gesture.\n        mission_control: true\n        natural_scrolling: true\n        notification_center: true\n        rotate: true\n          # Enable secondary click with\n          #   false, two [fingers], corner-right [bottom], corner-left [bottom] click\n        secondary_click: two\n          # Enable/disable Show Desktop pinch gesture.\n        show_desktop: true\n        smart_zoom: true\n          # Swiping fullscreen apps/workspaces requires\n          # three [fingers] / four / false\n        swipe_fullscreen: three\n          # Swiping pages requires\n          #   two [finger scroll], three, both or false\n        swipe_pages: two\n        tap_to_click: false\n          # Trackpad acceleration: 0-3 [float]\n        tracking_speed: 1\n        zoom: true\n        # UI / UX with user input. Default background behaviors in behavior.\n      uix:\n        colors:\n            # MacOS accent color:\n            #   multi, blue, purple, pink, red, orange, yellow, green, graphite\n          accent: multi\n            # MacOS highlight color:\n            #   accent_color, blue, purple, pink, red, orange,\n            #   yellow, green, graphite\n          highlight: accent_color\n            # Action triggered when doubleclicking a window title:\n            #   `maximize` / `'none'` (f yaml), `minimize`\n        doubleclick_title: maximize\n          # Hot corner configuration. If no modifier, can be just a string per corner.\n        hot_corners:\n          bottom_left:\n              # Action can be 'none', mission-control, app-windows, desktop,\n              # screensaver, stop-screensaver, displaysleep, launchpad,\n              # notification-center, lock-screen, quick-note\n            action: screensaver\n              # Modifier can be 'none', shift, ctrl, opt, cmd.\n            modifier: none\n          bottom_right:\n            action: stop-screensaver\n            modifier: shift\n          top_left: none\n          top_right: notification-center\n        live_text: true\n          # Locate the pointer by shaking it.\n        locate_pointer: false\n          # true: Jump to spot that was clicked. false: Go to next page.\n        scrollbar_jump_click: false\n          # Show scroll bars\n          #   always, automatic, when_scrolling\n        scrollbars_visibility: automatic\n          # Sidebar icon size: small, medium, large\n        sidebar_iconsize: medium\n          # List of items to enable in the Spotlight index. The rest is disabled.\n        spotlight_index:\n          - applications\n          - bookmarks-history\n          - calculator\n          - contacts\n          - conversion\n          - definition\n          - documents\n          - events-reminders\n          - folders\n          - fonts\n          - images\n          - mail-messages\n          - movies\n          - music\n          - other\n          - pdf\n          - presentations\n          - siri\n          - spreadsheets\n          - system-preferences\n          - tips\n          # Use tab to cycle through UI elements (~ full keyboard access).\n        tab_ui_elements: false\n          # System theme: auto, dark, light\n        theme: light\n          # Show outlines around toolbar buttons (from Accessibility).\n        toolbar_button_shapes: false\n        transparency_reduced: false\n          # Windows are tinted in the wallpaper median color.\n        wallpaper_tinting: true\n          # Customize UI zooming (from Accessibility).\n          # If you want to leave defaults, can be boolean instead of mapping.\n        zoom_scroll_ui:\n            # Enable/disable zoom UI by scrolling with modifier feature.\n          enabled: false\n            # Follow keyboard focus:\n            #   never, always, when_typing\n          follow_keyboard_focus: never\n            # Modifier to trigger this behavior: ctrl, opt, cmd\n          modifier: ctrl\n            # Zoom: full, split, in_picture\n          zoom_mode: full\n\nFormula-specific\n^^^^^^^^^^^^^^^^\nThese are macOS system-wide preferences that need to run as root.\n\n.. code-block:: yaml\n\n  tool_macos:\n\n    audio:\n      boot_sound: false\n      devices:\n        device.AppleUSBAudioEngine:Native Instruments:Komplete Audio 6 MK2:ABCD1EF2:1,2:\n          output.stereo.left: 5\n          output.stereo.right: 6\n    bluetooth:\n      enabled: true\n      enabled_airplane: true\n      ignored:\n        devices:\n          - \u003cMAC 1\u003e\n          - \u003cMAC 2\u003e\n        sync: false\n    finder:\n        # Show/hide `/Volumes` folder.\n      show_volumes: false\n    keyboard:\n      brightness_adjustment:\n          # Dim keyboard brightness after x seconds of inactivity (0=disable).\n        after: 0\n          # Adjust keyboard brightness in low light.\n        low_light: true\n    localization:\n        # This will be set as computer name, hostname, NetBIOS name.\n      hostname: localmac\n      timezone: GMT\n      # Power settings for pmset per scope. Valid scopes: all, ac, battery, ups.\n    power:\n      all:\n          # Wake when plugging in AC adapter.\n        acwake: 0\n          # Enable automatic poweroff (mostly the same as standby).\n        autopoweroff: 0\n          # Trigger autopoweroff after x seconds of inactivity.\n        autopoweroffdelay: 0\n          # Sleep the display after x minutes of inactivity.\n        disksleep: 10\n        displaysleep: 2\n          # Dim the display instead of powering it off when display-sleeping.\n        halfdim: 1\n          # Which mode to use for hibernation:\n          #   0   /     3      /      25\n          # sleep / safe sleep / true hibernation for standby\n        hibernatemode: 3\n        highpowermode: 0\n          # Threshold in percent for toggling standbydelayhigh/-low.\n        highstandbythreshold: 50\n          # Whether display max brightness is reduced. Works for `battery` scope.\n        lessbright: 0\n          # Whether to wake when opening the laptop lid.\n        lidwake: 1\n        lowpowermode: 0\n        powermode: 0\n        powernap: 1\n        proximitywake: 0\n        sleep: 1\n          # Enable automatic sleep -\u003e standby\n        standby: 1\n        standbydelayhigh: 86400\n        standbydelaylow: 10800\n        tcpkeepalive: 0\n          # Prevent sleep when there is an active tty connection, even if it's remote.\n        ttyskeepawake: 0\n          # Wake on receiving an ethernet magic packet.\n        womp: 0\n      battery:\n        lessbright: 1\n    privacy:\n        # Allow Crash Reporter to send reports to\n        #   none, apple, third_party\n      crashreporter_allow: apple\n    security:\n        # Automatically login a user after booting.\n        #   false to disable, otherwise username\n      autologin: false\n      autoupdate:\n          # Enable automatic updates.\n        check: true\n          # Automatically download updates.\n        download: true\n          # Automatically install App Store app updates.\n        install_app: true\n          # Automatically install (critical) config updates.\n          # System Preferences combines this with critical.\n        install_config: true\n          # Automatically install critical system updates.\n          # System Preferences combines this with config.\n        install_critical: true\n          # Automatically install MacOS updates.\n        install_system: true\n          # Check every i day(s) for updates. (might be deprecated)\n        schedule: 1\n        # List of custom CA root certificates (PEM) to install on the system\n      ca_root: []\n      captive_portal_detection: true\n        # Load/unload cupsd service.\n      cupsd: true\n        # Automatically log in a user after authenticating with FileVault.\n      filevault_autologin: true\n      filevault_evict_keys_standby: false\n      firewall:\n          # Automatically allow incoming connections for Apple-signed binaries.\n        apple_signed_ok: true\n          # Automatically allow incoming connections for downloaded signed binaries.\n        download_signed_ok: false\n        enabled: true\n          # Block all incoming connections.\n        incoming_block: false\n        logging: true\n          # Ignore incoming ICMP + TCP/UDP packets to closed ports.\n        stealth: false\n      gatekeeper: true\n      guest_account: false\n      internet_sharing: false\n        # Sets ipv6 automatic/off on all network interfaces. Debatable if sensible.\n      ipv6: true\n        # Send multicast DNS advertisements.\n      mdns: true\n      ntp:\n          # Sync the system time using ntp.\n        enabled: true\n          # Specify ntp server to use.\n        server: time.apple.com\n      printer_sharing: false\n      remote_apple_events: false\n        # This setting only works to disable remote desktop connections.\n      remote_desktop_disabled: true\n        # State of SSH server.\n      remote_login: false\n      require_admin_for_system_settings: true\n        # Disable/enable check if root user account is disabled.\n        # Cannot modify the state.\n      root_disabled_check: false\n      sudo_touchid:\n        enabled: false\n          # pam_reattach might be required to make this work\n          # with tmux and iTerm saved sessions\n        pam_reattach: false\n        # Wake on receiving magic ethernet package.\n        # Enabled by default for AC actually.\n        # More finegrained control: `womp` in power settings (`macos.power`).\n        # This is mostly for disabling the feature.\n      wake_on_lan: false\n      # Global services management.\n      # (user-specific available in user config)\n    services:\n        # List of Launch Items to disable.\n      unwanted:\n        - org.cups.cupsd\n        # List of Launch Items to enable.\n      wanted:\n        - org.pqrs.karabiner.karabiner_observer\n      # Time Machine configuration\n      # needs Full Disk Access for your terminal emulator.\n    timemachine:\n      backup_on_battery: false\n        # Disable this to suppress a TimeMachine popup\n        # offering an unknown disk as backup target on mount.\n      offer_new_disks: true\n    uix:\n        # Show language selection menu in login window.\n      login_window_input_menu: true\n\n      # Default formula configuration for all users.\n    defaults:\n      animations: default value for all users\n\n\n\nDevelopment\n-----------\n\nGeneral Remarks\n~~~~~~~~~~~~~~~\nIf you want to see for yourself which incantation results in your preferred changes, consider using `prefsniff \u003chttps://github.com/zcutlip/prefsniff\u003e`_. It can run on a whole directory to see which files are changed (not recursive) and run on a specific file to generate the corresponding `defaults write` command. The usual suspect directories are:\n\n- ``~/Library/Preferences``\n- ``~/Library/Preferences/ByHost``\n- ``/Library/Preferences``\n- ``/var/root/Library/Preferences``\n\nIf you can't find the file, you might be dealing with a sandboxed application (look in ``~/Library/Containers``), it might persist the settings in another way (KMB) or use a Saved Application State (?). Running ``sudo fs_usage -f filesys \u003cpid\u003e`` might give another clue.\n\nContributing to this repo\n~~~~~~~~~~~~~~~~~~~~~~~~~\n\nCommit messages\n^^^^^^^^^^^^^^^\n\nCommit message formatting is significant.\n\nPlease see `How to contribute \u003chttps://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst\u003e`_ for more details.\n\npre-commit\n^^^^^^^^^^\n\n`pre-commit \u003chttps://pre-commit.com/\u003e`_ is configured for this formula, which you may optionally use to ease the steps involved in submitting your changes.\nFirst install  the ``pre-commit`` package manager using the appropriate `method \u003chttps://pre-commit.com/#installation\u003e`_, then run ``bin/install-hooks`` and\nnow ``pre-commit`` will run automatically on each ``git commit``.\n\n.. code-block:: console\n\n  $ bin/install-hooks\n  pre-commit installed at .git/hooks/pre-commit\n  pre-commit installed at .git/hooks/commit-msg\n\nState documentation\n~~~~~~~~~~~~~~~~~~~\nThere is a script that semi-autodocuments available states: ``bin/slsdoc``.\n\nIf a ``.sls`` file begins with a Jinja comment, it will dump that into the docs. It can be configured differently depending on the formula. See the script source code for details currently.\n\nThis means if you feel a state should be documented, make sure to write a comment explaining it.\n\nTesting\n~~~~~~~\n\nLinux testing is done with ``kitchen-salt``. It follows follows there is none currently and anyone running this formula is a substitute for the missing tests.\n\nTodo\n----\n- finish macsettings execution module to change difficult settings on the fly (esp. changing scrolling direction)\n- incorporate some important settings, maybe in the form of a profile (screensaver config!)\n- install arbitrary profiles\n- finish adding all options from previous iteration\n- add following system preferences settings:\n\n  + Notifications \u0026 Focus (file: ``~/Library/Preferences/com.apple.ncprefs.plist``), example:\n\n  .. code-block:: yaml\n\n    - bundle-id: com.apple.iCal\n      content_visibility: 0\n      flags: 578822166\n      grouping: 0\n      path: /System/Applications/Calendar.app\n      src:\n        - flags: 6\n              # the following is \u003cdata\u003e\u003c/data\u003e, base64 encoded\n              # 00000000: fade 0c00 0000 0034 0000 0001 0000 0006  .......4........\n              # 00000010: 0000 0002 0000 0017 636f 6d2e 6170 706c  ........com.appl\n              # 00000020: 652e 4361 6c65 6e64 6172 4167 656e 7400  e.CalendarAgent.\n              # 00000030: 0000 0003\n          req: +t4MAAAAADQAAAABAAAABgAAAAIAAAAXY29tLmFwcGxlLkNhbGVuZGFyQWdlbnQAAAAAAw==\n          uuid: C99C2315-ACDB-4ABB-AE7F-0C81E7EE3DD9\n        - flags: 6\n              # 00000000: fade 0c00 0000 0048 0000 0001 0000 0006  .......H........\n              # 00000010: 0000 0002 0000 002b 636f 6d2e 6170 706c  .......+com.appl\n              # 00000020: 652e 4361 6c65 6e64 6172 4e6f 7469 6669  e.CalendarNotifi\n              # 00000030: 6361 7469 6f6e 2e43 616c 4e43 5365 7276  cation.CalNCServ\n              # 00000040: 6963 6500 0000 0003                      ice.....\n          req: +t4MAAAAAEgAAAABAAAABgAAAAIAAAArY29tLmFwcGxlLkNhbGVuZGFyTm90aWZpY2F0aW9uLkNhbE5DU2VydmljZQAAAAAD\n          uuid: A4C40B21-EA4B-42F0-B5E7-400EE0A78DCB\n\n  + Login Items for users?\n  + more from Accessibility (eg doubleclick speed)\n  + Screen Time? probably not possible with plists at least\n  + Share Menu (file: ``~/Library/Preferences/com.apple.preferences.extensions.ShareMenu.plist`` for displayOrder, a bunch of ``com.apple.preferences.extensions.*.plist`` for active/inactive)\n  + Finder Extensions (file: ``~/Library/Preferences/pbs.plist`` FinderActive / FinderOrdering)\n  + Keyboard shortcuts\n\nReferences\n----------\n- https://shadowfile.inode.link/blog/2018/06/advanced-defaults1-usage/\n- https://shadowfile.inode.link/blog/2018/08/defaults-non-obvious-locations/\n- https://shadowfile.inode.link/blog/2018/08/autogenerating-defaults1-commands/\n- https://github.com/joeyhoer/starter\n- https://github.com/mathiasbynens/dotfiles/\n- https://git.herrbischoff.com/awesome-macos-command-line/about/\n- https://github.com/zcutlip/prefsniff\n- https://github.com/mosen/salt-osx\n- specific ones found in some of the state files\n\nInteresting links\n-----------------\n- https://managingosx.wordpress.com/2015/02/05/accessing-more-frameworks-with-python-2/\n- https://gist.github.com/pudquick/1362a8908be01e23041d\n- https://github.com/robperc/FinderSidebarEditor\n- https://michaellynn.github.io/2015/08/08/learn-you-a-better-pyobjc-bridgesupport-signature/\n- https://github.com/colin-stubbs/salt-formula-macos\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-tool-macos-formula","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flkubb%2Fsalt-tool-macos-formula","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flkubb%2Fsalt-tool-macos-formula/lists"}