From c481cbc15f06a18a7e5e8a156253be60c15edef5 Mon Sep 17 00:00:00 2001 From: Henrik Bakken Date: Wed, 7 Oct 2026 11:01:01 +0200 Subject: [PATCH] mako -> swaync --- CONFIG/sway/config | 16 +++++++----- CONFIG/swaync/config.json | 41 ++++++++++++++++++++++++++++++ CONFIG/swaync/style.css | 52 +++++++++++++++++++++++++++++++++++++++ endos.py | 4 ++- 4 files changed, 106 insertions(+), 7 deletions(-) create mode 100644 CONFIG/swaync/config.json create mode 100644 CONFIG/swaync/style.css diff --git a/CONFIG/sway/config b/CONFIG/sway/config index 53e2a3e..6c05a7f 100644 --- a/CONFIG/sway/config +++ b/CONFIG/sway/config @@ -253,9 +253,14 @@ bindsym { # Launch the file explorer $mod+o exec pcmanfm - # Dismiss message - $mod+n exec makoctl dismiss - $mod+Shift+n exec makoctl dismiss -a + # Dismiss current notification + $mod+n exec swaync-client -c + + # Dismiss all notifications + $mod+Shift+n exec swaync-client -C + + # Toggle the SwayNC control center panel + $mod+Shift+m exec swaync-client -t -sw } # config tools @@ -297,9 +302,6 @@ exec swayidle -w \ exec systemctl --user enable --now foot-server.service exec { - # Desktop notifications - exec mako - # Set wallpaper ~/.azotebg @@ -317,6 +319,8 @@ exec { } exec_always { + pkill -x swaync; exec swaync + # nwg-drawer nwg-drawer -r -c 7 -is 90 -mb 10 -ml 50 -mr 50 -mt 10 diff --git a/CONFIG/swaync/config.json b/CONFIG/swaync/config.json new file mode 100644 index 0000000..269c2d7 --- /dev/null +++ b/CONFIG/swaync/config.json @@ -0,0 +1,41 @@ +{ + "positionX": "right", + "positionY": "top", + "layer": "overlay", + "control-center-layer": "top", + "layer-shell": true, + "cssPriority": "application", + "control-center-margin-top": 8, + "control-center-margin-bottom": 8, + "control-center-margin-right": 8, + "control-center-margin-left": 8, + "notification-2d-margin": true, + "notification-window-width": 400, + "keyboard-shortcuts": true, + "image-visibility": "when-available", + "transition-length": 200, + "hide-on-clear": false, + "hide-on-action": true, + "script-fail-notify": true, + "widgets": [ + "title", + "dnd", + "mpris", + "volume", + "notifications" + ], + "widget-config": { + "title": { + "text": "Notifications", + "clear-all-button": true, + "button-text": "Clear All" + }, + "dnd": { + "text": "Do Not Disturb" + }, + "mpris": { + "image-size": 96, + "image-radius": 8 + } + } +} diff --git a/CONFIG/swaync/style.css b/CONFIG/swaync/style.css new file mode 100644 index 0000000..f38f206 --- /dev/null +++ b/CONFIG/swaync/style.css @@ -0,0 +1,52 @@ +@define-color bg #0A0A0A; +@define-color border #333333; +@define-color text #FFFFFF; +@define-color focus #00E5FF; +@define-color urgent #FF0033; + +* { + font-family: "Noto Sans", sans-serif; + border-radius: 0px; /* Sharp corners */ + background-clip: padding-box; +} + +.control-center { + background: @bg; + border-left: 2px solid @border; + color: @text; +} + +.floating-notifications .notification { + background: @bg; + border: 2px solid @focus; /* Instantly clear it's a new notification */ + box-shadow: none; + margin: 4px; +} + +button:hover { + background: @border; + border: 1px solid @focus; +} + +.widget-title { + color: @focus; + font-size: 1.2rem; + font-weight: bold; + padding: 10px; + border-bottom: 1px solid @border; +} + +.widget-dnd, +.widget-mpris, +.widget-volume { + background: transparent; + border: 1px solid @border; + margin: 8px; + padding: 8px; +} + +.notification-row:focus, +.notification-row:hover { + background: #111111; + border-left: 2px solid @focus; +} diff --git a/endos.py b/endos.py index 4b16d0b..a43d509 100755 --- a/endos.py +++ b/endos.py @@ -399,7 +399,7 @@ def install_sway(overwrite: bool, reinstall: bool) -> None: "waybar", "gtklock", "gtk-3.0", - "mako", + "swaync", "fuzzel", "nwg-drawer", "xdg-desktop-portal-wlr", @@ -413,6 +413,8 @@ def install_sway(overwrite: bool, reinstall: bool) -> None: helper_clone_foldercontents(CUSTOM_SRC / "CONFIG", CFG_TGT, "sway", overwrite) # custom waybar configs helper_clone_foldercontents(CUSTOM_SRC / "CONFIG", CFG_TGT, "waybar", overwrite) + # custom swaync configs + helper_clone_foldercontents(CUSTOM_SRC / "CONFIG", CFG_TGT, "swaync", overwrite) # desktop entries helper_clone_foldercontents( HOME_SRC,