diff --git a/tasks/p10k-install.yml b/tasks/p10k-install.yml index b7632ca..fdb451d 100644 --- a/tasks/p10k-install.yml +++ b/tasks/p10k-install.yml @@ -32,8 +32,8 @@ - name: Add powerlevel10k to zsh plugin lineinfile: path: "{{ p10k_zshrc_config[zsh_plugin]['zsh_file'] }}" - regexp: "^{{ p10k_zshrc_config[zsh_plugin]['source'] }}" - line: "{{ p10k_zshrc_config[zsh_plugin]['source'] }}" + regexp: "{{ p10k_zshrc_config[zsh_plugin]['regexp'] }}" + line: "{{ p10k_zshrc_config[zsh_plugin]['line'] }}" owner: "{{ item }}" group: "{{ item }}" mode: '0644' diff --git a/vars/main.yml b/vars/main.yml index 24b7e66..870d9df 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -3,35 +3,53 @@ p10k_path: zsh: '~/powerlevel10k' ohmyzsh: '~/.oh-my-zsh/custom/themes/powerlevel10k' + prezto: '~/powerlevel10k' + zim: '~/powerlevel10k' + antibody: '~/powerlevel10k' + antigen: '~/powerlevel10k' + zplug: '~/powerlevel10k' + zgen: '~/powerlevel10k' + zplugin: '~/powerlevel10k' + zinit: '~/powerlevel10k' p10k_zshrc_config: zsh: - source: 'source ~/powerlevel10k/powerlevel10k.zsh-theme' + regexp: '^source ' + line: 'source ~/powerlevel10k/powerlevel10k.zsh-theme' zsh_file: ~/.zshrc ohmyzsh: - source: 'ZSH_THEME="powerlevel10k/powerlevel10k"' + regexp: '^ZSH_THEME=' + line: 'ZSH_THEME="powerlevel10k/powerlevel10k"' zsh_file: ~/.zshrc prezto: - source: 'zstyle :prezto:module:prompt theme powerlevel10k' + regexp: '^zstyle :prezto:module:prompt theme' + line: 'zstyle :prezto:module:prompt theme powerlevel10k' zsh_file: ~/.zpreztorc zim: - source: 'zmodule romkatv/powerlevel10k' + regexp: '^zmodule ' + line: 'zmodule romkatv/powerlevel10k' zsh_file: ~/.zimrc antibody: - source: 'antibody bundle romkatv/powerlevel10k' + regexp: '^antibody bundle ' + line: 'antibody bundle romkatv/powerlevel10k' zsh_file: ~/.zshrc antigen: - source: 'antigen theme romkatv/powerlevel10k' + regexp: '^antigen theme ' + line: 'antigen theme romkatv/powerlevel10k' zsh_file: ~/.zshrc zplug: - source: 'zplug romkatv/powerlevel10k, as:theme, depth:1' + regexp: '^zplug ' + line: 'zplug romkatv/powerlevel10k, as:theme, depth:1' zsh_file: ~/.zshrc zgen: - source: 'zgen load romkatv/powerlevel10k powerlevel10k' + regexp: '^zgen load ' + line: 'zgen load romkatv/powerlevel10k powerlevel10k' zsh_file: ~/.zshrc zplugin: - source: 'zplugin ice depth=1; zplugin light romkatv/powerlevel10k' + regexp: '^zplugin ice depth=1; zplugin light' + line: 'zplugin ice depth=1; zplugin light romkatv/powerlevel10k' zsh_file: ~/.zshrc zinit: - source: 'zinit ice depth=1; zinit light romkatv/powerlevel10k' + regexp: '^zinit ice depth=1; zinit light' + line: 'zinit ice depth=1; zinit light romkatv/powerlevel10k' zsh_file: ~/.zshrc