- name: Install tmux
  become: true
  package:
    name: tmux
    state: present

- name: Verifying tmux config folder
  file:
    path: ~/.config/tmux
    state: directory
    mode: '0755'

- name: Linking up tmux config
  file:
    src: "{{ playbook_dir }}/files/dotfiles/tmux/tmux.conf"
    dest: ~/.config/tmux/tmux.conf
    state: link
    owner: "{{ ansible_user_id }}"
    group: "{{ ansible_user_id }}"

- name: Install tmux plugin manager
  git:
    repo: https://github.com/tmux-plugins/tpm
    dest: ~/.config/tmux/plugins/tpm
    update: yes
    version: master

