From bcee190003da6b22ef0f1c40ec0743c434b9991f Mon Sep 17 00:00:00 2001 From: micxer Date: Fri, 15 Mar 2024 22:58:33 +0100 Subject: [PATCH] refactor: :recycle: Put macOS defaults into separate file --- default.config.yml | 304 +-------------------------------------------- default.macos.yml | 297 +++++++++++++++++++++++++++++++++++++++++++ main.yml | 1 + 3 files changed, 301 insertions(+), 301 deletions(-) create mode 100644 default.macos.yml diff --git a/default.config.yml b/default.config.yml index d6663b5fc..c0eaee2e2 100644 --- a/default.config.yml +++ b/default.config.yml @@ -1,9 +1,6 @@ --- downloads: ~/.ansible-downloads/ -configure_dotfiles: true -configure_macos: true - # Set to 'true' to configure the Dock via dockutil. configure_dock: false dockitems_remove: [] @@ -23,6 +20,9 @@ sudoers_custom_config: '' # # Allow users in admin group to use sudo with no password. # %admin ALL=(ALL) NOPASSWD: ALL + +configure_dotfiles: true + dotfiles_repo: https://github.com/micxer/dotfiles.git dotfiles_repo_accept_hostkey: true dotfiles_repo_local_destination: ~/Development/dotfiles @@ -43,304 +43,6 @@ mas_installed_apps: [] mas_email: "" mas_password: "" -macos_defaults: - # - - domain: com.apple.menuextra.clock - key: DateFormat - value: "EEE HH:mm:ss" - # Keyboard - # Key Repeat / Change the "press and hold" behavior. - - key: ApplePressAndHoldEnabled - type: string - value: "true" - # Key Repeat Rate - - domain: "Apple Global Domain" - key: KeyRepeat - type: integer - value: 2 - # Key repeat delay - - domain: "Apple Global Domain" - key: InitialKeyRepeat - type: integer - value: 25 - # Full Keyboard Access / Enable Tab in modal dialogs. - - key: AppleKeyboardUIMode - type: string - value: 3 - # Auto-Correct - - key: NSAutomaticSpellingCorrectionEnabled - type: bool - value: "false" - # - - domain: "Apple Global Domain" - key: KeyRepeatNSAutomaticPeriodSubstitutionEnabled - type: string - value: 0 - # - - domain: "Apple Global Domain" - key: KeyRepeatNSAutomaticCapitalizationEnabled - type: string - value: 0 - # - - domain: "Apple Global Domain" - key: KeyRepeatNSAutomaticSpellingCorrectionEnabled - type: string - value: 0 - - # Trackpad - # Natural scrolling - - domain: "Apple Global Domain" - key: com.apple.swipescrolldirection - type: integer - value: 1 - # Zoom in our out - - domain: "com.apple.AppleMultitouchTrackpad" - key: TrackpadPinch - type: integer - value: 1 - # Intelligent zoom - - domain: "com.apple.AppleMultitouchTrackpad" - key: TrackpadTwoFingerDoubleTapGesture - type: integer - value: 1 - # Turn - - domain: "com.apple.AppleMultitouchTrackpad" - key: TrackpadRotate - type: integer - value: 1 - # Click by tap - - domain: "com.apple.AppleMultitouchTrackpad" - key: Clicking - type: integer - value: 1 - # Natural scrolling - - domain: "Apple Global Domain" - key: com.apple.trackpad.scaling - type: float - value: 2 - # Silent click - - domain: "com.apple.AppleMultitouchTrackpad" - key: ActuationStrength - type: integer - value: 1 - # Force click - - domain: "com.apple.AppleMultitouchTrackpad" - key: ForceSuppressed - type: integer - value: 1 - # Right click bottom right corner - - domain: "com.apple.AppleMultitouchTrackpad" - key: TrackpadRightClick - type: integer - value: 0 - # Right click bottom right corner - - domain: "com.apple.driver.AppleBluetoothMultitouch.trackpad" - key: TrackpadCornerSecondaryClick - type: integer - value: 2 - # Right click bottom right corner - - domain: "com.apple.driver.AppleBluetoothMultitouch.trackpad" - key: TrackpadRightClick - type: integer - value: 0 - # Right click bottom right corner - - domain: "Apple Global Domain" - key: ContextMenuGesture - type: integer - value: 1 - # Swipe navigate with two fingers - - domain: "Apple Global Domain" - key: AppleEnableSwipeNavigateWithScrolls - type: integer - value: 1 - # ... - - domain: "com.apple.AppleMultitouchTrackpad" - key: TrackpadFourFingerHorizSwipeGesture - type: integer - value: 2 - # ... - - domain: "com.apple.AppleMultitouchTrackpad" - key: TrackpadTwoFingerFromRightEdgeSwipeGesture - type: integer - value: 3 - # ... - - domain: "com.apple.AppleMultitouchTrackpad" - key: TrackpadFourFingerVertSwipeGesture - type: integer - value: 2 - # ... - - domain: "com.apple.dock" - key: showLaunchpadGestureEnabled - type: integer - value: 0 - # ... - - domain: "com.apple.dock" - key: showDesktopGestureEnabled - type: integer - value: 1 - # Dock icon size - - domain: "com.apple.dock" - key: tilesize - type: float - value: 50 - # show Dock at bottom - - domain: "com.apple.dock" - key: orientation - type: string - value: bottom - # show Dock at bottom - - domain: "com.apple.dock" - key: "minimize-to-application" - type: bool - value: "true" - # top left corner -> screensaver - - domain: "com.apple.dock" - key: "wvous-tl-corner" - type: integer - value: 5 - - domain: "com.apple.dock" - key: "wvous-tl-modifier" - type: integer - value: 0 - # bottom left corner -> Mission Control - - domain: "com.apple.dock" - key: "wvous-bl-corner" - type: integer - value: 2 - - domain: "com.apple.dock" - key: "wvous-bl-modifier" - type: integer - value: 0 - # top right corner -> Desk - - domain: "com.apple.dock" - key: "wvous-tr-corner" - type: integer - value: 4 - - domain: "com.apple.dock" - key: "wvous-tr-modifier" - type: integer - value: 0 - # bottom right corner -> program windows - - domain: "com.apple.dock" - key: "wvous-br-corner" - type: integer - value: 3 - - domain: "com.apple.dock" - key: "wvous-br-modifier" - type: integer - value: 0 - # auto-hide Dock - - domain: "com.apple.dock" - key: "autohide" - type: bool - value: "true" - # minimize effect funnel - - domain: "com.apple.dock" - key: "mineffect" - type: string - value: "genie" - # double click title bar -> maximize - - domain: "Apple Global Domain" - key: AppleActionOnDoubleClick - type: string - value: Maximize - # minimize to application icon - - domain: "com.apple.dock" - key: "minimize-to-application" - type: bool - value: "true" - # animate opening app - - domain: "com.apple.dock" - key: "launchanim" - type: bool - value: "true" - # show indicator for open apps - - domain: "com.apple.dock" - key: "show-process-indicators" - type: bool - value: "true" - # show recently open apps - - domain: "com.apple.dock" - key: "show-recents" - type: bool - value: "false" - # always show menu bar in fullscreen - - domain: "Apple Global Domain" - key: AppleMenuBarVisibleInFullscreen - type: bool - value: "true" - # always show menu bar on desktop - - domain: "Apple Global Domain" - key: _HIHideMenuBar - type: bool - value: "false" - # ... - - domain: "com.apple.driver.AppleBluetoothMultitouch.trackpad" - key: TrackpadFiveFingerPinchGesture - type: integer - value: 2 - # ... - - domain: "com.apple.driver.AppleBluetoothMultitouch.trackpad" - key: TrackpadFourFingerPinchGesture - type: integer - value: 2 - - # Expand Print Panel by Default - - key: PMPrintingExpandedStateForPrint - type: bool - value: "true" - - key: PMPrintingExpandedStateForPrint2 - type: bool - value: "true" - # Quit Printer App After Print Jobs Complete - - domain: com.apple.print.PrintingPrefs - key: "Quit When Finished" - type: bool - value: "true" - - domain: com.apple.HIToolbox - key: AppleFnUsageType - type: integer - value: 2 - - domain: com.apple.HIToolbox - key: AppleDictationAutoEnable - type: integer - value: 1 - - # Always show scrollbars - - domain: "Apple Global Domain" - key: AppleShowScrollBars - type: string - value: Always - # Maximize window o double-clicking the title bar - - domain: "Apple Global Domain" - key: AppleActionOnDoubleClick - type: string - value: Maximize - - # No Siri - - domain: com.apple.assistant.support - key: "Assistant Enabled" - type: bool - value: "false" - # Don't wanna see it either - - domain: com.apple.Siri - key: "StatusMenuVisible" - type: bool - value: "false" - - # Main language - - domain: "Apple Global Domain" - key: AppleLanguages - type: array - value: - - "de-DE" - - domain: "Apple Global Domain" - key: AppleLocale - type: string - value: de_DE - - - # Install packages from other package managers. # Note: You are responsible for making sure the required package managers are # installed, eg. through homebrew. diff --git a/default.macos.yml b/default.macos.yml new file mode 100644 index 000000000..f2ae301e4 --- /dev/null +++ b/default.macos.yml @@ -0,0 +1,297 @@ +configure_macos: false + +macos_defaults: + # + - domain: com.apple.menuextra.clock + key: DateFormat + value: "EEE HH:mm:ss" + # Keyboard + # Key Repeat / Change the "press and hold" behavior. + - key: ApplePressAndHoldEnabled + type: string + value: "true" + # Key Repeat Rate + - domain: "Apple Global Domain" + key: KeyRepeat + type: integer + value: 2 + # Key repeat delay + - domain: "Apple Global Domain" + key: InitialKeyRepeat + type: integer + value: 25 + # Full Keyboard Access / Enable Tab in modal dialogs. + - key: AppleKeyboardUIMode + type: string + value: 3 + # Auto-Correct + - key: NSAutomaticSpellingCorrectionEnabled + type: bool + value: "false" + # + - domain: "Apple Global Domain" + key: KeyRepeatNSAutomaticPeriodSubstitutionEnabled + type: string + value: 0 + # + - domain: "Apple Global Domain" + key: KeyRepeatNSAutomaticCapitalizationEnabled + type: string + value: 0 + # + - domain: "Apple Global Domain" + key: KeyRepeatNSAutomaticSpellingCorrectionEnabled + type: string + value: 0 + + # Trackpad + # Natural scrolling + - domain: "Apple Global Domain" + key: com.apple.swipescrolldirection + type: integer + value: 1 + # Zoom in our out + - domain: "com.apple.AppleMultitouchTrackpad" + key: TrackpadPinch + type: integer + value: 1 + # Intelligent zoom + - domain: "com.apple.AppleMultitouchTrackpad" + key: TrackpadTwoFingerDoubleTapGesture + type: integer + value: 1 + # Turn + - domain: "com.apple.AppleMultitouchTrackpad" + key: TrackpadRotate + type: integer + value: 1 + # Click by tap + - domain: "com.apple.AppleMultitouchTrackpad" + key: Clicking + type: integer + value: 1 + # Natural scrolling + - domain: "Apple Global Domain" + key: com.apple.trackpad.scaling + type: float + value: 2 + # Silent click + - domain: "com.apple.AppleMultitouchTrackpad" + key: ActuationStrength + type: integer + value: 1 + # Force click + - domain: "com.apple.AppleMultitouchTrackpad" + key: ForceSuppressed + type: integer + value: 1 + # Right click bottom right corner + - domain: "com.apple.AppleMultitouchTrackpad" + key: TrackpadRightClick + type: integer + value: 0 + # Right click bottom right corner + - domain: "com.apple.driver.AppleBluetoothMultitouch.trackpad" + key: TrackpadCornerSecondaryClick + type: integer + value: 2 + # Right click bottom right corner + - domain: "com.apple.driver.AppleBluetoothMultitouch.trackpad" + key: TrackpadRightClick + type: integer + value: 0 + # Right click bottom right corner + - domain: "Apple Global Domain" + key: ContextMenuGesture + type: integer + value: 1 + # Swipe navigate with two fingers + - domain: "Apple Global Domain" + key: AppleEnableSwipeNavigateWithScrolls + type: integer + value: 1 + # ... + - domain: "com.apple.AppleMultitouchTrackpad" + key: TrackpadFourFingerHorizSwipeGesture + type: integer + value: 2 + # ... + - domain: "com.apple.AppleMultitouchTrackpad" + key: TrackpadTwoFingerFromRightEdgeSwipeGesture + type: integer + value: 3 + # ... + - domain: "com.apple.AppleMultitouchTrackpad" + key: TrackpadFourFingerVertSwipeGesture + type: integer + value: 2 + # ... + - domain: "com.apple.dock" + key: showLaunchpadGestureEnabled + type: integer + value: 0 + # ... + - domain: "com.apple.dock" + key: showDesktopGestureEnabled + type: integer + value: 1 + # Dock icon size + - domain: "com.apple.dock" + key: tilesize + type: float + value: 50 + # show Dock at bottom + - domain: "com.apple.dock" + key: orientation + type: string + value: bottom + # show Dock at bottom + - domain: "com.apple.dock" + key: "minimize-to-application" + type: bool + value: "true" + # top left corner -> screensaver + - domain: "com.apple.dock" + key: "wvous-tl-corner" + type: integer + value: 5 + - domain: "com.apple.dock" + key: "wvous-tl-modifier" + type: integer + value: 0 + # bottom left corner -> Mission Control + - domain: "com.apple.dock" + key: "wvous-bl-corner" + type: integer + value: 2 + - domain: "com.apple.dock" + key: "wvous-bl-modifier" + type: integer + value: 0 + # top right corner -> Desk + - domain: "com.apple.dock" + key: "wvous-tr-corner" + type: integer + value: 4 + - domain: "com.apple.dock" + key: "wvous-tr-modifier" + type: integer + value: 0 + # bottom right corner -> program windows + - domain: "com.apple.dock" + key: "wvous-br-corner" + type: integer + value: 3 + - domain: "com.apple.dock" + key: "wvous-br-modifier" + type: integer + value: 0 + # auto-hide Dock + - domain: "com.apple.dock" + key: "autohide" + type: bool + value: "true" + # minimize effect funnel + - domain: "com.apple.dock" + key: "mineffect" + type: string + value: "genie" + # double click title bar -> maximize + - domain: "Apple Global Domain" + key: AppleActionOnDoubleClick + type: string + value: Maximize + # minimize to application icon + - domain: "com.apple.dock" + key: "minimize-to-application" + type: bool + value: "true" + # animate opening app + - domain: "com.apple.dock" + key: "launchanim" + type: bool + value: "true" + # show indicator for open apps + - domain: "com.apple.dock" + key: "show-process-indicators" + type: bool + value: "true" + # show recently open apps + - domain: "com.apple.dock" + key: "show-recents" + type: bool + value: "false" + # always show menu bar in fullscreen + - domain: "Apple Global Domain" + key: AppleMenuBarVisibleInFullscreen + type: bool + value: "true" + # always show menu bar on desktop + - domain: "Apple Global Domain" + key: _HIHideMenuBar + type: bool + value: "false" + # ... + - domain: "com.apple.driver.AppleBluetoothMultitouch.trackpad" + key: TrackpadFiveFingerPinchGesture + type: integer + value: 2 + # ... + - domain: "com.apple.driver.AppleBluetoothMultitouch.trackpad" + key: TrackpadFourFingerPinchGesture + type: integer + value: 2 + + # Expand Print Panel by Default + - key: PMPrintingExpandedStateForPrint + type: bool + value: "true" + - key: PMPrintingExpandedStateForPrint2 + type: bool + value: "true" + # Quit Printer App After Print Jobs Complete + - domain: com.apple.print.PrintingPrefs + key: "Quit When Finished" + type: bool + value: "true" + - domain: com.apple.HIToolbox + key: AppleFnUsageType + type: integer + value: 2 + - domain: com.apple.HIToolbox + key: AppleDictationAutoEnable + type: integer + value: 1 + + # Always show scrollbars + - domain: "Apple Global Domain" + key: AppleShowScrollBars + type: string + value: Always + # Maximize window o double-clicking the title bar + - domain: "Apple Global Domain" + key: AppleActionOnDoubleClick + type: string + value: Maximize + + # No Siri + - domain: com.apple.assistant.support + key: "Assistant Enabled" + type: bool + value: "false" + # Don't wanna see it either + - domain: com.apple.Siri + key: "StatusMenuVisible" + type: bool + value: "false" + + # Main language + - domain: "Apple Global Domain" + key: AppleLanguages + type: array + value: + - "de-DE" + - domain: "Apple Global Domain" + key: AppleLocale + type: string + value: de_DE diff --git a/main.yml b/main.yml index a253981a2..e726de8d9 100644 --- a/main.yml +++ b/main.yml @@ -4,6 +4,7 @@ vars_files: - default.config.yml + - default.macos.yml pre_tasks: - name: Include playbook configuration.