- name: 'Shell: Add iTerm2 configuration' tags: - config - iterm2 - shell copy: src: "iterm2/{{ item }}" dest: '~/.iterm2' mode: '0600' loop: ['com.googlecode.iterm2.plist', 'hybrid.itermcolors'] - name: 'Shell: iTerm2 Bash integration' tags: - config - iterm2 - shell copy: src: 'iterm2/shell_integration.bash' dest: '~/.bashrc.d' mode: '0400' - name: 'Shell: ps alias' tags: - config - shell copy: content: | [[ -x /bin/ps && -x $(which pstree 2>/dev/null) && $(uname -s) = 'Darwin' ]] && function ps() { if [[ ${1} =~ 'f' ]]; then pstree; else /bin/ps ${@}; fi } dest: '~/.bashrc.d/alias.ps' mode: '0400' - name: 'Shell: GNU overrides' tags: - config - shell copy: content: | [[ -x $(which gdu 2>/dev/null) ]] && function du() { gdu ${@}; } && export -f du [[ -x $(which gsort 2>/dev/null) ]] && function sort() { gsort ${@}; } && export -f sort [[ -x $(which gxargs 2>/dev/null) ]] && function xargs() { gxargs ${@}; } && export -f xargs dest: '~/.bashrc.d/alias.gnu' mode: '0400' - name: 'OS X: Preferences' tags: - config - os - osx block: - name: 'OS X: Dock orientation' osx_defaults: domain: com.apple.dock type: string key: orientation value: right - name: 'OS X: Dock size' osx_defaults: domain: com.apple.dock type: float key: tilesize value: '35' - name: 'OS X: Smart quotes off' osx_defaults: domain: NSGlobalDomain type: int key: NSAutomaticQuoteSubstitutionEnabled value: '0' - name: 'OS X: Smart dashes off' osx_defaults: domain: NSGlobalDomain type: int key: NSAutomaticDashSubstitutionEnabled value: '0' - name: 'OS X: Spell correction off' osx_defaults: domain: NSGlobalDomain type: int key: NSAutomaticSpellingCorrectionEnabled value: '0' - name: 'OS X: Web spell correction off' osx_defaults: domain: NSGlobalDomain type: int key: WebAutomaticSpellingCorrectionEnabled value: '0' always: - name: 'OS X: Clear preferences cache' command: 'pkill -u ${USER} cfprefsd'