From 86b4adb6e21d29acf0443575f1a45e1ff90863f7 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Wed, 13 Nov 2024 12:52:48 +1100 Subject: [PATCH] hyprland: add swaync init config --- .../hyprland/components/default.nix | 3 +- .../hyprland/components/swaync.nix | 48 +++++++++++++++++++ 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 modules/home/workstation/hyprland/components/swaync.nix diff --git a/modules/home/workstation/hyprland/components/default.nix b/modules/home/workstation/hyprland/components/default.nix index 493b34a..5e09b81 100644 --- a/modules/home/workstation/hyprland/components/default.nix +++ b/modules/home/workstation/hyprland/components/default.nix @@ -2,7 +2,8 @@ imports = [ ./rofi.nix ./hyprcapture.nix - ./mako.nix + # ./mako.nix + ./swaync.nix ./tools.nix ./waybar.nix ./hypridle.nix diff --git a/modules/home/workstation/hyprland/components/swaync.nix b/modules/home/workstation/hyprland/components/swaync.nix new file mode 100644 index 0000000..d1a8c44 --- /dev/null +++ b/modules/home/workstation/hyprland/components/swaync.nix @@ -0,0 +1,48 @@ +{ + hozen, + lib, + pkgs, + osConfig, + ... +}: let + inherit (osConfig.ooknet.appearance) fonts; + inherit (hozen) color; +in { + services.swaync = { + enable = true; + settings = { + positionX = "right"; + positionY = "top"; + layer = "overlay"; + control-center-layer = "top"; + layer-shell = true; + control-center-margin-top = 0; + control-center-margin-bottom = 0; + control-center-margin-right = 0; + control-center-margin-left = 0; + + notification-2fa-action = true; + notification-inline-replies = false; + notification-icon-size = 32; + notification-body-image-height = 100; + notification-body-image-width = 200; + }; + style = + /* + css + */ + '' + * { + font-family: ${fonts.monospace.family}; + font-size: 14px; + } + + .notification.critical { + border: 3px solid #${color.error.border}; + background-color: #${color.error.bg}; + color: #${color.error.fg}; + } + + ''; + }; +}