diff --git a/roles/user/tasks/dotfiles.yml b/roles/user/tasks/dotfiles.yml index 44edac3..51afa9a 100644 --- a/roles/user/tasks/dotfiles.yml +++ b/roles/user/tasks/dotfiles.yml @@ -15,6 +15,10 @@ chdir: "/home/{{ user.username }}/.dotfiles" with_items: "{{ user.config.stowing }}" +- name: init tmux + import_tasks: tmux.yml + when: '"tmux" in user.config.stowing' + - name: init neovim import_tasks: neovim.yml when: '"nvim" in user.config.stowing' diff --git a/roles/user/tasks/tmux.yml b/roles/user/tasks/tmux.yml new file mode 100644 index 0000000..9b28314 --- /dev/null +++ b/roles/user/tasks/tmux.yml @@ -0,0 +1,20 @@ +--- +- name: Install tmux + community.general.pacman: + name: tmux + state: present + when: ansible_os_family == "Archlinux" + +- name: Install tmux + apt: + name: tmux + state: present + when: ansible_os_family == "Debian" + +- name: Install tpm + ansible.builtin.git: + repo: "https://github.com/tmux-plugins/tpm" + dest: "/home/{{ user.username }}/.tmux/plugins/tpm" + depth: 1 + become: true + become_user: "{{ user.username }}"