diff --git a/README.md b/README.md index 15a8832..e4d3336 100644 --- a/README.md +++ b/README.md @@ -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 | diff --git a/defaults/main.yml b/defaults/main.yml index 4d368d6..dd597e3 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -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: [] diff --git a/tasks/setup-Debian.yml b/tasks/setup-Debian.yml index 4ddf353..df47d74 100644 --- a/tasks/setup-Debian.yml +++ b/tasks/setup-Debian.yml @@ -16,7 +16,6 @@ - 'sway' - 'sway-backgrounds' - 'swaylock' - - 'sway-notification-center' - 'swaybg' - 'swayidle' - 'swayimg' @@ -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 diff --git a/templates/config.j2 b/templates/config.j2 index 861c2ba..91c1894 100644 --- a/templates/config.j2 +++ b/templates/config.j2 @@ -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. diff --git a/vars/main.yml b/vars/main.yml index 07ebaa9..a3ea006 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -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'