summaryrefslogtreecommitdiff
path: root/common/modules/matugen
diff options
context:
space:
mode:
authorbrustybee <bee@4d2.org>2026-03-07 14:48:22 +0530
committerbrustybee <bee@4d2.org>2026-03-07 14:48:22 +0530
commit981bf88867a7d80c44708f0fc305ce41109f439c (patch)
tree3539976a27252255b42769ca4f5f410564f8601d /common/modules/matugen
parent9a6b7c9daddfbed3ad1649742210a901864bd3aa (diff)
Add dunst and update its matugen temp
Diffstat (limited to 'common/modules/matugen')
-rw-r--r--common/modules/matugen/default.nix267
-rw-r--r--common/modules/matugen/templates/matugen-dunst.nix25
2 files changed, 142 insertions, 150 deletions
diff --git a/common/modules/matugen/default.nix b/common/modules/matugen/default.nix
index fb84b92..45c6d50 100644
--- a/common/modules/matugen/default.nix
+++ b/common/modules/matugen/default.nix
@@ -33,154 +33,165 @@ in
enable = lib.mkEnableOption "Enable Dynamic colors";
};
- config = lib.mkIf cfg.enable (if homeManager then {
- programs.wallust = {
- enable = true;
- settings = {
- backend = "wal";
- color_space = "labmixed";
- palette = "dark16";
- fallback_generator = "interpolate";
- threshold = 11;
- check_contrast = true;
- templates = {
- foot = {
- template = "foot-colors.ini";
- target = "~/.config/foot/colors.ini";
- };
- alacritty = {
- template = "alacritty-colors.toml";
- target = "~/.config/alacritty/colors.toml";
- };
- ghostty = {
- template = "ghostty-colors.conf";
- target = "~/.config/ghostty/colors.conf";
- };
- zen = {
- template = "userChrome.css";
- target = "~/.cache/wallust/userChrome.css";
- };
- xresources = {
- template = "colors-xresources";
- target = "~/.config/x11/matugen.Xresources";
+ config = lib.mkIf cfg.enable (
+ if homeManager then
+ {
+ programs.wallust = {
+ enable = true;
+ settings = {
+ backend = "wal";
+ color_space = "labmixed";
+ palette = "dark16";
+ fallback_generator = "interpolate";
+ threshold = 11;
+ check_contrast = true;
+ templates = {
+ foot = {
+ template = "foot-colors.ini";
+ target = "~/.config/foot/colors.ini";
+ };
+ alacritty = {
+ template = "alacritty-colors.toml";
+ target = "~/.config/alacritty/colors.toml";
+ };
+ ghostty = {
+ template = "ghostty-colors.conf";
+ target = "~/.config/ghostty/colors.conf";
+ };
+ zen = {
+ template = "userChrome.css";
+ target = "~/.cache/wallust/userChrome.css";
+ };
+ xresources = {
+ template = "colors-xresources";
+ target = "~/.config/x11/matugen.Xresources";
+ };
+ };
};
};
- };
- };
- xdg.configFile = {
- "matugen/config.toml" = {
- # enable = !config.programs.noctalia-shell.enable;
- text =
- # toml
- ''
- [config]
- ${lib.optionalString config.beeMods.terminal.alacritty ''
- [templates.alacritty]
- input_path = '~/.config/matugen/templates/alacritty-colors.toml'
- output_path = '~/.config/wallust/templates/alacritty-colors.toml'
- ''}
+ home.packages = with pkgs; [
+ matugen
+ ];
- ${lib.optionalString config.beeMods.terminal.foot ''
- [templates.foot]
- input_path = '~/.config/matugen/templates/foot-colors.ini'
- output_path = '~/.config/wallust/templates/foot-colors.ini'
- ''}
+ xdg.configFile = {
+ "matugen/config.toml" = {
+ # enable = !config.programs.noctalia-shell.enable;
+ text =
+ # toml
+ ''
+ [config]
+ ${lib.optionalString config.beeMods.terminal.alacritty ''
+ [templates.alacritty]
+ input_path = '~/.config/matugen/templates/alacritty-colors.toml'
+ output_path = '~/.config/wallust/templates/alacritty-colors.toml'
+ ''}
- ${lib.optionalString config.beeMods.terminal.ghostty ''
- [templates.ghostty]
- input_path = '~/.config/matugen/templates/ghostty.conf'
- output_path = '~/.config/wallust/templates/ghostty-colors.conf'
- ''}
+ ${lib.optionalString config.beeMods.terminal.foot ''
+ [templates.foot]
+ input_path = '~/.config/matugen/templates/foot-colors.ini'
+ output_path = '~/.config/wallust/templates/foot-colors.ini'
+ ''}
- ${lib.optionalString config.programs.zathura.enable ''
- [templates.zathura]
- input_path = '~/.config/matugen/templates/zathura.toml'
- output_path = '~/.config/zathura/matugen'
- ''}
+ ${lib.optionalString config.beeMods.terminal.ghostty ''
+ [templates.ghostty]
+ input_path = '~/.config/matugen/templates/ghostty.conf'
+ output_path = '~/.config/wallust/templates/ghostty-colors.conf'
+ ''}
- ${lib.optionalString config.programs.swaylock.enable ''
- [templates.swaylock]
- input_path = '~/.config/matugen/templates/swaylock-colors'
- output_path = '~/.config/swaylock/swaylock-colors'
- ''}
+ ${lib.optionalString config.programs.zathura.enable ''
+ [templates.zathura]
+ input_path = '~/.config/matugen/templates/zathura.toml'
+ output_path = '~/.config/zathura/matugen'
+ ''}
- ${lib.optionalString config.beeMods.mango.enable ''
- [templates.mango]
- input_path = '~/.config/matugen/templates/mango.conf'
- output_path = '~/.config/mango/mango-colors.conf'
- post_hook = 'mmsg -d reload_config'
- ''}
+ ${lib.optionalString config.programs.swaylock.enable ''
+ [templates.swaylock]
+ input_path = '~/.config/matugen/templates/swaylock-colors'
+ output_path = '~/.config/swaylock/swaylock-colors'
+ ''}
- ${lib.optionalString config.programs.btop.enable ''
- [templates.btop]
- input_path = '~/.config/matugen/templates/btop.theme'
- output_path = '~/.config/btop/themes/matugen.theme'
- ''}
+ ${lib.optionalString config.beeMods.mango.enable ''
+ [templates.mango]
+ input_path = '~/.config/matugen/templates/mango.conf'
+ output_path = '~/.config/mango/mango-colors.conf'
+ post_hook = 'mmsg -d reload_config'
+ ''}
- ${lib.optionalString config.programs.yazi.enable ''
- [templates.yazi]
- input_path = '~/.config/matugen/templates/yazi.toml'
- output_path = '~/.config/yazi/theme.toml'
- ''}
+ ${lib.optionalString config.programs.btop.enable ''
+ [templates.btop]
+ input_path = '~/.config/matugen/templates/btop.theme'
+ output_path = '~/.config/btop/themes/matugen.theme'
+ ''}
+ ${lib.optionalString config.programs.yazi.enable ''
+ [templates.yazi]
+ input_path = '~/.config/matugen/templates/yazi.toml'
+ output_path = '~/.config/yazi/theme.toml'
+ ''}
- ${lib.optionalString config.beeMods.mango.enable ''
- [templates.Xresources]
- input_path = "~/.config/matugen/templates/colors-xresources"
- output_path = "~/.config/wallust/templates/colors-xresources"
- ''}
+ ${lib.optionalString config.beeMods.mango.enable ''
+ [templates.Xresources]
+ input_path = "~/.config/matugen/templates/colors-xresources"
+ output_path = "~/.config/wallust/templates/colors-xresources"
+ ''}
- ${lib.optionalString config.programs.vesktop.enable ''
- [templates.vesktop]
- input_path = "~/.config/matugen/templates/vesktop.css"
- output_path = "~/.config/vesktop/themes/midnight.css"
- ''}
- ${lib.optionalString config.beeMods.mango.waybar ''
- [templates.waybar]
- input_path = "~/.config/matugen/templates/waybar.css"
- output_path = "~/.config/waybar/colors.css"
- # post_hook = "pkill -SIGUSR2 waybar"
- ''}
+ ${lib.optionalString config.programs.vesktop.enable ''
+ [templates.vesktop]
+ input_path = "~/.config/matugen/templates/vesktop.css"
+ output_path = "~/.config/vesktop/themes/midnight.css"
+ ''}
- [templates.wlogout]
- input_path = "~/.config/matugen/templates/wlogout.css"
- output_path = "~/.config/wlogout/colors.css"
+ ${lib.optionalString config.beeMods.mango.waybar ''
+ [templates.waybar]
+ input_path = "~/.config/matugen/templates/waybar.css"
+ output_path = "~/.config/waybar/colors.css"
+ # post_hook = "pkill -SIGUSR2 waybar"
+ ''}
- [templates.dunst]
- input_path = '~/.config/matugen/templates/dunstrc'
- output_path = '~/.config/dunst/dunstrc'
- post_hook = "dunstctl reload"
+ [templates.wlogout]
+ input_path = "~/.config/matugen/templates/wlogout.css"
+ output_path = "~/.config/wlogout/colors.css"
- ${lib.optionalString config.programs.rofi.enable ''
- [templates.rofi]
- input_path = '~/.config/matugen/templates/rofi-colors.rasi'
- output_path = '~/.config/rofi/shared/colors.rasi'
- ''}
+ ${lib.optionalString config.services.dunst.enable ''
+ [templates.dunst]
+ input_path = '~/.config/matugen/templates/dunstrc'
+ output_path = '~/.config/dunst/dunstrc.d/colors.conf'
+ post_hook = "dunstctl reload"
+ ''}
- ${lib.optionalString config.gtk.enable ''
- [templates.gtk3]
- input_path = '~/.config/matugen/templates/colors.css'
- output_path = '~/.config/gtk-3.0/colors.css'
+ ${lib.optionalString config.programs.rofi.enable ''
+ [templates.rofi]
+ input_path = '~/.config/matugen/templates/rofi-colors.rasi'
+ output_path = '~/.config/rofi/shared/colors.rasi'
+ ''}
- [templates.gtk4]
- input_path = '~/.config/matugen/templates/colors.css'
- output_path = '~/.config/gtk-4.0/colors.css'
- post_hook = "${update_gtkcolors}"
- ''}
+ ${lib.optionalString config.gtk.enable ''
+ [templates.gtk3]
+ input_path = '~/.config/matugen/templates/colors.css'
+ output_path = '~/.config/gtk-3.0/colors.css'
- [templates.zed]
- input_path = '~/.config/matugen/templates/zed.json'
- output_path = '~/.config/zed/themes/matugen.json'
+ [templates.gtk4]
+ input_path = '~/.config/matugen/templates/colors.css'
+ output_path = '~/.config/gtk-4.0/colors.css'
+ post_hook = "${update_gtkcolors}"
+ ''}
- [templates.zen]
- input_path = '~/.config/matugen/templates/zen.css'
- output_path = '~/.config/wallust/templates/userChrome.css'
- post_hook = "${link_zen}"
- '';
- };
- };
- } else { });
+ [templates.zed]
+ input_path = '~/.config/matugen/templates/zed.json'
+ output_path = '~/.config/zed/themes/matugen.json'
+
+ [templates.zen]
+ input_path = '~/.config/matugen/templates/zen.css'
+ output_path = '~/.config/wallust/templates/userChrome.css'
+ post_hook = "${link_zen}"
+ '';
+ };
+ };
+ }
+ else
+ { }
+ );
}
diff --git a/common/modules/matugen/templates/matugen-dunst.nix b/common/modules/matugen/templates/matugen-dunst.nix
index 2f7d107..9b523d3 100644
--- a/common/modules/matugen/templates/matugen-dunst.nix
+++ b/common/modules/matugen/templates/matugen-dunst.nix
@@ -1,44 +1,25 @@
{
- config,
- pkgs,
- ...
-}:
-let
- playSound = pkgs.writeShellScriptBin "play-notification-sound" ''
- ${pkgs.libcanberra-gtk3}/bin/canberra-gtk-play -i message
- '';
-in
-{
xdg.configFile."matugen/templates/dunstrc" = {
text = ''
[global]
- font = "Lilex Nerd Font 11"
- corner_radius=0
- frame_width = 2
- markup = yes
- plain_text = no
- browser = zen --new-tab
-
- [play_sound]
- summary = "*"
- script = "${playSound}/bin/play-notification-sound"
-
- # --- Matugen Colors ---
frame_color = "{{colors.primary.default.hex}}"
separator_color = "{{colors.primary_container.default.hex}}"
[urgency_low]
background = "{{colors.surface.default.hex}}"
foreground = "{{colors.on_surface.default.hex}}"
+ highlight = "{{colors.primary.default.hex}}"
[urgency_normal]
background = "{{colors.surface.default.hex}}"
foreground = "{{colors.on_surface.default.hex}}"
+ highlight = "{{colors.primary.default.hex}}"
[urgency_critical]
background = "{{colors.error_container.default.hex}}"
foreground = "{{colors.on_error_container.default.hex}}"
frame_color = "{{colors.error.default.hex}}"
+ highlight = "{{colors.error.default.hex}}"
'';
};
}