mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2025-12-06 06:36:15 +00:00
Matugen: Combined GTK3&4 in a single GTK setting
This commit is contained in:
@@ -24,26 +24,26 @@ Singleton {
|
||||
lines.push('output_path = "' + Settings.configDir + 'colors.json"')
|
||||
}
|
||||
|
||||
if (Settings.data.matugen.gtk4) {
|
||||
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/gtk4.css"')
|
||||
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.gtk3) {
|
||||
lines.push("\n[templates.gtk3]")
|
||||
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/gtk3.css"')
|
||||
lines.push('output_path = "~/.config/gtk-3.0/gtk.css"')
|
||||
}
|
||||
if (Settings.data.matugen.qt6) {
|
||||
|
||||
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.qt5) {
|
||||
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"')
|
||||
}
|
||||
|
||||
if (Settings.data.matugen.kitty) {
|
||||
lines.push("\n[templates.kitty]")
|
||||
lines.push('input_path = "' + Quickshell.shellDir + '/Assets/Matugen/templates/kitty.conf"')
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* GTK Colors
|
||||
* Generated with Matugen
|
||||
*/
|
||||
|
||||
@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.default.hex}};
|
||||
@define-color headerbar_fg_color {{colors.on_surface.default.hex}};
|
||||
@define-color popover_bg_color {{colors.surface_variant.default.hex}};
|
||||
@define-color popover_fg_color {{colors.on_surface_variant.default.hex}};
|
||||
@define-color view_bg_color {{colors.surface.default.hex}};
|
||||
@define-color view_fg_color {{colors.on_surface.default.hex}};
|
||||
@define-color card_bg_color {{colors.surface.default.hex}};
|
||||
@define-color card_fg_color {{colors.on_surface.default.hex}};
|
||||
|
||||
@define-color sidebar_bg_color {{colors.surface_container.default.hex}};
|
||||
@define-color sidebar_fg_color {{colors.on_surface.default.hex}};
|
||||
@define-color sidebar_border_color @window_bg_color;
|
||||
@define-color sidebar_backdrop_color @window_bg_color;
|
||||
@@ -519,16 +519,10 @@
|
||||
"ui": {
|
||||
"label": "UI",
|
||||
"description": "Desktop-Umgebung und UI-Toolkit-Theming.",
|
||||
"gtk4": {
|
||||
"gtk": {
|
||||
"description": "Schreibt {filepath}"
|
||||
},
|
||||
"gtk3": {
|
||||
"description": "Schreibt {filepath}"
|
||||
},
|
||||
"qt6": {
|
||||
"description": "Schreibt {filepath}"
|
||||
},
|
||||
"qt5": {
|
||||
"qt": {
|
||||
"description": "Schreibt {filepath}"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -517,16 +517,10 @@
|
||||
"ui": {
|
||||
"label": "UI",
|
||||
"description": "Desktop environment and UI toolkit theming.",
|
||||
"gtk4": {
|
||||
"gtk": {
|
||||
"description": "Write {filepath}"
|
||||
},
|
||||
"gtk3": {
|
||||
"description": "Write {filepath}"
|
||||
},
|
||||
"qt6": {
|
||||
"description": "Write {filepath}"
|
||||
},
|
||||
"qt5": {
|
||||
"qt": {
|
||||
"description": "Write {filepath}"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -515,16 +515,10 @@
|
||||
"ui": {
|
||||
"label": "UI",
|
||||
"description": "Tematización del entorno de escritorio y de la interfaz de usuario.",
|
||||
"gtk4": {
|
||||
"gtk": {
|
||||
"description": "Escribir {filepath}"
|
||||
},
|
||||
"gtk3": {
|
||||
"description": "Escribir {filepath}"
|
||||
},
|
||||
"qt6": {
|
||||
"description": "Escribir {filepath}"
|
||||
},
|
||||
"qt5": {
|
||||
"qt": {
|
||||
"description": "Escribir {filepath}"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -515,17 +515,11 @@
|
||||
"ui": {
|
||||
"label": "UI",
|
||||
"description": "Thématisation de l'environnement de bureau et de la boîte à outils d'interface utilisateur.",
|
||||
"gtk4": {
|
||||
"description": "Écrire ~/.config/gtk-4.0/gtk.css"
|
||||
"gtk": {
|
||||
"description": "Écrire {filepath}"
|
||||
},
|
||||
"gtk3": {
|
||||
"description": "Écrire ~/.config/gtk-3.0/gtk.css"
|
||||
},
|
||||
"qt6": {
|
||||
"description": "Écrire ~/.config/qt6ct/colors/noctalia.conf"
|
||||
},
|
||||
"qt5": {
|
||||
"description": "Écrire ~/.config/qt5ct/colors/noctalia.conf"
|
||||
"qt": {
|
||||
"description": "Écrire {filepath}"
|
||||
}
|
||||
},
|
||||
"terminal": {
|
||||
|
||||
@@ -481,16 +481,10 @@
|
||||
"ui": {
|
||||
"label": "UI",
|
||||
"description": "Tematização do ambiente de desktop e kit de ferramentas de UI.",
|
||||
"gtk4": {
|
||||
"gtk": {
|
||||
"description": "Escrever {filepath}"
|
||||
},
|
||||
"gtk3": {
|
||||
"description": "Escrever {filepath}"
|
||||
},
|
||||
"qt6": {
|
||||
"description": "Escrever {filepath}"
|
||||
},
|
||||
"qt5": {
|
||||
"qt": {
|
||||
"description": "Escrever {filepath}"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -515,16 +515,10 @@
|
||||
"ui": {
|
||||
"label": "用户界面",
|
||||
"description": "桌面环境和 UI 工具包主题。",
|
||||
"gtk4": {
|
||||
"gtk": {
|
||||
"description": "写入 {filepath}"
|
||||
},
|
||||
"gtk3": {
|
||||
"description": "写入 {filepath}"
|
||||
},
|
||||
"qt6": {
|
||||
"description": "写入 {filepath}"
|
||||
},
|
||||
"qt5": {
|
||||
"qt": {
|
||||
"description": "写入 {filepath}"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -165,10 +165,8 @@
|
||||
"matugenSchemeType": "scheme-fruit-salad"
|
||||
},
|
||||
"matugen": {
|
||||
"gtk4": false,
|
||||
"gtk3": false,
|
||||
"qt6": false,
|
||||
"qt5": false,
|
||||
"gtk": false,
|
||||
"qt": false,
|
||||
"kitty": false,
|
||||
"ghostty": false,
|
||||
"foot": false,
|
||||
|
||||
@@ -316,10 +316,8 @@ Singleton {
|
||||
// matugen templates toggles
|
||||
property JsonObject matugen: JsonObject {
|
||||
// Per-template flags to control dynamic config generation
|
||||
property bool gtk4: false
|
||||
property bool gtk3: false
|
||||
property bool qt6: false
|
||||
property bool qt5: false
|
||||
property bool gtk: false
|
||||
property bool qt: false
|
||||
property bool kitty: false
|
||||
property bool ghostty: false
|
||||
property bool foot: false
|
||||
|
||||
@@ -436,52 +436,26 @@ ColumnLayout {
|
||||
defaultExpanded: false
|
||||
|
||||
NCheckbox {
|
||||
label: "GTK 4 (libadwaita)"
|
||||
description: I18n.tr("settings.color-scheme.matugen.ui.gtk4.description", {
|
||||
"filepath": "~/.config/gtk-4.0/gtk.css"
|
||||
label: "GTK"
|
||||
description: I18n.tr("settings.color-scheme.matugen.ui.gtk.description", {
|
||||
"filepath": "~/.config/gtk-3.0/gtk.css & ~/.config/gtk-4.0/gtk.css"
|
||||
})
|
||||
checked: Settings.data.matugen.gtk4
|
||||
checked: Settings.data.matugen.gtk
|
||||
onToggled: checked => {
|
||||
Settings.data.matugen.gtk4 = checked
|
||||
Settings.data.matugen.gtk = checked
|
||||
if (Settings.data.colorSchemes.useWallpaperColors)
|
||||
MatugenService.generateFromWallpaper()
|
||||
}
|
||||
}
|
||||
|
||||
NCheckbox {
|
||||
label: "GTK 3"
|
||||
description: I18n.tr("settings.color-scheme.matugen.ui.gtk3.description", {
|
||||
"filepath": "~/.config/gtk-3.0/gtk.css"
|
||||
label: "Qt"
|
||||
description: I18n.tr("settings.color-scheme.matugen.ui.qt.description", {
|
||||
"filepath": "~/.config/qt5ct/colors/noctalia.conf & ~/.config/qt6ct/colors/noctalia.conf"
|
||||
})
|
||||
checked: Settings.data.matugen.gtk3
|
||||
checked: Settings.data.matugen.qt
|
||||
onToggled: checked => {
|
||||
Settings.data.matugen.gtk3 = checked
|
||||
if (Settings.data.colorSchemes.useWallpaperColors)
|
||||
MatugenService.generateFromWallpaper()
|
||||
}
|
||||
}
|
||||
|
||||
NCheckbox {
|
||||
label: "Qt6ct"
|
||||
description: I18n.tr("settings.color-scheme.matugen.ui.qt6.description", {
|
||||
"filepath": "~/.config/qt6ct/colors/noctalia.conf"
|
||||
})
|
||||
checked: Settings.data.matugen.qt6
|
||||
onToggled: checked => {
|
||||
Settings.data.matugen.qt6 = checked
|
||||
if (Settings.data.colorSchemes.useWallpaperColors)
|
||||
MatugenService.generateFromWallpaper()
|
||||
}
|
||||
}
|
||||
|
||||
NCheckbox {
|
||||
label: "Qt5ct"
|
||||
description: I18n.tr("settings.color-scheme.matugen.ui.qt5.description", {
|
||||
"filepath": "~/.config/qt5ct/colors/noctalia.conf"
|
||||
})
|
||||
checked: Settings.data.matugen.qt5
|
||||
onToggled: checked => {
|
||||
Settings.data.matugen.qt5 = checked
|
||||
Settings.data.matugen.qt = checked
|
||||
if (Settings.data.colorSchemes.useWallpaperColors)
|
||||
MatugenService.generateFromWallpaper()
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ Singleton {
|
||||
|
||||
// Check if any Matugen templates are enabled
|
||||
function hasEnabledMatugenTemplates() {
|
||||
return Settings.data.matugen.gtk4 || Settings.data.matugen.gtk3 || Settings.data.matugen.qt6 || Settings.data.matugen.qt5 || Settings.data.matugen.kitty || Settings.data.matugen.ghostty || Settings.data.matugen.foot || Settings.data.matugen.fuzzel || Settings.data.matugen.vesktop || Settings.data.matugen.pywalfox
|
||||
return Settings.data.matugen.gtk || Settings.data.matugen.qt || Settings.data.matugen.kitty || Settings.data.matugen.ghostty || Settings.data.matugen.foot || Settings.data.matugen.fuzzel || Settings.data.matugen.vesktop || Settings.data.matugen.pywalfox
|
||||
}
|
||||
|
||||
// Writer to colors.json using a JsonAdapter for safety
|
||||
|
||||
Reference in New Issue
Block a user