don't need no lib

main
Zynh Ludwig 2024-07-01 23:01:18 -07:00
parent 647a8f2073
commit 39c7ffbe50
2 changed files with 23 additions and 27 deletions

View File

@ -15,7 +15,7 @@ in
name = "rose-pine"; name = "rose-pine";
package = pkgs.rose-pine-icon-theme; package = pkgs.rose-pine-icon-theme;
}; };
settings = import ./util/rose-pine-dunst.nix { inherit lib; theme = "default"; }; settings = import ./util/rose-pine-dunst.nix { theme = "default"; };
}; };
# xdg.configFile."dunst/dunstrc.d/50-theme.conf".source = inputs.dunst-theme.outPath + "/rose-pine.conf"; # xdg.configFile."dunst/dunstrc.d/50-theme.conf".source = inputs.dunst-theme.outPath + "/rose-pine.conf";

View File

@ -1,4 +1,4 @@
{ lib, theme ? "default" }: { theme ? "default" }:
let let
configs = { configs = {
@ -32,6 +32,25 @@ let
else configs.default; else configs.default;
selectedConfig = getConfig theme; selectedConfig = getConfig theme;
urgencyIcons = {
urgency_low = "dialog-information";
urgency_normal = "dialog-warning";
urgency_critical = "dialog-error";
};
urgencyColors =
builtins.listToAttrs (map
(urgency: {
name = urgency;
value = rec {
inherit (selectedConfig.${urgency}) background highlight;
frame_color = highlight;
default_icon = urgencyIcons.${urgency};
format = formatWithColor highlight;
};
})
[ "urgency_low" "urgency_normal" "urgency_critical" ]);
in in
{ {
global = { global = {
@ -50,28 +69,5 @@ in
icon_theme = "rose-pine-icons"; icon_theme = "rose-pine-icons";
enable_recursive_icon_lookup = true; enable_recursive_icon_lookup = true;
corner_radius = 2; corner_radius = 2;
} // selectedConfig.global;
inherit (selectedConfig.global) background foreground; } // urgencyColors
};
urgency_low = rec {
inherit (selectedConfig.urgency_low) background highlight;
frame_color = highlight;
default_icon = "dialog-information";
format = formatWithColor highlight;
};
urgency_normal = rec {
inherit (selectedConfig.urgency_normal) background highlight;
frame_color = highlight;
default_icon = "dialog-warning";
format = formatWithColor highlight;
};
urgency_critical = rec {
inherit (selectedConfig.urgency_critical) background highlight;
frame_color = highlight;
default_icon = "dialog-error";
format = formatWithColor highlight;
};
}