summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home-manager/bashrc6
-rw-r--r--home-manager/foot/foot.ini17
-rw-r--r--home-manager/home.nix3
-rw-r--r--home-manager/hypr/config/autostart.lua2
-rw-r--r--home-manager/matugen/config.toml29
-rw-r--r--home-manager/matugen/templates/colors.lua7
-rw-r--r--home-manager/matugen/templates/foot-colors.ini23
-rw-r--r--home-manager/matugen/templates/gtk-colors.css18
-rw-r--r--home-manager/matugen/templates/gtk4.css24
-rw-r--r--home-manager/matugen/templates/helium.json16
-rw-r--r--home-manager/matugen/templates/spicetify.css18
-rw-r--r--home-manager/matugen/templates/spicetify.ini17
-rw-r--r--home-manager/matugen/templates/vesktop.css67
-rw-r--r--home-manager/modules/bash.nix3
-rw-r--r--home-manager/modules/foot.nix3
-rw-r--r--home-manager/modules/matugen.nix11
-rwxr-xr-xhome-manager/scripts/matugen-sync.sh27
17 files changed, 290 insertions, 1 deletions
diff --git a/home-manager/bashrc b/home-manager/bashrc
new file mode 100644
index 0000000..af73ba5
--- /dev/null
+++ b/home-manager/bashrc
@@ -0,0 +1,6 @@
+eval "$(starship init bash)"
+fastfetch
+
+if [ -f ~/secrets.env ]; then
+ source ~/secrets.env
+fi
diff --git a/home-manager/foot/foot.ini b/home-manager/foot/foot.ini
new file mode 100644
index 0000000..a692a8f
--- /dev/null
+++ b/home-manager/foot/foot.ini
@@ -0,0 +1,17 @@
+include=~/.cache/matugen/foot-colors.ini
+[colors]
+alpha=0.85
+[main]
+term=xterm-256color
+# A highly recommended, clean font for terminals.
+# Adjust the size to your screen's preference.
+font=JetBrains Mono Nerd Font:size=12
+dpi-aware=yes
+pad=10x5
+
+[csd]
+# Disables foot's client-side decorations since Hyprland handles window borders
+preferred=none
+
+
+
diff --git a/home-manager/home.nix b/home-manager/home.nix
index f4c1189..58ee3cd 100644
--- a/home-manager/home.nix
+++ b/home-manager/home.nix
@@ -6,8 +6,11 @@
}: {
imports = [
./modules/base.nix
+ ./modules/bash.nix
+ ./modules/foot.nix
./modules/git.nix
./modules/hyprland.nix
+ ./modules/matugen.nix
./modules/tmux.nix
./modules/packages-basic.nix
./modules/packages-development.nix
diff --git a/home-manager/hypr/config/autostart.lua b/home-manager/hypr/config/autostart.lua
index 929c990..7aa1ebe 100644
--- a/home-manager/hypr/config/autostart.lua
+++ b/home-manager/hypr/config/autostart.lua
@@ -7,7 +7,7 @@ hl.on("hyprland.start", function()
hl.exec_cmd("gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark'")
hl.exec_cmd("gsettings set org.gnome.desktop.interface gtk-theme 'Adwaita-dark'")
- hl.exec_cmd("~/scripts/matugen-sync.sh")
+ hl.exec_cmd("$HOME/scripts/matugen-sync.sh")
hl.exec_cmd("tailscale systray")
hl.exec_cmd("vesktop")
diff --git a/home-manager/matugen/config.toml b/home-manager/matugen/config.toml
new file mode 100644
index 0000000..681d6c4
--- /dev/null
+++ b/home-manager/matugen/config.toml
@@ -0,0 +1,29 @@
+[config]
+# Matugen requires this config block to exist, even if it's empty!
+
+[templates.foot]
+input_path = "~/.config/matugen/templates/foot-colors.ini"
+output_path = "~/.cache/matugen/foot-colors.ini"
+# Optional: Make foot reload colors instantly without restarting the terminal
+post_hook = "pkill -SIGUSR1 foot"
+
+[templates.hyprland_lua]
+input_path = "~/.config/matugen/templates/colors.lua"
+output_path = "~/.cache/matugen/colors.lua"
+
+[templates.vesktop]
+input_path = "~/.config/matugen/templates/vesktop.css"
+output_path = "~/.config/vesktop/settings/quickCss.css"
+
+[templates.gtk4]
+input_path = "~/.config/matugen/templates/gtk4.css"
+output_path = "~/.config/gtk-4.0/gtk.css"
+
+[templates.helium]
+input_path = "~/.config/matugen/templates/helium.json"
+output_path = "~/.config/helium-theme/manifest.json"
+
+[templates.gtk3]
+input_path = "~/.config/matugen/templates/gtk-colors.css"
+output_path = "~/.config/gtk-3.0/matugen-colors.css"
+
diff --git a/home-manager/matugen/templates/colors.lua b/home-manager/matugen/templates/colors.lua
new file mode 100644
index 0000000..a5fe579
--- /dev/null
+++ b/home-manager/matugen/templates/colors.lua
@@ -0,0 +1,7 @@
+return {
+ primary = "0xff{{colors.primary.default.hex_stripped}}",
+ secondary = "0xff{{colors.secondary.default.hex_stripped}}",
+ background = "0xff{{colors.background.default.hex_stripped}}",
+ surface = "0xff{{colors.surface.default.hex_stripped}}",
+ error = "0xff{{colors.error.default.hex_stripped}}"
+}
diff --git a/home-manager/matugen/templates/foot-colors.ini b/home-manager/matugen/templates/foot-colors.ini
new file mode 100644
index 0000000..6e23334
--- /dev/null
+++ b/home-manager/matugen/templates/foot-colors.ini
@@ -0,0 +1,23 @@
+[colors]
+background={{colors.background.default.hex_stripped}}
+foreground={{colors.on_background.default.hex_stripped}}
+
+cursor={{colors.primary.default.hex_stripped}} {{colors.on_primary.default.hex_stripped}}
+
+regular0={{colors.surface.default.hex_stripped}}
+regular1={{colors.error.default.hex_stripped}}
+regular2={{colors.primary.default.hex_stripped}}
+regular3={{colors.secondary.default.hex_stripped}}
+regular4={{colors.tertiary.default.hex_stripped}}
+regular5={{colors.inverse_primary.default.hex_stripped}}
+regular6={{colors.primary_container.default.hex_stripped}}
+regular7={{colors.on_surface.default.hex_stripped}}
+
+bright0={{colors.surface_variant.default.hex_stripped}}
+bright1={{colors.error_container.default.hex_stripped}}
+bright2={{colors.primary_container.default.hex_stripped}}
+bright3={{colors.secondary_container.default.hex_stripped}}
+bright4={{colors.tertiary_container.default.hex_stripped}}
+bright5={{colors.inverse_surface.default.hex_stripped}}
+bright6={{colors.on_primary_container.default.hex_stripped}}
+bright7={{colors.on_surface_variant.default.hex_stripped}}
diff --git a/home-manager/matugen/templates/gtk-colors.css b/home-manager/matugen/templates/gtk-colors.css
new file mode 100644
index 0000000..c715ec4
--- /dev/null
+++ b/home-manager/matugen/templates/gtk-colors.css
@@ -0,0 +1,18 @@
+/* Standard GTK3 Variables */
+@define-color theme_bg_color {{colors.surface.default.hex}};
+@define-color theme_fg_color {{colors.on_surface.default.hex}};
+@define-color theme_text_color {{colors.on_surface.default.hex}};
+@define-color theme_selected_bg_color {{colors.primary.default.hex}};
+@define-color theme_selected_fg_color {{colors.on_primary.default.hex}};
+@define-color theme_unfocused_bg_color {{colors.surface_dim.default.hex}};
+
+/* adw-gtk3 / libadwaita Variables */
+@define-color accent_color {{colors.primary.default.hex}};
+@define-color accent_bg_color {{colors.primary.default.hex}};
+@define-color accent_fg_color {{colors.on_primary.default.hex}};
+@define-color window_bg_color {{colors.surface.default.hex}};
+@define-color window_fg_color {{colors.on_surface.default.hex}};
+@define-color headerbar_bg_color {{colors.surface_container.default.hex}};
+@define-color headerbar_fg_color {{colors.on_surface.default.hex}};
+@define-color popover_bg_color {{colors.surface_container_high.default.hex}};
+@define-color popover_fg_color {{colors.on_surface.default.hex}};
diff --git a/home-manager/matugen/templates/gtk4.css b/home-manager/matugen/templates/gtk4.css
new file mode 100644
index 0000000..88f788e
--- /dev/null
+++ b/home-manager/matugen/templates/gtk4.css
@@ -0,0 +1,24 @@
+/* Primary Accents */
+@define-color accent_color {{colors.primary.default.hex}};
+@define-color accent_bg_color {{colors.primary.default.hex}};
+@define-color accent_fg_color {{colors.on_primary.default.hex}};
+
+/* Main Window & Backgrounds */
+@define-color window_bg_color {{colors.background.default.hex}};
+@define-color window_fg_color {{colors.on_background.default.hex}};
+@define-color view_bg_color {{colors.surface.default.hex}};
+@define-color view_fg_color {{colors.on_surface.default.hex}};
+
+/* Top Bar (Headerbar) */
+@define-color headerbar_bg_color {{colors.surface_container.default.hex}};
+@define-color headerbar_fg_color {{colors.on_surface.default.hex}};
+@define-color headerbar_border_color {{colors.outline_variant.default.hex}};
+@define-color headerbar_backdrop_color @window_bg_color;
+
+/* Cards, Dialogs, and Popovers */
+@define-color card_bg_color {{colors.surface_container_low.default.hex}};
+@define-color card_fg_color {{colors.on_surface.default.hex}};
+@define-color dialog_bg_color {{colors.surface_container_high.default.hex}};
+@define-color dialog_fg_color {{colors.on_surface.default.hex}};
+@define-color popover_bg_color {{colors.surface_container_highest.default.hex}};
+@define-color popover_fg_color {{colors.on_surface.default.hex}};
diff --git a/home-manager/matugen/templates/helium.json b/home-manager/matugen/templates/helium.json
new file mode 100644
index 0000000..0c397f7
--- /dev/null
+++ b/home-manager/matugen/templates/helium.json
@@ -0,0 +1,16 @@
+{
+ "manifest_version": 3,
+ "version": "1.0",
+ "name": "Matugen Dynamic Theme",
+ "theme": {
+ "colors": {
+ "frame": [{{colors.surface.default.red}}, {{colors.surface.default.green}}, {{colors.surface.default.blue}}],
+ "toolbar": [{{colors.surface_container_low.default.red}}, {{colors.surface_container_low.default.green}}, {{colors.surface_container_low.default.blue}}],
+ "tab_text": [{{colors.on_surface.default.red}}, {{colors.on_surface.default.green}}, {{colors.on_surface.default.blue}}],
+ "tab_background_text": [{{colors.on_surface_variant.default.red}}, {{colors.on_surface_variant.default.green}}, {{colors.on_surface_variant.default.blue}}],
+ "bookmark_text": [{{colors.on_surface.default.red}}, {{colors.on_surface.default.green}}, {{colors.on_surface.default.blue}}],
+ "ntp_background": [{{colors.background.default.red}}, {{colors.background.default.green}}, {{colors.background.default.blue}}],
+ "ntp_text": [{{colors.on_background.default.red}}, {{colors.on_background.default.green}}, {{colors.on_background.default.blue}}]
+ }
+ }
+}
diff --git a/home-manager/matugen/templates/spicetify.css b/home-manager/matugen/templates/spicetify.css
new file mode 100644
index 0000000..5bce782
--- /dev/null
+++ b/home-manager/matugen/templates/spicetify.css
@@ -0,0 +1,18 @@
+:root {
+ --spice-text: #{{colors.on_surface.default.hex_stripped}};
+ --spice-subtext: #{{colors.on_surface_variant.default.hex_stripped}};
+ --spice-nav-active-text: #{{colors.primary.default.hex_stripped}};
+ --spice-main: #{{colors.surface.default.hex_stripped}};
+ --spice-sidebar: #{{colors.surface_container_low.default.hex_stripped}};
+ --spice-player: #{{colors.surface_container.default.hex_stripped}};
+ --spice-card: #{{colors.surface_container_high.default.hex_stripped}};
+ --spice-shadow: #{{colors.shadow.default.hex_stripped}};
+ --spice-selected-row: #{{colors.surface_variant.default.hex_stripped}};
+ --spice-button: #{{colors.primary.default.hex_stripped}};
+ --spice-button-active: #{{colors.primary_container.default.hex_stripped}};
+ --spice-button-disabled: #{{colors.outline.default.hex_stripped}};
+ --spice-tab-active: #{{colors.primary.default.hex_stripped}};
+ --spice-notification: #{{colors.inverse_surface.default.hex_stripped}};
+ --spice-notification-error: #{{colors.error.default.hex_stripped}};
+ --spice-misc: #{{colors.outline.default.hex_stripped}};
+}
diff --git a/home-manager/matugen/templates/spicetify.ini b/home-manager/matugen/templates/spicetify.ini
new file mode 100644
index 0000000..30effec
--- /dev/null
+++ b/home-manager/matugen/templates/spicetify.ini
@@ -0,0 +1,17 @@
+[Matugen]
+text = {{colors.on_surface.hex_stripped}}
+subtext = {{colors.on_surface_variant.hex_stripped}}
+nav-active-text = {{colors.primary.hex_stripped}}
+main = {{colors.surface.hex_stripped}}
+sidebar = {{colors.surface_container_low.hex_stripped}}
+player = {{colors.surface_container.hex_stripped}}
+card = {{colors.surface_container_high.hex_stripped}}
+shadow = {{colors.shadow.hex_stripped}}
+selected-row = {{colors.surface_variant.hex_stripped}}
+button = {{colors.primary.hex_stripped}}
+button-active = {{colors.primary_container.hex_stripped}}
+button-disabled = {{colors.outline.hex_stripped}}
+tab-active = {{colors.primary.hex_stripped}}
+notification = {{colors.inverse_surface.hex_stripped}}
+notification-error = {{colors.error.hex_stripped}}
+misc = {{colors.outline.hex_stripped}}
diff --git a/home-manager/matugen/templates/vesktop.css b/home-manager/matugen/templates/vesktop.css
new file mode 100644
index 0000000..5e91198
--- /dev/null
+++ b/home-manager/matugen/templates/vesktop.css
@@ -0,0 +1,67 @@
+/**
+ * @name Matugen Midnight
+ * @description Dynamic Material You theme based on Midnight
+ * @author Matugen
+ * @version 1.0.0
+ */
+
+@import url('https://refact0r.github.io/midnight-discord/build/midnight.css');
+
+body {
+ --font: 'figtree';
+ --gap: 12px;
+ --divider-thickness: 4px;
+ --border-thickness: 1px; /* Restored the 1px border */
+ --animations: on;
+ --top-bar-height: var(--gap);
+ --top-bar-button-position: titlebar;
+ --custom-window-controls: on;
+ --custom-dms-icon: custom;
+ --dms-icon-svg-url: url('https://refact0r.github.io/midnight-discord/assets/Font_Awesome_5_solid_moon.svg');
+ --background-image: off;
+ --transparency-tweaks: off;
+ --small-user-panel: on;
+}
+
+:root {
+ --colors: on;
+
+ /* Original Backgrounds */
+ --bg-4: {{colors.background.default.hex}} !important;
+ --bg-3: {{colors.surface.default.hex}} !important;
+ --bg-2: {{colors.surface_container_low.default.hex}} !important;
+ --bg-1: {{colors.surface_container.default.hex}} !important;
+
+ /* Original Text */
+ --text-0: {{colors.background.default.hex}} !important;
+ --text-1: {{colors.on_background.default.hex}} !important;
+ --text-2: {{colors.on_surface.default.hex}} !important;
+ --text-3: {{colors.on_surface_variant.default.hex}} !important;
+ --text-4: {{colors.on_surface_variant.default.hex}} !important;
+ --text-5: {{colors.outline.default.hex}} !important;
+
+ /* Original Accents */
+ --accent-1: {{colors.primary.default.hex}} !important;
+ --accent-2: {{colors.primary.default.hex}} !important;
+ --accent-3: {{colors.primary_container.default.hex}} !important;
+ --accent-4: {{colors.on_primary_container.default.hex}} !important;
+ --accent-5: {{colors.tertiary.default.hex}} !important;
+ --accent-new: {{colors.tertiary.default.hex}} !important;
+
+ /* Interactive States & Low Contrast Borders */
+ --hover: {{colors.surface_container_high.default.hex}} !important;
+ --active: {{colors.surface_container_highest.default.hex}} !important;
+
+ /* Using subtle surface variables here reduces the harsh contrast */
+ --border-light: {{colors.surface_container_highest.default.hex}} !important;
+ --border: {{colors.surface_variant.default.hex}} !important;
+ --border-hover: {{colors.outline_variant.default.hex}} !important;
+ --button-border: {{colors.surface_container_highest.default.hex}} !important;
+
+ /* Base Palette Overrides */
+ --blue-1: {{colors.primary.default.hex}} !important;
+ --blue-2: {{colors.primary.default.hex}} !important;
+ --blue-3: {{colors.primary_container.default.hex}} !important;
+ --blue-4: {{colors.on_primary_container.default.hex}} !important;
+ --blue-5: {{colors.tertiary.default.hex}} !important;
+}
diff --git a/home-manager/modules/bash.nix b/home-manager/modules/bash.nix
new file mode 100644
index 0000000..2ddb260
--- /dev/null
+++ b/home-manager/modules/bash.nix
@@ -0,0 +1,3 @@
+{ ... }: {
+ home.file.".bashrc".source = ../bashrc;
+}
diff --git a/home-manager/modules/foot.nix b/home-manager/modules/foot.nix
new file mode 100644
index 0000000..90c04a6
--- /dev/null
+++ b/home-manager/modules/foot.nix
@@ -0,0 +1,3 @@
+{ ... }: {
+ xdg.configFile."foot/foot.ini".source = ../foot/foot.ini;
+}
diff --git a/home-manager/modules/matugen.nix b/home-manager/modules/matugen.nix
new file mode 100644
index 0000000..db22f9c
--- /dev/null
+++ b/home-manager/modules/matugen.nix
@@ -0,0 +1,11 @@
+{ ... }: {
+ xdg.configFile."matugen" = {
+ source = ../matugen;
+ recursive = true;
+ };
+
+ home.file."scripts/matugen-sync.sh" = {
+ source = ../scripts/matugen-sync.sh;
+ executable = true;
+ };
+}
diff --git a/home-manager/scripts/matugen-sync.sh b/home-manager/scripts/matugen-sync.sh
new file mode 100755
index 0000000..5ae80e3
--- /dev/null
+++ b/home-manager/scripts/matugen-sync.sh
@@ -0,0 +1,27 @@
+#!/usr/bin/env bash
+
+# We watch the state file that contains the actual text path of the wallpaper
+STATE_DIR="$HOME/.cache/serpantinum/wallpaper/"
+STATE_FILE="current_DP-2"
+
+inotifywait -m -e close_write "$STATE_DIR" |
+while read -r directory events filename; do
+ if [ "$filename" = "$STATE_FILE" ]; then
+
+ # Give Serpantinum a split second to finish its operations
+ sleep 0.5
+
+ # Read the real path of the image from the text file
+ WP_PATH=$(cat "$STATE_DIR$STATE_FILE")
+
+ # 1. Run Matugen against the ORIGINAL valid image file
+ matugen image "$WP_PATH"
+
+ # 2. Reload Hyprland
+ hyprctl reload
+
+ # 3. Reload running Foot terminals
+ pkill -HUP foot
+
+ fi
+done