From 4bb7921f26616ba0abbc12517e9bbebdfab11bf5 Mon Sep 17 00:00:00 2001 From: Miguel Villa Floran Date: Fri, 17 May 2024 01:58:35 -0700 Subject: [PATCH] Moving zsh plugin config to dotfiles --- local.yml | 3 +-- tasks/core-setup.yml | 1 + tasks/zsh-setup.yml | 44 +++++--------------------------------------- vars/zsh.yml | 37 ------------------------------------- 4 files changed, 7 insertions(+), 78 deletions(-) delete mode 100644 vars/zsh.yml diff --git a/local.yml b/local.yml index 1e27620..16dd0a5 100644 --- a/local.yml +++ b/local.yml @@ -6,7 +6,6 @@ vars_files: - vars/nvm.yml - vars/node.yml - - vars/zsh.yml vars: source_key: "./.ssh/id_rsa" @@ -40,7 +39,7 @@ - include: tasks/flatpak-setup.yml - include: tasks/discord-setup.yml - include: tasks/neovim-setup.yml - # - include: tasks/zsh-setup.yml + - include: tasks/zsh-setup.yml # - include: tasks/dotfiles.yml # - include: tasks/suckless-setup.yml # - include: tasks/node-setup.yml diff --git a/tasks/core-setup.yml b/tasks/core-setup.yml index 1151217..6b754b2 100644 --- a/tasks/core-setup.yml +++ b/tasks/core-setup.yml @@ -26,6 +26,7 @@ - tree - unzip - wget + - zsh tags: - minimal-install - install diff --git a/tasks/zsh-setup.yml b/tasks/zsh-setup.yml index 406210c..c940fa8 100644 --- a/tasks/zsh-setup.yml +++ b/tasks/zsh-setup.yml @@ -1,40 +1,6 @@ -- name: Install ZSH - apt: name=zsh - tags: &tags_for_zsh_tasks [ 'install', 'productivity', 'dotfiles', 'zsh' ] - -- name: Change shell to zsh - shell: chsh -s $(which zsh) - tags: *tags_for_zsh_tasks - - name: Set zsh as default shell - ansible.builtin.user: - name: "{{ lookup('env', 'USER') }}" - shell: "{{ lookup('env', 'HOME') }}/.oh-my-zsh" - become: true - tags: *tags_for_zsh_tasks - -- name: Check that the somefile.conf exists - stat: - path: "{{ lookup('env', 'HOME') }}/.oh-my-zsh" - register: oh_my_stats - tags: *tags_for_zsh_tasks - -- name: Oh-My-Zsh - shell: curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh > ~/.oh-my-installer && chmod +x ~/.oh-my-installer && ~/.oh-my-installer - tags: *tags_for_zsh_tasks - when: oh_my_stats.stat.exists == False - become_user: "{{ lookup('env', 'USER') }}" - -- name: Install zsh-autosuggestions - ansible.builtin.git: - repo: 'https://github.com/zsh-users/zsh-autosuggestions.git' - dest: "~/.oh-my-zsh/plugins/zsh-autosuggestions" - tags: *tags_for_zsh_tasks - -- name: install zsh plugins - become: true - ansible.builtin.git: - repo: 'https://github.com/{{ item.source }}.git' - dest: "~/.oh-my-zsh/plugins/{{ item.name }}" - tags: *tags_for_zsh_tasks - with_items: "{{ oh_my_zsh_plugins }}" + shell: chsh -s $(which zsh) + tags: + - minimal-install + - install + - zsh diff --git a/vars/zsh.yml b/vars/zsh.yml deleted file mode 100644 index 809c0c0..0000000 --- a/vars/zsh.yml +++ /dev/null @@ -1,37 +0,0 @@ -# code: language=ansible ---- -# Default theme -oh_my_zsh_theme: robbyrussell - -# Define a list of packages to be installed with oh-my-zsh. -oh_my_zsh_plugins: - - name: zsh-autosuggestions - source: zsh-users/zsh-autosuggestions - - name: zsh-syntax-highlighting - source: zsh-users/zsh-syntax-highlighting - - name: zsh-history-substring-search - source: zsh-users/zsh-history-substring-search - - name: zsh-auto-notify - source: MichaelAquilina/zsh-auto-notify - - name: zsh-you-should-use - source: MichaelAquilina/zsh-you-should-use - -# Whether to install by default for all specified users. -# May be overridden by `oh_my_zsh_install` under each user. -oh_my_zsh_install: true - -# Default update mode for Oh-My-Zsh -# accepted values are: -# disabled (default) -# auto -# reminder -oh_my_zsh_update_mode: disabled - -# Default update frequency in days. When the update mode is set to a value other -# than "disabled", this is the frequency (in days) to check for a new version. -# The value 0 will check every time a new shell session starts. -oh_my_zsh_update_frequency: 13 - -# Whether to write the ~/.zshrc file -# May be overridden by `oh_my_zsh: write_zshrc:` under each user. -oh_my_zsh_write_zshrc: true