Skip to content

Commit

Permalink
Add support for sway notification manager
Browse files Browse the repository at this point in the history
  • Loading branch information
DO1JLR committed Sep 18, 2024
1 parent 8a1fe12 commit 95ff2bd
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ With this ansible role you deploy a sway configuration with optionally swaylock,
| ``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... |
| ``sway__notification_center`` | ``true`` | Use way notification center for notifications |
| ``submodules_versioncheck`` | ``false`` | Basic Versionscheck to prevent running older version of this role |


Expand Down
2 changes: 2 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ sway__keybindings:
name: display settings
key: $mod+Shift+F7
exec: wdisplays

sway__pipewire: true
sway__notification_center: true

sway__keybindings_extra: []

Expand Down
8 changes: 7 additions & 1 deletion tasks/setup-Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
- 'sway'
- 'sway-backgrounds'
- 'swaylock'
- 'sway-notification-center'
- 'swaybg'
- 'swayidle'
- 'swayimg'
Expand Down Expand Up @@ -46,3 +45,10 @@
state: "present"
become: true
with_items: "{{ sway__install_launcher }}"

- name: Ensure sway notification center is installed
ansible.builtin.apt:
name: "sway-notification-center"
state: "present"
become: true
when: sway__notification_center | bool
8 changes: 8 additions & 0 deletions templates/config.j2
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,14 @@ input type:keyboard {
# Start your launcher
bindsym $mod+d exec $menu

{% if sway__notification_center %}
# Sway Notification Center
exec swaync

# Toggle control center
bindsym $mod+Shift+n exec swaync-client -t -sw
{% endif %}

# Drag floating windows by holding down $mod and left mouse button.
# Resize them with right mouse button + $mod.
# Despite the name, also works for non-floating windows.
Expand Down
2 changes: 1 addition & 1 deletion vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
---
playbook_version_number: 13 # should be int
playbook_version_number: 14 # should be int
playbook_version_path: 'role-roles-ansible.sway.version'

0 comments on commit 95ff2bd

Please sign in to comment.