Compare commits

..

3 Commits

Author SHA1 Message Date
Zynh Ludwig 39c7ffbe50 don't need no lib 2024-07-01 23:24:28 -07:00
Zynh Ludwig 647a8f2073 refactoring rose-pine-dunst.nix 2024-07-01 22:54:12 -07:00
Zynh Ludwig ecedb9774d collapsing some things for vertical space 2024-07-01 22:06:48 -07:00
2 changed files with 37 additions and 76 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,72 +1,56 @@
{ lib, theme ? "default" }: { theme ? "default" }:
let let
configs = { configs = {
default = { default = {
global = { global = { background = "#26233a"; foreground = "#e0def4"; };
background = "#26233a"; urgency_low = { background = "#26273d"; highlight = "#31748f"; };
foreground = "#e0def4"; urgency_normal = { background = "#362e3c"; highlight = "#f6c177"; };
}; urgency_critical = { background = "#362e3c"; highlight = "#eb6f92"; };
urgency_low = {
background = "#26273d";
highlight = "#31748f";
};
urgency_normal = {
background = "#362e3c";
highlight = "#f6c177";
};
urgency_critical = {
background = "#362e3c";
highlight = "#eb6f92";
};
}; };
moon = { moon = {
global = { global = { background = "#393552"; foreground = "#e0def4"; };
background = "#393552"; urgency_low = { background = "#393955"; highlight = "#3e8fb0"; };
foreground = "#e0def4"; urgency_normal = { background = "#443c53"; highlight = "#f6c177"; };
urgency_critical = { background = "#433754"; highlight = "#eb6f92"; };
}; };
urgency_low = {
background = "#393955";
highlight = "#3e8fb0";
};
urgency_normal = {
background = "#443c53";
highlight = "#f6c177";
};
urgency_critical = {
background = "#433754";
highlight = "#eb6f92";
};
};
dawn = { dawn = {
global = { global = { background = "#f2e9e1"; foreground = "#393552"; };
background = "#f2e9e1"; urgency_low = { background = "#e7e0da"; highlight = "#286983"; };
foreground = "#393552"; urgency_normal = { background = "#3e8fb0"; highlight = "#ea9d34"; };
}; urgency_critical = { background = "#ede0d9"; highlight = "#b4637a"; };
urgency_low = {
background = "#e7e0da";
highlight = "#286983";
};
urgency_normal = {
background = "#3e8fb0";
highlight = "#ea9d34";
};
urgency_critical = {
background = "#ede0d9";
highlight = "#b4637a";
};
}; };
}; };
formatWithColor = color: "<b><span foreground='${color}'>%s</span></b>\n%b";
getConfig = name: getConfig = name:
if name == "moon" then configs.moon if name == "moon" then configs.moon
else if name == "dawn" then configs.dawn else if name == "dawn" then configs.dawn
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 = {
@ -85,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 = "<b><span foreground='${highlight}'>%s</span></b>\n%b";
};
urgency_normal = rec {
inherit (selectedConfig.urgency_normal) background highlight;
frame_color = highlight;
default_icon = "dialog-warning";
format = "<b><span foreground='${highlight}'>%s</span></b>\n%b";
};
urgency_critical = rec {
inherit (selectedConfig.urgency_critical) background highlight;
frame_color = highlight;
default_icon = "dialog-error";
format = "<b><span foreground='${highlight}'>%s</span></b>\n%b";
};
}