From c1b8733ce7b17dc42b5ef6ea94108b48a4057100 Mon Sep 17 00:00:00 2001 From: L3D Date: Wed, 31 Jul 2024 22:32:06 +0200 Subject: [PATCH 1/2] Improve screenshare stuff --- README.md | 1 + defaults/main.yml | 1 + tasks/main.yml | 13 +++++++++---- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7b991b6..15a8832 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,7 @@ With this ansible role you deploy a sway configuration with optionally swaylock, | ``sway__wlsunset_params`` | ``-l 49 -L 8.4`` | | ``sway__keybindings`` | *(see [defaults/main.yml](defaults/main.yml)* | List of sway keybindings | | ``sway__keybindings_extra`` | ``[]`` | Empty list for additional keybindings | +| ``sway__pipewire`` | ``[]`` | Install some requirements for desktop sharing... | | ``submodules_versioncheck`` | ``false`` | Basic Versionscheck to prevent running older version of this role | diff --git a/defaults/main.yml b/defaults/main.yml index ee6dc1d..adac98c 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -93,6 +93,7 @@ sway__keybindings: name: display settings key: $mod+Shift+F7 exec: wdisplays +sway__pipewire: true sway__keybindings_extra: [] diff --git a/tasks/main.yml b/tasks/main.yml index 2f6e509..0157928 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -4,10 +4,6 @@ file: "versioncheck.yml" when: submodules_versioncheck | bool -# - name: Register variables -# ansible.builtin.import_tasks: -# file: variables.yml - - name: Ensure i3 packages are installed [Debian] ansible.builtin.include_tasks: file: "setup-Debian.yml" @@ -30,3 +26,12 @@ loop_var: swayusr label: "{{ swayusr.home }}/.config/waybar/" when: sway__waybar | bool + +- name: Install requirements for desktop sharing like pipewire + ansible.builtin.include_tasks: + file: "pipewire.yml" + loop: "{{ sway__user_list | flatten(1) }}" + loop_control: + loop_var: swayusr + label: "{{ swayusr.home }}/.config/waybar/" + when: sway__pipewire | bool From 48c345372bcfa327c0de5ec38a1729dd868892d8 Mon Sep 17 00:00:00 2001 From: L3D Date: Wed, 31 Jul 2024 22:34:16 +0200 Subject: [PATCH 2/2] Improve screenshare stuff --- tasks/pipewire.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tasks/pipewire.yml diff --git a/tasks/pipewire.yml b/tasks/pipewire.yml new file mode 100644 index 0000000..34c552a --- /dev/null +++ b/tasks/pipewire.yml @@ -0,0 +1,12 @@ +--- +# See https://elis.nu/blog/2021/02/detailed-setup-of-screen-sharing-in-sway/ +- name: Ensure waybar is installed. + ansible.builtin.package: + name: "{{ item }}" + state: "present" + become: true + with_items: + - 'xdg-desktop-portal-wlr' + - 'xdg-desktop-portal-gtk' + - 'slurp' + - 'pipewire'