diff --git a/tasks/p10k-configure.yml b/tasks/p10k-configure.yml index 30d14bc..fa69243 100644 --- a/tasks/p10k-configure.yml +++ b/tasks/p10k-configure.yml @@ -21,7 +21,7 @@ - name: Enable powerlevel10 config file blockinfile: - path: '~/.zshrc' + path: "{{ p10k_zshrc_config[zsh_plugin]['zsh_file'] }}" block: | [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh insertafter: EOF diff --git a/tasks/p10k-install.yml b/tasks/p10k-install.yml index b49acd6..b7632ca 100644 --- a/tasks/p10k-install.yml +++ b/tasks/p10k-install.yml @@ -31,9 +31,9 @@ - name: Add powerlevel10k to zsh plugin lineinfile: - path: '~/.zshrc' - regexp: "^{{ p10k_zshrc_config[zsh_plugin] }}" - line: "{{ p10k_zshrc_config[zsh_plugin] }}" + path: "{{ p10k_zshrc_config[zsh_plugin]['zsh_file'] }}" + regexp: "^{{ p10k_zshrc_config[zsh_plugin]['source'] }}" + line: "{{ p10k_zshrc_config[zsh_plugin]['source'] }}" owner: "{{ item }}" group: "{{ item }}" mode: '0644' @@ -44,7 +44,7 @@ - name: Enable powerlevel10 instant prompt blockinfile: - path: '~/.zshrc' + path: "{{ p10k_zshrc_config[zsh_plugin]['zsh_file'] }}" block: | if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" diff --git a/vars/main.yml b/vars/main.yml index 4448d8f..24b7e66 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -5,5 +5,33 @@ p10k_path: ohmyzsh: '~/.oh-my-zsh/custom/themes/powerlevel10k' p10k_zshrc_config: - zsh: 'source ~/powerlevel10k/powerlevel10k.zsh-theme' - ohmyzsh: 'ZSH_THEME="powerlevel10k/powerlevel10k"' + zsh: + source: 'source ~/powerlevel10k/powerlevel10k.zsh-theme' + zsh_file: ~/.zshrc + ohmyzsh: + source: 'ZSH_THEME="powerlevel10k/powerlevel10k"' + zsh_file: ~/.zshrc + prezto: + source: 'zstyle :prezto:module:prompt theme powerlevel10k' + zsh_file: ~/.zpreztorc + zim: + source: 'zmodule romkatv/powerlevel10k' + zsh_file: ~/.zimrc + antibody: + source: 'antibody bundle romkatv/powerlevel10k' + zsh_file: ~/.zshrc + antigen: + source: 'antigen theme romkatv/powerlevel10k' + zsh_file: ~/.zshrc + zplug: + source: 'zplug romkatv/powerlevel10k, as:theme, depth:1' + zsh_file: ~/.zshrc + zgen: + source: 'zgen load romkatv/powerlevel10k powerlevel10k' + zsh_file: ~/.zshrc + zplugin: + source: 'zplugin ice depth=1; zplugin light romkatv/powerlevel10k' + zsh_file: ~/.zshrc + zinit: + source: 'zinit ice depth=1; zinit light romkatv/powerlevel10k' + zsh_file: ~/.zshrc