Skip to content

Commit

Permalink
feat(zsh): added custom omz themes installation task
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexNabokikh committed May 17, 2023
1 parent 3b28ee3 commit e6c2657
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ This playbook installs and configures most of the software I use on my OSX machi
- Configure custom sudoers.
- **Zsh**
- Install and configure [ohmyzsh](https://github.com/ohmyzsh/ohmyzsh).
- Install custom OMZ plugins and themes.
- **TMUX**
- Install and configure tmux with TPM (plugin manager)

Expand Down
9 changes: 7 additions & 2 deletions default.config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@ downloads: ~/.ansible-downloads/
configure_dotfiles: false
configure_osx: true
configure_zsh: true
# Plugin names have to be in the format github_user/plugin_name
zsh_plugins:
- zsh-syntax-highlighting
- zsh-history-substring-search
- zsh-users/zsh-syntax-highlighting
- zsh-users/zsh-history-substring-search

# Theme names have to be in the format github_user/theme_name
zsh_themes:
- romkatv/powerlevel10k

configure_tmux: true
tmux_dir: $HOME/.tmux
Expand Down
13 changes: 11 additions & 2 deletions tasks/zsh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,18 @@

- name: Install ZSH Plugins
ansible.builtin.git:
repo: "https://github.com/zsh-users/{{ item }}.git"
dest: "{{ omz_path }}/custom/plugins/{{ item }}"
repo: "https://github.com/{{ item }}.git"
dest: "{{ omz_path }}/custom/plugins/{{ item.split('/')[1:] | join('/') }}"
clone: true
update: true
with_items: "{{ zsh_plugins }}"
when: zsh_plugins is defined

- name: Install ZSH Themes
ansible.builtin.git:
repo: "https://github.com/{{ item }}.git"
dest: "{{ omz_path }}/custom/themes/{{ item.split('/')[1:] | join('/') }}"
clone: true
update: true
with_items: "{{ zsh_themes }}"
when: zsh_themes is defined

0 comments on commit e6c2657

Please sign in to comment.