From 8e7cd348b105c2de5965fb2e2a190cfcc9ae984e Mon Sep 17 00:00:00 2001 From: ooks-io Date: Thu, 14 Nov 2024 15:18:09 +1100 Subject: [PATCH] hyprland: swap back to mako from swaync --- .../hyprland/components/default.nix | 3 +- .../workstation/hyprland/components/mako.nix | 21 ++++---- .../hyprland/components/swaync.nix | 48 ------------------- 3 files changed, 14 insertions(+), 58 deletions(-) delete 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 5e09b81..493b34a 100644 --- a/modules/home/workstation/hyprland/components/default.nix +++ b/modules/home/workstation/hyprland/components/default.nix @@ -2,8 +2,7 @@ imports = [ ./rofi.nix ./hyprcapture.nix - # ./mako.nix - ./swaync.nix + ./mako.nix ./tools.nix ./waybar.nix ./hypridle.nix diff --git a/modules/home/workstation/hyprland/components/mako.nix b/modules/home/workstation/hyprland/components/mako.nix index 1f710de..74467b0 100644 --- a/modules/home/workstation/hyprland/components/mako.nix +++ b/modules/home/workstation/hyprland/components/mako.nix @@ -1,37 +1,42 @@ { osConfig, + hozen, lib, ... }: let - inherit (osConfig.ooknet.appearance) colorscheme fonts; - inherit (colorscheme) palette; + inherit (osConfig.ooknet.appearance) fonts; inherit (osConfig.ooknet.workstation) environment; + inherit (hozen) color; inherit (lib) mkIf; in { config = mkIf (environment == "hyprland") { services.mako = { enable = true; + layer = "overlay"; font = "${fonts.regular.family} 12"; - padding = "10,10"; anchor = "top-right"; width = 300; height = 100; borderSize = 2; defaultTimeout = 3000; - backgroundColor = "#${palette.base00}dd"; - borderColor = "#${palette.base05}dd"; - textColor = "#${palette.base05}dd"; + backgroundColor = "#${color.layout.menu}"; + borderColor = "#${color.border.active}"; + textColor = "#${color.typography.text}"; extraConfig = '' [app-name="system-notify"] - padding=3,3 + text-alignment=center + font=${fonts.regular.family} 16 + anchor=top-center width=100 height=100 + [app-name="spotify_player"] + border-color=#${color.green.base} [urgency=critical] padding=3,3 width=300 height=100 anchor=top-center - border-color=#${palette.base08}dd + border-color=#${color.red.base}dd ''; }; }; diff --git a/modules/home/workstation/hyprland/components/swaync.nix b/modules/home/workstation/hyprland/components/swaync.nix deleted file mode 100644 index d1a8c44..0000000 --- a/modules/home/workstation/hyprland/components/swaync.nix +++ /dev/null @@ -1,48 +0,0 @@ -{ - 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}; - } - - ''; - }; -}