mac-playbook
mac-playbook copied to clipboard
Mission control hotkeys
While creating my own dev-playbook I used yours as a reference and read that you create the mission control hotkeys by hand. I investigated that matter and came up with the following ansible task:
- name: Set space changing hotkeys (Create dict).
command: >
/usr/libexec/PlistBuddy ~/Library/Preferences/com.apple.symbolichotkeys.plist
-c "Add :AppleSymbolicHotKeys:{{ item.1 + 117 }} dict"
-c "Add :AppleSymbolicHotKeys:{{ item.1 + 117 }}:enabled bool true"
-c "Add :AppleSymbolicHotKeys:{{ item.1 + 117 }}:value dict"
-c "Add :AppleSymbolicHotKeys:{{ item.1 + 117 }}:value:parameters array"
-c "Add :AppleSymbolicHotKeys:{{ item.1 + 117 }}:value:type string \"standard\""
-c "Add :AppleSymbolicHotKeys:{{ item.1 + 117 }}:value:parameters: integer 65535"
-c "Add :AppleSymbolicHotKeys:{{ item.1 + 117 }}:value:parameters: integer {{ {1: 18, 2: 19, 3: 20, 4: 21, 5: 23, 6: 22, 7: 26, 8: 28, 9: 25}[item.1] }}"
-c "Add :AppleSymbolicHotKeys:{{ item.1 + 117 }}:value:parameters: integer 262144"
with_indexed_items: [1, 2, 3, 4, 5, 6, 7, 8, 9]
I just wanted to let you know since I greatly benifited from you playbook. I also created an ansible role for a lot of macOS settings which also has the mission control hotkeys included.
Awesome! Thanks for the tip. At some point when I have time over again I'll switch over to your role 👍
ping @geerlingguy you might be interested in https://github.com/kinglouie/ansible-role-macos as well
Quite right about that! Looks like a nice role.