--- - name: "Ensure hyprshare dependencies is installed" become: true ansible.builtin.package: name: - "slurp" - "grim" state: "present" - name: "Ensure hyprland-preview-share-picker AUR packages is installed" become: true become_user: "aur_builder" kewlfft.aur.aur: name: "hyprland-preview-share-picker" state: "present" use: "yay" when: hyprshare_install_preview # This is a workaround the installation failing # because the log file is created with aur_builder as an owner - name: "Ensure tmp log is removed" become: true ansible.builtin.file: path: "/tmp/hyprland-preview-share-picker.log" state: "absent" when: hyprshare_install_preview - name: "Template user share picker configuration" ansible.builtin.template: src: "xdph.conf.j2" dest: "{{ ansible_facts['env']['HOME'] }}/.config/hypr/xdph.conf" mode: "0644" notify: "Restart xdg-desktop-portal-hyprland"