From 4cf56716de3eae0426a2da4884fc32a8a0df513c Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Mon, 9 Feb 2026 09:53:27 +0100 Subject: [PATCH] Update swaync config --- hm/swaynotificationcenter.nix | 177 ++++++++++++++++++++++------------ 1 file changed, 114 insertions(+), 63 deletions(-) diff --git a/hm/swaynotificationcenter.nix b/hm/swaynotificationcenter.nix index e0c49a3..4070e12 100644 --- a/hm/swaynotificationcenter.nix +++ b/hm/swaynotificationcenter.nix @@ -17,67 +17,118 @@ }; }; - xdg.configFile."swaync/config.json".text = '' - { - "$schema": "/etc/xdg/swaync/configSchema.json", - "positionX": "right", - "positionY": "top", - "control-center-margin-top": 16, - "control-center-margin-bottom": 16, - "control-center-margin-right": 16, - "notification-icon-size": 64, - "notification-body-image-height": 100, - "notification-body-image-width": 200, - "timeout": 10, - "timeout-low": 5, - "timeout-critical": 0, - "fit-to-screen": true, - "control-center-width": 500, - "control-center-height": 1000, - "notification-window-width": 500, - "keyboard-shortcuts": true, - "image-visibility": "when-available", - "transition-time": 200, - "hide-on-clear": false, - "hide-on-action": true, - "script-fail-notify": true, - "widgets": ["buttons-grid", "mpris", "volume", "title", "notifications"], - "widget-config": { - "title": { - "text": "Notifications", - "clear-all-button": true, - "button-text": "󰆴 Clear" - }, - "dnd": { - "text": "Do Not Disturb" - }, - "label": { - "max-lines": 1, - "text": "Notification Center" - }, - "mpris": { - "image-size": 96, - "image-radius": 7 - }, - "volume": { - "label": "󰕾" - }, - "backlight": { - "label": "󰃟" - }, - "buttons-grid": { - "actions": [ - { - "label": "󰐥", - "command": "wlogout" - }, - { - "label": "", - "command": "loginctl lock-session" - } - ] - } - } - } - ''; + home.packages = [ pkgs.wlogout ]; + + # xdg.configFile."swaync/config.json".text = '' + # { + # "$schema": "/etc/xdg/swaync/configSchema.json", + # "positionX": "right", + # "positionY": "top", + # "control-center-margin-top": 16, + # "control-center-margin-bottom": 16, + # "control-center-margin-right": 16, + # "notification-icon-size": 64, + # "notification-body-image-height": 100, + # "notification-body-image-width": 200, + # "timeout": 10, + # "timeout-low": 5, + # "timeout-critical": 0, + # "fit-to-screen": true, + # "control-center-width": 500, + # "control-center-height": 1000, + # "notification-window-width": 500, + # "keyboard-shortcuts": true, + # "image-visibility": "when-available", + # "transition-time": 200, + # "hide-on-clear": false, + # "hide-on-action": true, + # "script-fail-notify": true, + # "widgets": ["buttons-grid", "mpris", "volume", "title", "notifications"], + # "widget-config": { + # "title": { + # "text": "Notifications", + # "clear-all-button": true, + # "button-text": "󰆴 Clear" + # }, + # "dnd": { + # "text": "Do Not Disturb" + # }, + # "label": { + # "max-lines": 1, + # "text": "Notification Center" + # }, + # "mpris": { + # "image-size": 96, + # "image-radius": 7 + # }, + # "volume": { + # "label": "󰕾" + # }, + # "backlight": { + # "label": "󰃟" + # }, + # "buttons-grid": { + # "actions": [ + # { + # "label": "󰐥", + # "command": "wlogout" + # }, + # { + # "label": "", + # "command": "loginctl lock-session" + # } + # ] + # } + # } + # } + # ''; + + xdg.configFile."swaync/config.json".text = builtins.toJSON { + "$schema" = "/etc/xdg/swaync/configSchema.json"; + "positionX" = "right"; + "positionY" = "top"; + "control-center-margin-top" = 16; + "control-center-margin-bottom" = 16; + "control-center-margin-right" = 16; + "notification-icon-size" = 64; + "notification-body-image-height" = 100; + "notification-body-image-width" = 200; + "timeout" = 10; + "timeout-low" = 5; + "timeout-critical" = 0; + "fit-to-screen" = true; + "control-center-width" = 500; + "control-center-height" = 1000; + "notification-window-width" = 500; + "keyboard-shortcuts" = true; + "image-visibility" = "when-available"; + "transition-time" = 200; + "hide-on-clear" = false; + "hide-on-action" = true; + "script-fail-notify" = true; + "widgets" = [ "buttons-grid" "mpris" "volume" "title" "notifications" ]; + "widget-config" = { + "title" = { + "text" = "Notifications"; + "clear-all-button" = true; + "button-text" = "󰆴 Clear"; + }; + "dnd"."text" = "Do Not Disturb"; + "label" = { "max-lines" = 1; "text" = "Notification Center"; }; + "mpris" = { "image-size" = 96; "image-radius" = 7; }; + "volume"."label" = "󰕾"; + "backlight"."label" = "󰃟"; + "buttons-grid" = { + "actions" = [ + # { "label" = "󰐥"; "command" = "wlogout"; } + { "label" = ""; "command" = "loginctl lock-session"; } + { "label" = "󰍃"; "command" = "loginctl terminate-user $USER"; } + { "label" = "󰜗"; "command" = "systemctl hibernate"; } + { "label" = "󱋋"; "command" = "systemctl hybrid-sleep"; } + { "label" = "󰜉"; "command" = "systemctl reboot"; } + { "label" = "󰐥"; "command" = "systemctl poweroff"; } + ]; + }; + }; + }; }