diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-03-06 02:31:05 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-03-06 03:11:08 +0100 |
| commit | a38bb05301efe2fb179a8dd622e16e8fd70250cb (patch) | |
| tree | 9498e241d517fb48a39af50462b3602c5dbfb414 /roles | |
| parent | 1a197ba880a21e31bc9b8aa35fe2b1b09005d119 (diff) | |
Add the role for installing sharing/w window previews
Diffstat (limited to 'roles')
| -rw-r--r-- | roles/hyprland/meta/main.yml | 1 | ||||
| -rw-r--r-- | roles/hyprland/tasks/main.yml | 13 | ||||
| -rw-r--r-- | roles/hyprland/templates/hypr/xdph.conf.j2 | 5 | ||||
| -rw-r--r-- | roles/hyprshare/meta/argument_specs.yml | 4 | ||||
| -rw-r--r-- | roles/hyprshare/meta/main.yml | 11 | ||||
| -rw-r--r-- | roles/hyprshare/tasks/main.yml | 25 |
6 files changed, 59 insertions, 0 deletions
diff --git a/roles/hyprland/meta/main.yml b/roles/hyprland/meta/main.yml index 47d97237..0e580298 100644 --- a/roles/hyprland/meta/main.yml +++ b/roles/hyprland/meta/main.yml @@ -19,6 +19,7 @@ dependencies: - role: "tofi" - role: "hyprcursor" - role: "hyprtheme" + - role: "hyprshare" galaxy_info: author: "a14m" description: "Install hyprland" diff --git a/roles/hyprland/tasks/main.yml b/roles/hyprland/tasks/main.yml index 69e91c54..c0135a4e 100644 --- a/roles/hyprland/tasks/main.yml +++ b/roles/hyprland/tasks/main.yml @@ -76,6 +76,8 @@ dest: "/etc/hypr/hyprlock.conf" - src: "hypr/hypridle.conf.j2" dest: "/etc/hypr/hypridle.conf" + - src: "hypr/xdph.conf.j2" + dest: "/etc/hypr/xdph.conf" - src: "hypr/hyprland.conf.j2" dest: "/etc/hypr/hyprland.conf" - src: "uwsm/env.j2" @@ -109,6 +111,17 @@ # System defaults source = /etc/hypr/hypridle.conf + - name: "Configure user xdg-desktop-portal-hyprland" + ansible.builtin.blockinfile: + path: "{{ ansible_facts['env']['HOME'] }}/.config/hypr/xdph.conf" + state: "present" + prepend_newline: true + append_newline: true + marker: "# ==== {mark} ANSIBLE HYPRSHARE CONFIG" + block: | + # System defaults + source = /etc/hypr/xdph.conf + - name: "Copy hyprland scripts" become: true ansible.builtin.copy: diff --git a/roles/hyprland/templates/hypr/xdph.conf.j2 b/roles/hyprland/templates/hypr/xdph.conf.j2 new file mode 100644 index 00000000..0e4b8119 --- /dev/null +++ b/roles/hyprland/templates/hypr/xdph.conf.j2 @@ -0,0 +1,5 @@ +screencopy { + max_fps = 60 + allow_token_by_default = true + custom_picker_binary = hyprland-preview-share-picker +} diff --git a/roles/hyprshare/meta/argument_specs.yml b/roles/hyprshare/meta/argument_specs.yml new file mode 100644 index 00000000..5af49897 --- /dev/null +++ b/roles/hyprshare/meta/argument_specs.yml @@ -0,0 +1,4 @@ +--- +argument_specs: + main: + options: {} diff --git a/roles/hyprshare/meta/main.yml b/roles/hyprshare/meta/main.yml new file mode 100644 index 00000000..2a1224b7 --- /dev/null +++ b/roles/hyprshare/meta/main.yml @@ -0,0 +1,11 @@ +--- +dependencies: [] +galaxy_info: + author: "a14m" + description: "Install Hyprland screensharing dependencies" + license: "MIT" + min_ansible_version: "2.18" + platforms: + - name: "ArchLinux" + versions: + - "all" diff --git a/roles/hyprshare/tasks/main.yml b/roles/hyprshare/tasks/main.yml new file mode 100644 index 00000000..8fd53138 --- /dev/null +++ b/roles/hyprshare/tasks/main.yml @@ -0,0 +1,25 @@ +--- +- 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" + +# 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" + |
