Matugen: implementing proper terminal colors via iTerm2 color schemes. WIP

This commit is contained in:
ItsLemmy
2025-10-02 20:50:01 -04:00
parent b525a53c8b
commit b7af94e460
30 changed files with 429 additions and 175 deletions
@@ -0,0 +1,22 @@
color0 #11151c
color1 #ea6c73
color2 #7fd962
color3 #f9af4f
color4 #53bdfa
color5 #cda1fa
color6 #90e1c6
color7 #c7c7c7
color8 #686868
color9 #f07178
color10 #aad94c
color11 #ffb454
color12 #59c2ff
color13 #d2a6ff
color14 #95e6cb
color15 #ffffff
background #0b0e14
selection_foreground #0b0e14
cursor #e6b450
cursor_text_color #0b0e14
foreground #bfbdb6
selection_background #bfbdb6
@@ -0,0 +1,22 @@
color0 #000000
color1 #ea6c6d
color2 #6cbf43
color3 #eca944
color4 #3199e1
color5 #9e75c7
color6 #46ba94
color7 #bababa
color8 #686868
color9 #f07171
color10 #86b300
color11 #f2ae49
color12 #399ee6
color13 #a37acc
color14 #4cbf99
color15 #d1d1d1
background #f8f9fa
selection_foreground #f8f9fa
cursor #ffaa33
cursor_text_color #f8f9fa
foreground #5c6166
selection_background #5c6166
@@ -0,0 +1,22 @@
color0 #3b4252
color1 #bf616a
color2 #a3be8c
color3 #ebcb8b
color4 #81a1c1
color5 #b48ead
color6 #88c0d0
color7 #e5e9f0
color8 #596377
color9 #bf616a
color10 #a3be8c
color11 #ebcb8b
color12 #81a1c1
color13 #b48ead
color14 #8fbcbb
color15 #eceff4
background #2e3440
selection_foreground #2e3440
cursor #eceff4
cursor_text_color #282828
foreground #d8dee9
selection_background #d8dee9
@@ -0,0 +1,22 @@
color0 #3b4252
color1 #bf616a
color2 #96b17f
color3 #c5a565
color4 #81a1c1
color5 #b48ead
color6 #7bb3c3
color7 #a5abb6
color8 #4c566a
color9 #bf616a
color10 #96b17f
color11 #c5a565
color12 #81a1c1
color13 #b48ead
color14 #82afae
color15 #eceff4
background #e5e9f0
selection_foreground #e5e9f0
cursor #7bb3c3
cursor_text_color #3b4252
foreground #414858
selection_background #414858
@@ -0,0 +1,22 @@
color0 #26233a
color1 #eb6f92
color2 #31748f
color3 #f6c177
color4 #9ccfd8
color5 #c4a7e7
color6 #ebbcba
color7 #e0def4
color8 #6e6a86
color9 #eb6f92
color10 #31748f
color11 #f6c177
color12 #9ccfd8
color13 #c4a7e7
color14 #ebbcba
color15 #e0def4
background #191724
selection_foreground #191724
cursor #e0def4
cursor_text_color #191724
foreground #e0def4
selection_background #e0def4
@@ -0,0 +1,22 @@
color0 #f2e9e1
color1 #b4637a
color2 #286983
color3 #ea9d34
color4 #56949f
color5 #907aa9
color6 #d7827e
color7 #575279
color8 #9893a5
color9 #b4637a
color10 #286983
color11 #ea9d34
color12 #56949f
color13 #907aa9
color14 #d7827e
color15 #575279
background #faf4ed
selection_foreground #faf4ed
cursor #575279
cursor_text_color #faf4ed
foreground #575279
selection_background #575279
-85
View File
@@ -1,85 +0,0 @@
pragma Singleton
import QtQuick
import Quickshell
import qs.Commons
// Central place to define which templates we generate and where they write.
// Users can extend it by dropping additional templates into:
// - Assets/Matugen/templates/
// - ~/.config/matugen/ (when enableUserTemplates is true)
Singleton {
id: root
// Build the base TOML using current settings
function buildConfigToml() {
var lines = []
lines.push("[config]")
if (Settings.data.colorSchemes.useWallpaperColors) {
// Only generate color for Noctalia if the colors are wallpaper based
// or this will conflict with our predefined colors
lines.push("[templates.noctalia]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/noctalia.json"')
lines.push('output_path = "' + Settings.configDir + 'colors.json"')
}
if (Settings.data.matugen.gtk) {
lines.push("\n[templates.gtk3]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/gtk.css"')
lines.push('output_path = "~/.config/gtk-3.0/gtk.css"')
lines.push("\n[templates.gtk4]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/gtk.css"')
lines.push('output_path = "~/.config/gtk-4.0/gtk.css"')
}
if (Settings.data.matugen.qt) {
lines.push("\n[templates.qt5]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/qtct.conf"')
lines.push('output_path = "~/.config/qt5ct/colors/noctalia.conf"')
lines.push("\n[templates.qt6]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/qtct.conf"')
lines.push('output_path = "~/.config/qt6ct/colors/noctalia.conf"')
}
if (Settings.data.matugen.kitty) {
lines.push("\n[templates.kitty]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/kitty.conf"')
lines.push('output_path = "~/.config/kitty/themes/noctalia.conf"')
lines.push("post_hook = 'kitty +kitten themes --reload-in=all noctalia'")
}
if (Settings.data.matugen.ghostty) {
lines.push("\n[templates.ghostty]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/ghostty.conf"')
lines.push('output_path = "~/.config/ghostty/themes/noctalia"')
lines.push("post_hook = \"grep -q '^theme *= *' ~/.config/ghostty/config; and sed -i 's/^theme *= *.*/theme = noctalia/' ~/.config/ghostty/config; or echo 'theme = noctalia' >> ~/.config/ghostty/config; and pkill -SIGUSR2 ghostty\"")
}
if (Settings.data.matugen.foot) {
lines.push("\n[templates.foot]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/foot.conf"')
lines.push('output_path = "~/.config/foot/themes/noctalia"')
lines.push('post_hook = "sed -i /themes/d ~/.config/foot/foot.ini && echo include=~/.config/foot/themes/noctalia >> ~/.config/foot/foot.ini"')
}
if (Settings.data.matugen.fuzzel) {
lines.push("\n[templates.fuzzel]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/fuzzel.conf"')
lines.push('output_path = "~/.config/fuzzel/themes/noctalia"')
lines.push('post_hook = "sed -i /themes/d ~/.config/fuzzel/fuzzel.ini && echo include=~/.config/fuzzel/themes/noctalia >> ~/.config/fuzzel/fuzzel.ini"')
}
if (Settings.data.matugen.vesktop) {
lines.push("\n[templates.vesktop]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/vesktop.css"')
lines.push('output_path = "~/.config/vesktop/themes/noctalia.theme.css"')
}
if (Settings.data.matugen.pywalfox) {
lines.push("\n[templates.pywalfox]")
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/pywalfox.json"')
lines.push('output_path = "~/.cache/wal/colors.json"')
lines.push('post_hook = "pywalfox update"')
}
return lines.join("\n") + "\n"
}
}
+5 -5
View File
@@ -511,11 +511,7 @@
"description": "Generiert Matugen-Templates (GTK, Terminal-Themes, etc.) bei der Verwendung vordefinierter Farbschemata."
}
},
"matugen": {
"section": {
"label": "Matugen-Vorlagen",
"description": "Farben auf externe Anwendungen anwenden."
},
"templates": {
"ui": {
"label": "UI",
"description": "Desktop-Umgebung und UI-Toolkit-Theming.",
@@ -565,6 +561,10 @@
"label": "Benutzer-Vorlagen",
"description": "Benutzerdefinierte Matugen-Konfiguration aus ~/.config/matugen/config.toml aktivieren"
}
},
"section": {
"description": "Farben auf externe Anwendungen anwenden.",
"label": "Vorlagen"
}
}
},
+2 -2
View File
@@ -509,9 +509,9 @@
"description": "Generate Matugen templates (GTK, terminal themes, etc.) when using predefined color schemes."
}
},
"matugen": {
"templates": {
"section": {
"label": "Matugen templates",
"label": "Templates",
"description": "Apply colors to external applications."
},
"ui": {
+5 -5
View File
@@ -507,11 +507,7 @@
"description": "Genera plantillas de Matugen (GTK, temas de terminal, etc.) al usar esquemas de colores predefinidos."
}
},
"matugen": {
"section": {
"label": "Plantillas de Matugen",
"description": "Aplica colores a aplicaciones externas."
},
"templates": {
"ui": {
"label": "UI",
"description": "Tematización del entorno de escritorio y de la interfaz de usuario.",
@@ -561,6 +557,10 @@
"label": "Plantillas de usuario",
"description": "Habilitar configuración de Matugen definida por el usuario desde ~/.config/matugen/config.toml"
}
},
"section": {
"description": "Aplicar colores a aplicaciones externas.",
"label": "Plantillas"
}
}
},
+5 -5
View File
@@ -507,11 +507,7 @@
"description": "Génère des modèles Matugen (GTK, thèmes de terminal, etc.) lors de l'utilisation de schémas de couleurs prédéfinis."
}
},
"matugen": {
"section": {
"label": "Modèles Matugen",
"description": "Appliquez des couleurs aux applications externes."
},
"templates": {
"ui": {
"label": "UI",
"description": "Thématisation de l'environnement de bureau et de la boîte à outils d'interface utilisateur.",
@@ -561,6 +557,10 @@
"label": "Modèles utilisateur",
"description": "Activer la configuration Matugen définie par l'utilisateur depuis ~/.config/matugen/config.toml"
}
},
"section": {
"description": "Appliquer des couleurs aux applications externes.",
"label": "Modèles"
}
}
},
+5 -5
View File
@@ -473,11 +473,7 @@
"description": "Gera modelos Matugen (GTK, temas de terminal, etc.) ao usar esquemas de cores predefinidos."
}
},
"matugen": {
"section": {
"label": "Modelos Matugen",
"description": "Aplique cores a aplicativos externos."
},
"templates": {
"ui": {
"label": "UI",
"description": "Tematização do ambiente de desktop e kit de ferramentas de UI.",
@@ -527,6 +523,10 @@
"label": "Modelos do usuário",
"description": "Ativa a configuração do Matugen definida pelo usuário em ~/.config/matugen/config.toml"
}
},
"section": {
"description": "Aplicar cores a aplicações externas.",
"label": "Modelos"
}
}
},
+5 -5
View File
@@ -507,11 +507,7 @@
"description": "使用预定义配色方案时生成 Matugen 模板(GTK、终端主题等)。"
}
},
"matugen": {
"section": {
"label": "Matugen 模板",
"description": "将颜色应用于外部应用程序。"
},
"templates": {
"ui": {
"label": "用户界面",
"description": "桌面环境和 UI 工具包主题。",
@@ -561,6 +557,10 @@
"label": "用户模板",
"description": "启用来自 ~/.config/matugen/config.toml 的用户定义 Matugen 配置"
}
},
"section": {
"description": "将颜色应用于外部应用程序。",
"label": "模板"
}
}
},