From a97959badd758df26329fd269a2e9c471bba54a4 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Sun, 5 Feb 2023 18:45:26 +0100 Subject: sway: configure fnott as notification daemon --- usecases/desktop/graphical/sway.nix | 38 +++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) (limited to 'usecases/desktop/graphical') diff --git a/usecases/desktop/graphical/sway.nix b/usecases/desktop/graphical/sway.nix index 96ea14b..9469473 100644 --- a/usecases/desktop/graphical/sway.nix +++ b/usecases/desktop/graphical/sway.nix @@ -1,8 +1,6 @@ _inputs: { - config, lib, pkgs, - system, ... }: { services.greetd = { @@ -152,6 +150,10 @@ _inputs: { "${modifier}+Shift+ccedilla" = "move container to workspace 9"; "${modifier}+Shift+agrave" = "move container to workspace 10"; + "${modifier}+comma" = "exec fnottctl dismiss"; + "${modifier}+Shift+comma" = "exec fnottctl dismiss all"; + "${modifier}+period" = "exec fnottctl actions"; + "${modifier}+m" = "exec ${pkgs.swaylock}/bin/swaylock"; "${modifier}+c" = "exec rofi -show calc -modi calc -no-sort -no-persist-history -calc-command 'echo -n {result} | wl-copy'"; @@ -170,10 +172,6 @@ _inputs: { output."*".bg = "${../../../res/wallpapers/wallpaper-1920x1080-kernel-card-black.png} fill"; startup = [ - { - command = "${pkgs.mako}/bin/mako"; - always = true; - } {command = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";} ]; @@ -186,6 +184,34 @@ _inputs: { }; }; + services.fnott = { + enable = true; + extraFlags = ["-s"]; + settings = let + color = c: (lib.removePrefix "#" c) + "ff"; + in + with osConfig.theme.colors; { + main = { + title-color = color foreground; + summary-color = color foreground; + body-color = color foreground; + + border-size = 1; + border-color = color background0; + + min-width = 300; + + notification-margin = 5; + + selection-helper = "${config.programs.rofi.finalPackage}/bin/rofi -dmenu -no-custom"; + }; + + normal.background = color lightBackground; + low.background = color background; + critical.background = color brightRed; + }; + }; + services.wlsunset = { enable = true; latitude = "48.864716"; -- cgit v1.2.3