2014-10-03 04:07:02 +00:00
|
|
|
---
|
2015-01-04 04:17:46 +00:00
|
|
|
# Custom Terminal theme.
|
|
|
|
- name: Get current Terminal profile.
|
2021-02-18 16:26:12 +00:00
|
|
|
command: defaults read com.apple.terminal 'Default Window Settings'
|
2015-01-04 04:17:46 +00:00
|
|
|
register: terminal_theme
|
|
|
|
changed_when: false
|
2020-11-09 23:04:42 +00:00
|
|
|
check_mode: false
|
2014-10-03 04:07:02 +00:00
|
|
|
|
2015-01-04 04:17:46 +00:00
|
|
|
- name: Ensure custom Terminal profile is added.
|
2021-05-27 18:39:20 +00:00
|
|
|
copy:
|
2021-04-12 13:15:57 +00:00
|
|
|
src: files/terminal/JJG-Term.terminal
|
|
|
|
dest: /tmp/JJG-Term.terminal
|
|
|
|
changed_when: false
|
|
|
|
when: "'JJG-Term' not in terminal_theme.stdout"
|
|
|
|
|
|
|
|
- name: Ensure custom Terminal profile is added.
|
|
|
|
command: open /tmp/JJG-Term.terminal
|
2015-01-04 04:17:46 +00:00
|
|
|
changed_when: false
|
|
|
|
when: "'JJG-Term' not in terminal_theme.stdout"
|
|
|
|
|
|
|
|
# TODO: This doesn't work in Yosemite. Consider a different solution?
|
|
|
|
- name: Ensure custom Terminal profile is set as default.
|
2021-02-18 16:26:12 +00:00
|
|
|
command: "{{ item }}"
|
2015-01-04 04:17:46 +00:00
|
|
|
with_items:
|
|
|
|
- defaults write com.apple.terminal 'Default Window Settings' -string JJG-Term
|
|
|
|
- defaults write com.apple.terminal 'Startup Window Settings' -string JJG-Term
|
|
|
|
changed_when: false
|
|
|
|
when: "'JJG-Term' not in terminal_theme.stdout"
|