---
- name: Install i3-wm
  aur:
    name:
      - i3-gaps
      - i3lock
    skip_installed: yes

- name: Clone i3lock-fancy-multimonitor
  git:
    repo: https://github.com/guimeira/i3lock-fancy-multimonitor
    dest: ~/.i3/i3lock-fancy-multimonitor
    update: no

- name: Configure i3lock blur
  lineinfile:
    path: ~/.i3/i3lock-fancy-multimonitor/lock
    regexp: '^BLURTYPE="2x8"'
    line: '#BLURTYPE="2x8"'

- name: Configure i3lock blur bis
  lineinfile:
    path: ~/.i3/i3lock-fancy-multimonitor/lock
    regexp: '^#BLURTYPE="5x3"'
    line: 'BLURTYPE="5x3"'

- name: Configure xinitrc
  copy:
    src: xinitrc
    dest: ~/.xinitrc
    backup: yes

- name: Template config file
  template:
    src: config.j2
    dest: ~/.i3/config
    backup: yes
