summaryrefslogtreecommitdiff
path: root/common/modules/matugen
diff options
context:
space:
mode:
Diffstat (limited to 'common/modules/matugen')
-rw-r--r--common/modules/matugen/templates/matugen-discord.nix177
-rw-r--r--common/modules/matugen/templates/matugen-neovim.nix74
-rw-r--r--common/modules/matugen/templates/matugen-nvim.nix18
-rw-r--r--common/modules/matugen/templates/matugen-sequences.nix32
-rw-r--r--common/modules/matugen/templates/matugen-vesktop.nix179
-rw-r--r--common/modules/matugen/templates/matugen-xresources.nix38
6 files changed, 301 insertions, 217 deletions
diff --git a/common/modules/matugen/templates/matugen-discord.nix b/common/modules/matugen/templates/matugen-discord.nix
new file mode 100644
index 0000000..054155c
--- /dev/null
+++ b/common/modules/matugen/templates/matugen-discord.nix
@@ -0,0 +1,177 @@
+{
+ config,
+ lib,
+ ...
+}:
+{
+ xdg.configFile."matugen/templates/discord.css" = {
+ text = ''
+ /**
+ * @name system24
+ * @description a tui-style discord theme. Matugen Material UI + Original Base Colors.
+ * @author refact0r
+ * @version 2.0.0
+ * @invite nz87hXyvcy
+ * @website https://github.com/refact0r/system24
+ * @source https://github.com/refact0r/system24/blob/master/theme/system24.theme.css
+ */
+
+ /* import theme modules */
+ @import url("https://refact0r.github.io/system24/build/system24.css");
+
+ body {
+ /* font options */
+ --font: "IosevkaInput";
+ --code-font: "IosevkaInput";
+ font-weight: 300;
+ letter-spacing: -0.05ch;
+
+ /* sizes */
+ --gap: 12px;
+ --divider-thickness: 4px;
+ --border-thickness: 2px;
+ --border-hover-transition: 0.2s ease;
+
+ /* animation/transition options */
+ --animations: off;
+ --list-item-transition: 0.2s ease;
+ --dms-icon-svg-transition: 0.4s ease;
+
+ /* top bar options */
+ --top-bar-height: var(--gap);
+ --top-bar-button-position: titlebar;
+ --top-bar-title-position: off;
+ --subtle-top-bar-title: off;
+
+ /* window controls */
+ --custom-window-controls: off;
+ --window-control-size: 14px;
+
+ /* dms button options */
+ --custom-dms-icon: off;
+ --dms-icon-svg-url: url("");
+ --dms-icon-svg-size: 90%;
+ --dms-icon-color-before: var(--icon-subtle);
+ --dms-icon-color-after: var(--white);
+ --custom-dms-background: off;
+ --dms-background-image-url: url("");
+ --dms-background-image-size: cover;
+ --dms-background-color: linear-gradient(70deg, var(--blue-2), var(--purple-2), var(--red-2));
+
+ /* background image options */
+ --background-image: off;
+ --background-image-url: url("");
+
+ /* transparency/blur options */
+ --transparency-tweaks: off;
+ --remove-bg-layer: off;
+ --panel-blur: off;
+ --blur-amount: 12px;
+ --bg-floating: var(--bg-3);
+
+ /* other options */
+ --small-user-panel: on;
+
+ /* unrounding options */
+ --unrounding: on;
+
+ /* styling options */
+ --custom-spotify-bar: on;
+ --ascii-titles: on;
+ --ascii-loader: system24;
+
+ /* panel labels */
+ --panel-labels: on;
+ --label-color: var(--text-muted);
+ --label-font-weight: 500;
+ }
+
+ /* color options */
+ :root {
+ --colors: on;
+
+ /* text colors - mapped to matugen safe hex */
+ --text-0: var(--bg-4);
+ --text-1: {{colors.on_surface.default.hex}};
+ --text-2: {{colors.on_surface.default.hex}};
+ --text-3: {{colors.on_surface_variant.default.hex}};
+ --text-4: {{colors.outline.default.hex}};
+ --text-5: {{colors.outline_variant.default.hex}};
+
+ /* background colors - mapped to matugen safe hex */
+ --bg-1: {{colors.surface_variant.default.hex}};
+ --bg-2: {{colors.surface_container_high.default.hex}};
+ --bg-3: {{colors.surface_container_low.default.hex}};
+ <* if {{ is_dark_mode }} *>
+ --bg-4: {{colors.surface.default.hex}};
+ <* else *>
+ --bg-4: {{colors.surface_container_low.default.hex}};
+ <* endif *>
+
+ /* hovers - using on_surface hex + CSS hex opacity (1a=10%, 33=20%, 4d=30%) */
+ --hover: {{colors.on_surface.default.hex}}1a;
+ --active: {{colors.on_surface.default.hex}}33;
+ --active-2: {{colors.on_surface.default.hex}}4d;
+ --message-hover: var(--hover);
+
+ /* accent colors - Replaced with Matugen Colors */
+ --accent-1: {{colors.tertiary.default.hex}};
+ --accent-2: {{colors.primary.default.hex}};
+ --accent-3: {{colors.primary.default.hex}};
+ --accent-4: {{colors.primary_container.default.hex}};
+ --accent-5: {{colors.primary_fixed_dim.default.hex}};
+ --accent-new: {{colors.error.default.hex}};
+
+ /* Math kept identical, only source colors swapped to Matugen */
+ --mention: linear-gradient(to right, color-mix(in hsl, {{colors.primary.default.hex}}, transparent 90%) 40%, transparent);
+ --mention-hover: linear-gradient(to right, color-mix(in hsl, {{colors.primary.default.hex}}, transparent 95%) 40%, transparent);
+ --reply: linear-gradient(to right, color-mix(in hsl, {{colors.on_surface_variant.default.hex}}, transparent 90%) 40%, transparent);
+ --reply-hover: linear-gradient(to right, color-mix(in hsl, {{colors.on_surface_variant.default.hex}}, transparent 95%) 40%, transparent);
+
+ /* status indicator colors - Kept original as requested, updated offline */
+ --online: var(--green-2);
+ --dnd: var(--red-2);
+ --idle: var(--yellow-2);
+ --streaming: var(--purple-2);
+ --offline: {{colors.outline.default.hex}};
+
+ /* border colors */
+ --border-light: var(--hover);
+ --border: var(--active);
+ --border-hover: {{colors.primary.default.hex}};
+ --button-border: {{colors.on_surface.default.hex}}1a;
+
+ /* base colors - UNTOUCHED OKLCH FROM ORIGINAL */
+ --red-1: oklch(75% 0.13 0);
+ --red-2: oklch(70% 0.13 0);
+ --red-3: oklch(65% 0.13 0);
+ --red-4: oklch(60% 0.13 0);
+ --red-5: oklch(55% 0.13 0);
+
+ --green-1: oklch(75% 0.12 170);
+ --green-2: oklch(70% 0.12 170);
+ --green-3: oklch(65% 0.12 170);
+ --green-4: oklch(60% 0.12 170);
+ --green-5: oklch(55% 0.12 160);
+
+ --blue-1: oklch(75% 0.11 215);
+ --blue-2: oklch(70% 0.11 215);
+ --blue-3: oklch(65% 0.11 215);
+ --blue-4: oklch(60% 0.11 215);
+ --blue-5: oklch(55% 0.11 215);
+
+ --yellow-1: oklch(80% 0.12 90);
+ --yellow-2: oklch(75% 0.12 90);
+ --yellow-3: oklch(70% 0.12 90);
+ --yellow-4: oklch(65% 0.12 90);
+ --yellow-5: oklch(60% 0.12 90);
+
+ --purple-1: oklch(75% 0.12 310);
+ --purple-2: oklch(70% 0.12 310);
+ --purple-3: oklch(65% 0.12 310);
+ --purple-4: oklch(60% 0.12 310);
+ --purple-5: oklch(55% 0.12 310);
+ }
+ '';
+ };
+}
diff --git a/common/modules/matugen/templates/matugen-neovim.nix b/common/modules/matugen/templates/matugen-neovim.nix
new file mode 100644
index 0000000..9a1b558
--- /dev/null
+++ b/common/modules/matugen/templates/matugen-neovim.nix
@@ -0,0 +1,74 @@
+{
+ config,
+ lib,
+ ...
+}:
+{
+ xdg.configFile = {
+ "matugen/templates/neovim.lua" = {
+ text = ''
+ local present, base46 = pcall(require, "base46")
+ if not present or not base46._DMS_SUPPORT then
+ vim.notify(
+ "base46 plugin not found or incorrect, make sure to install AvengeMedia/base46",
+ vim.log.levels.ERROR,
+ { title = "matugen integration" }
+ )
+ return
+ end
+
+ local settings = {
+ matugenTemplateNeovimSetBackground = true
+ }
+
+ vim.o.background = "{{mode}}"
+
+ local current_file_path = debug.getinfo(1, "S").source:sub(2)
+ local theme_base = nil
+ if vim.o.background == "dark" then
+ theme_base = "aquarium"
+ else
+ theme_base = "flex-light"
+ end
+ local harmony = 0.5
+ local theme_name = "matugen"
+
+ if not _G._matugen_theme_watcher then
+ local uv = vim.uv or vim.loop
+ _G._matugen_theme_watcher = { uv.new_fs_event(), reload_timer = uv.new_timer() }
+
+ local debounce_time = 100 -- ms
+ local function handler()
+ _G._matugen_theme_watcher.reload_timer:stop()
+ _G._matugen_theme_watcher.reload_timer:start(
+ debounce_time,
+ 0,
+ vim.schedule_wrap(function()
+ base46.theme_tables[theme_name] = nil
+ if vim.g.colors_name == theme_name then
+ vim.cmd.colorscheme(theme_name)
+ end
+ _G._matugen_theme_watcher[1]:stop()
+ _G._matugen_theme_watcher[1]:start(current_file_path, {}, handler)
+ end)
+ )
+ end
+ _G._matugen_theme_watcher[1]:start(current_file_path, {}, handler)
+ end
+
+ if not base46.theme_tables[theme_name] or base46.theme_tables[theme_name].type ~= vim.o.background then
+ local builtin = vim.deepcopy(assert(base46.get_builtin_theme(theme_base)))
+ local harmonized = base46.theme_harmonize(builtin, "{{colors.primary.default.hex}}", harmony)
+ if settings.matugenTemplateNeovimSetBackground ~= false then
+ harmonized = base46.theme_set_bg(harmonized, "{{colors.background.default.hex}}")
+ end
+
+ base46.theme_tables[theme_name] = harmonized
+ end
+
+ base46.load(theme_name)
+ vim.g.colors_name = theme_name
+ '';
+ };
+ };
+}
diff --git a/common/modules/matugen/templates/matugen-nvim.nix b/common/modules/matugen/templates/matugen-nvim.nix
new file mode 100644
index 0000000..0b7b421
--- /dev/null
+++ b/common/modules/matugen/templates/matugen-nvim.nix
@@ -0,0 +1,18 @@
+{
+ config,
+ lib,
+ ...
+}:
+{
+ xdg.configFile = {
+ "matugen/templates/neovim.json" = {
+ text = ''
+ {
+ "mode": "{{mode}}",
+ "source_color":"{{colors.primary.default.hex}}",
+ "background":"{{colors.background.default.hex}}"
+ }
+ '';
+ };
+ };
+}
diff --git a/common/modules/matugen/templates/matugen-sequences.nix b/common/modules/matugen/templates/matugen-sequences.nix
index ac6e413..03bc538 100644
--- a/common/modules/matugen/templates/matugen-sequences.nix
+++ b/common/modules/matugen/templates/matugen-sequences.nix
@@ -9,22 +9,22 @@
text = ''
#!/bin/sh
SEQ=""
- SEQ="$SEQ$(printf '\033]4;0;{{dank16.color0.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;1;{{dank16.color1.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;2;{{dank16.color2.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;3;{{dank16.color3.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;4;{{dank16.color4.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;5;{{dank16.color5.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;6;{{dank16.color6.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;7;{{dank16.color7.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;8;{{dank16.color8.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;9;{{dank16.color9.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;10;{{dank16.color10.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;11;{{dank16.color11.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;12;{{dank16.color12.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;13;{{dank16.color13.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;14;{{dank16.color14.default.hex}}\007')"
- SEQ="$SEQ$(printf '\033]4;15;{{dank16.color15.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;0;{{colors.surface_variant.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;1;{{colors.error.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;2;{{colors.primary.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;3;{{colors.secondary.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;4;{{colors.tertiary.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;5;{{colors.primary_fixed_dim.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;6;{{colors.secondary_fixed_dim.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;7;{{colors.on_surface.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;8;{{colors.on_surface_variant.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;9;{{colors.error.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;10;{{colors.primary.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;11;{{colors.secondary.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;12;{{colors.tertiary.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;13;{{colors.primary_fixed_dim.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;14;{{colors.secondary_fixed_dim.default.hex}}\007')"
+ SEQ="$SEQ$(printf '\033]4;15;{{colors.on_surface.default.hex}}\007')"
SEQ="$SEQ$(printf '\033]10;{{colors.on_surface.default.hex}}\007')"
SEQ="$SEQ$(printf '\033]11;{{colors.background.default.hex}}\007')"
# <* if {{ is_dark_mode }} *>
diff --git a/common/modules/matugen/templates/matugen-vesktop.nix b/common/modules/matugen/templates/matugen-vesktop.nix
deleted file mode 100644
index 461d2c6..0000000
--- a/common/modules/matugen/templates/matugen-vesktop.nix
+++ /dev/null
@@ -1,179 +0,0 @@
-{
- config,
- lib,
- ...
-}:
-{
- config = lib.mkIf config.programs.vesktop.enable {
- xdg.configFile."matugen/templates/vesktop.css" = {
- text = ''
- /**
- * @name system24
- * @description a tui-style discord theme. Matugen Material UI + Original Base Colors.
- * @author refact0r
- * @version 2.0.0
- * @invite nz87hXyvcy
- * @website https://github.com/refact0r/system24
- * @source https://github.com/refact0r/system24/blob/master/theme/system24.theme.css
- */
-
- /* import theme modules */
- @import url("https://refact0r.github.io/system24/build/system24.css");
-
- body {
- /* font options */
- --font: "IosevkaInput";
- --code-font: "IosevkaInput";
- font-weight: 300;
- letter-spacing: -0.05ch;
-
- /* sizes */
- --gap: 12px;
- --divider-thickness: 4px;
- --border-thickness: 2px;
- --border-hover-transition: 0.2s ease;
-
- /* animation/transition options */
- --animations: off;
- --list-item-transition: 0.2s ease;
- --dms-icon-svg-transition: 0.4s ease;
-
- /* top bar options */
- --top-bar-height: var(--gap);
- --top-bar-button-position: titlebar;
- --top-bar-title-position: off;
- --subtle-top-bar-title: off;
-
- /* window controls */
- --custom-window-controls: off;
- --window-control-size: 14px;
-
- /* dms button options */
- --custom-dms-icon: off;
- --dms-icon-svg-url: url("");
- --dms-icon-svg-size: 90%;
- --dms-icon-color-before: var(--icon-subtle);
- --dms-icon-color-after: var(--white);
- --custom-dms-background: off;
- --dms-background-image-url: url("");
- --dms-background-image-size: cover;
- --dms-background-color: linear-gradient(70deg, var(--blue-2), var(--purple-2), var(--red-2));
-
- /* background image options */
- --background-image: off;
- --background-image-url: url("");
-
- /* transparency/blur options */
- --transparency-tweaks: off;
- --remove-bg-layer: off;
- --panel-blur: off;
- --blur-amount: 12px;
- --bg-floating: var(--bg-3);
-
- /* other options */
- --small-user-panel: on;
-
- /* unrounding options */
- --unrounding: on;
-
- /* styling options */
- --custom-spotify-bar: on;
- --ascii-titles: on;
- --ascii-loader: system24;
-
- /* panel labels */
- --panel-labels: on;
- --label-color: var(--text-muted);
- --label-font-weight: 500;
- }
-
- /* color options */
- :root {
- --colors: on;
-
- /* text colors - mapped to matugen safe hex */
- --text-0: var(--bg-4);
- --text-1: {{colors.on_surface.default.hex}};
- --text-2: {{colors.on_surface.default.hex}};
- --text-3: {{colors.on_surface_variant.default.hex}};
- --text-4: {{colors.outline.default.hex}};
- --text-5: {{colors.outline_variant.default.hex}};
-
- /* background colors - mapped to matugen safe hex */
- --bg-1: {{colors.surface_variant.default.hex}};
- --bg-2: {{colors.surface_container_high.default.hex}};
- --bg-3: {{colors.surface_container_low.default.hex}};
- <* if {{ is_dark_mode }} *>
- --bg-4: {{colors.surface.default.hex}};
- <* else *>
- --bg-4: {{colors.surface_container_low.default.hex}};
- <* endif *>
-
- /* hovers - using on_surface hex + CSS hex opacity (1a=10%, 33=20%, 4d=30%) */
- --hover: {{colors.on_surface.default.hex}}1a;
- --active: {{colors.on_surface.default.hex}}33;
- --active-2: {{colors.on_surface.default.hex}}4d;
- --message-hover: var(--hover);
-
- /* accent colors - Replaced with Matugen Colors */
- --accent-1: {{colors.tertiary.default.hex}};
- --accent-2: {{colors.primary.default.hex}};
- --accent-3: {{colors.primary.default.hex}};
- --accent-4: {{colors.primary_container.default.hex}};
- --accent-5: {{colors.primary_fixed_dim.default.hex}};
- --accent-new: {{colors.error.default.hex}};
-
- /* Math kept identical, only source colors swapped to Matugen */
- --mention: linear-gradient(to right, color-mix(in hsl, {{colors.primary.default.hex}}, transparent 90%) 40%, transparent);
- --mention-hover: linear-gradient(to right, color-mix(in hsl, {{colors.primary.default.hex}}, transparent 95%) 40%, transparent);
- --reply: linear-gradient(to right, color-mix(in hsl, {{colors.on_surface_variant.default.hex}}, transparent 90%) 40%, transparent);
- --reply-hover: linear-gradient(to right, color-mix(in hsl, {{colors.on_surface_variant.default.hex}}, transparent 95%) 40%, transparent);
-
- /* status indicator colors - Kept original as requested, updated offline */
- --online: var(--green-2);
- --dnd: var(--red-2);
- --idle: var(--yellow-2);
- --streaming: var(--purple-2);
- --offline: {{colors.outline.default.hex}};
-
- /* border colors */
- --border-light: var(--hover);
- --border: var(--active);
- --border-hover: {{colors.primary.default.hex}};
- --button-border: {{colors.on_surface.default.hex}}1a;
-
- /* base colors - UNTOUCHED OKLCH FROM ORIGINAL */
- --red-1: oklch(75% 0.13 0);
- --red-2: oklch(70% 0.13 0);
- --red-3: oklch(65% 0.13 0);
- --red-4: oklch(60% 0.13 0);
- --red-5: oklch(55% 0.13 0);
-
- --green-1: oklch(75% 0.12 170);
- --green-2: oklch(70% 0.12 170);
- --green-3: oklch(65% 0.12 170);
- --green-4: oklch(60% 0.12 170);
- --green-5: oklch(55% 0.12 160);
-
- --blue-1: oklch(75% 0.11 215);
- --blue-2: oklch(70% 0.11 215);
- --blue-3: oklch(65% 0.11 215);
- --blue-4: oklch(60% 0.11 215);
- --blue-5: oklch(55% 0.11 215);
-
- --yellow-1: oklch(80% 0.12 90);
- --yellow-2: oklch(75% 0.12 90);
- --yellow-3: oklch(70% 0.12 90);
- --yellow-4: oklch(65% 0.12 90);
- --yellow-5: oklch(60% 0.12 90);
-
- --purple-1: oklch(75% 0.12 310);
- --purple-2: oklch(70% 0.12 310);
- --purple-3: oklch(65% 0.12 310);
- --purple-4: oklch(60% 0.12 310);
- --purple-5: oklch(55% 0.12 310);
- }
- '';
- };
- };
-}
diff --git a/common/modules/matugen/templates/matugen-xresources.nix b/common/modules/matugen/templates/matugen-xresources.nix
index 292f0f2..94f4e93 100644
--- a/common/modules/matugen/templates/matugen-xresources.nix
+++ b/common/modules/matugen/templates/matugen-xresources.nix
@@ -29,29 +29,23 @@
st.foreground: {{colors.on_surface.default.hex}}
st.cursorColor: {{colors.primary.default.hex}}
- st.color0: {{dank16.color0.default.hex}}
- st.color8: {{dank16.color8.default.hex}}
+ st.color0 : {{colors.surface_variant.default.hex}}
+ st.color1 : {{colors.error.default.hex}}
+ st.color2 : {{colors.primary.default.hex}}
+ st.color3 : {{colors.secondary.default.hex}}
+ st.color4 : {{colors.tertiary.default.hex}}
+ st.color5 : {{colors.primary_fixed_dim.default.hex}}
+ st.color6 : {{colors.secondary_fixed_dim.default.hex}}
+ st.color7 : {{colors.on_surface.default.hex}}
- st.color1: {{dank16.color1.default.hex}}
- st.color9: {{dank16.color9.default.hex}}
-
- st.color2: {{dank16.color2.default.hex}}
- st.color10: {{dank16.color10.default.hex}}
-
- st.color3: {{dank16.color3.default.hex}}
- st.color11: {{dank16.color11.default.hex}}
-
- st.color4: {{dank16.color4.default.hex}}
- st.color12: {{dank16.color12.default.hex}}
-
- st.color5: {{dank16.color5.default.hex}}
- st.color13: {{dank16.color13.default.hex}}
-
- st.color6: {{dank16.color6.default.hex}}
- st.color14: {{dank16.color14.default.hex}}
-
- st.color7: {{dank16.color7.default.hex}}
- st.color15: {{dank16.color15.default.hex}}
+ st.color8 : {{colors.on_surface_variant.default.hex}}
+ st.color9 : {{colors.error.default.hex}}
+ st.color10: {{colors.primary.default.hex}}
+ st.color11: {{colors.secondary.default.hex}}
+ st.color12: {{colors.tertiary.default.hex}}
+ st.color13: {{colors.primary_fixed_dim.default.hex}}
+ st.color14: {{colors.secondary_fixed_dim.default.hex}}
+ st.color15: {{colors.on_surface.default.hex}}
'';
};
};