---
- block:
    - name: xdg-desktop-portal-wlr | Create config directory
      file:
        path: ~/.config/xdg-desktop-portal-wlr
        state: directory
        mode: 0755

    - name: xdg-desktop-portal-wlr | Copy config
      template:
        src: config.j2
        dest: ~/.config/xdg-desktop-portal-wlr/config
        force: yes
        mode: 0644
  tags: portal

- name: xdg-user-dirs | Copy user-dirs definitions
  copy:
    src: user-dirs.dirs
    dest: ~/.config/user-dirs.dirs
    mode: 0644

- name: Copy mimeapps
  copy:
    src: mimeapps.list
    dest: ~/.config/mimeapps.list
    mode: 0644
  notify: Symlink mimeapps.list

- block:
    - name: npm | Create config directory
      file:
        path: ~/.config/npm
        state: directory
        mode: 0755

    - name: npm | Copy config
      copy:
        src: npmrc
        dest: ~/.config/npm/npmrc
        force: yes
        mode: 0644
  tags: npm
