summaryrefslogtreecommitdiffstats
path: root/roles/hyprshare/tasks/main.yml
blob: 68d318ae3104d85e63572280d5c89dee74624b58 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
- 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"