diff --git a/options/custom/services/swaync/default.nix b/options/custom/services/swaync/default.nix index aff8228..6e153a2 100644 --- a/options/custom/services/swaync/default.nix +++ b/options/custom/services/swaync/default.nix @@ -12,26 +12,51 @@ in { # https://github.com/ErikReider/SwayNotificationCenter services.swaync = { enable = true; - style = ./style.css; + + # https://github.com/ErikReider/SwayNotificationCenter/blob/main/data/style/style.scss + style = let + border = toString config.custom.border; + gap = toString config.custom.gap; + in '' + .control-center { + border: ${border} solid #073642; + margin: ${gap}px; + } + + .notification.low { + border: ${border} solid #6c71c4; + } + + .notification.normal { + border: ${border} solid #d33682; + } + + .notification.critical { + border: ${border} solid #dc322f; + } + + ${readFile ./style.css} + ''; # https://github.com/ErikReider/SwayNotificationCenter/blob/main/src/configSchema.json settings = { - control-center-width = 750 / config.custom.scale; - control-center-height = config.custom.height / 2; + control-center-height = builtins.floor (config.custom.height / 2); control-center-positionY = "bottom"; + control-center-width = builtins.floor (1000 / config.custom.scale); fit-to-screen = false; hide-on-clear = true; notification-2fa-action = false; + notification-icon-size = 32; #// notification-inline-replies = true; + notification-window-width = builtins.floor (750 / config.custom.scale); positionX = "center"; positionY = "top"; - timeout-low = 5; timeout = 5; # normal timeout-critical = 0; + timeout-low = 5; widgets = [ "notifications" - "backlight" "inhibitors" "dnd" "title" diff --git a/options/custom/services/swaync/style.css b/options/custom/services/swaync/style.css index 6b6faa9..9555887 100644 --- a/options/custom/services/swaync/style.css +++ b/options/custom/services/swaync/style.css @@ -5,7 +5,6 @@ https://github.com/ErikReider/SwayNotificationCenter/blob/main/data/style/style. ***/ @define-color cc-bg #002b36; - @define-color noti-border-color #073642; @define-color noti-bg #002b36; @define-color noti-bg-opaque #002b36; @@ -13,24 +12,29 @@ https://github.com/ErikReider/SwayNotificationCenter/blob/main/data/style/style. @define-color noti-bg-hover #073642; @define-color noti-bg-hover-opaque #073642; @define-color noti-bg-focus #002b36; - @define-color text-color #93a1a1; @define-color text-color-disabled #586e75; -.notification.low { - border: 2px solid #6c71c4; +.control-center { + padding: 16px; } -.notification.normal { - border: 2px solid #d33682; -} - -.notification.critical { - border: 2px solid #dc322f; +.control-center .notification { + box-shadow: none; } .notification-content { - padding: 16px; + padding: 12px; +} + +.notification-content .app-icon, +.notification-content .image { + margin: 0 8px 0 0; +} + +.notification-group-buttons, +.notification-group-headers { + margin: 0; } .text-box .summary, @@ -41,13 +45,3 @@ https://github.com/ErikReider/SwayNotificationCenter/blob/main/data/style/style. .text-box .body { font-size: 16px; } - -.control-center { - /* border: 2px solid #073642; */ - margin: 10px; /* Gap size */ - padding: 16px; -} - -.control-center .notification { - box-shadow: none; -}