---
- name: Install mcomix and dependencies
  pacman:
    name:
      - mcomix
      - mupdf-tools
    state: present
  tags:
    - mcomix

- name: Set mcomix as default cbr viewer
  lineinfile:
      dest: /etc/xdg/mimeapps.list
      regexp: ^application/vnd.comicbook-rar
      state: present
      line: "application/vnd.comicbook-rar=mcomix.desktop"
  tags:
    - mcomix

- name: Set mcomix as default cbz viewer
  lineinfile:
      dest: /etc/xdg/mimeapps.list
      regexp: ^application/vnd.comicbook+zip
      state: present
      line: "application/vnd.comicbook+zip=mcomix.desktop"
  tags:
    - mcomix
