dotfiles/.ansible/roles/mac_desktop/tasks/prefs.yaml

120 lines
2.8 KiB
YAML
Raw Normal View History

- name: 'iTerm2: Add configuration'
tags:
- config
- iterm2
template:
src: "iterm2/{{ item }}"
dest: '~/.iterm2'
mode: '0600'
loop: ['com.googlecode.iterm2.plist', 'hybrid.itermcolors']
- name: 'Iterm2: Shell integration'
tags:
- config
- iterm2
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
dest: '~/.bashrc.d/alias.gnu'
mode: '0400'
2017-11-23 20:27:53 +00:00
- name: 'Firefox: Set base path'
2017-11-24 18:42:08 +00:00
tags:
- config
- firefox
- browser
2017-11-23 20:27:53 +00:00
set_fact:
firefox_path: '~/Library/Application Support/Firefox'
- name: 'Firefox: Find profile path'
2017-11-24 18:42:08 +00:00
tags:
- config
- firefox
- browser
2017-11-23 20:27:53 +00:00
set_fact:
profile_path: "{{ lookup('ini', 'Path section=Profile0 file=' + firefox_path + '/profiles.ini') }}"
- name: 'Firefox: Add local config'
2017-11-24 18:42:08 +00:00
tags:
- config
- firefox
- browser
2017-11-23 20:27:53 +00:00
copy:
content: |
user_pref("geo.enabled", false);
user_pref("privacy.window.maxInnerWidth", 1400);
user_pref("privacy.window.maxInnerHeight", 900);
dest: "{{ firefox_path }}/{{ profile_path }}/user.js"
2019-01-13 18:04:27 +00:00
mode: '0600'
2017-11-23 20:27:53 +00:00
- name: 'OS X: Preferences'
2017-11-29 15:24:38 +00:00
tags:
- config
- os
- osx
block:
- name: 'OS X: Dock orientation'
osx_defaults:
domain: com.apple.dock
type: string
key: orientation
value: right
2017-11-29 15:24:38 +00:00
- name: 'OS X: Dock size'
osx_defaults:
domain: com.apple.dock
type: float
key: tilesize
value: '35'
2017-11-29 15:24:38 +00:00
- 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'
2017-11-30 20:41:26 +00:00
- name: 'OS X: Spell correction off'
osx_defaults:
domain: NSGlobalDomain
type: int
key: NSAutomaticSpellingCorrectionEnabled
value: '0'
2017-11-30 20:41:26 +00:00
- 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'