Skip to content

Commit

Permalink
Merge pull request #3 from roles-ansible/pipewire
Browse files Browse the repository at this point in the history
Improve screenshare stuff
  • Loading branch information
DO1JLR authored Jul 31, 2024
2 parents bc0e3c3 + 48c3453 commit baa0498
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |


Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ sway__keybindings:
name: display settings
key: $mod+Shift+F7
exec: wdisplays
sway__pipewire: true

sway__keybindings_extra: []

Expand Down
13 changes: 9 additions & 4 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
12 changes: 12 additions & 0 deletions tasks/pipewire.yml
Original file line number Diff line number Diff line change
@@ -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'

0 comments on commit baa0498

Please sign in to comment.