1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

disable matugen env var support, also dont reload ghostty if not

configured with dms theme
This commit is contained in:
bbedward
2025-09-24 17:09:15 -04:00
parent 3f8d8ca379
commit 9be7d44765
3 changed files with 12 additions and 12 deletions

View File

@@ -14,6 +14,8 @@ import "StockThemes.js" as StockThemes
Singleton { Singleton {
id: root id: root
readonly property bool envDisableMatugen: Quickshell.env("DMS_DISABLE_MATUGEN") === "1" || Quickshell.env("DMS_DISABLE_MATUGEN") === "true"
property string currentTheme: "blue" property string currentTheme: "blue"
property string currentThemeCategory: "generic" property string currentThemeCategory: "generic"
property bool isLightMode: false property bool isLightMode: false
@@ -263,9 +265,6 @@ Singleton {
function forceGenerateSystemThemes() { function forceGenerateSystemThemes() {
screenTransition() screenTransition()
if (!matugenAvailable) { if (!matugenAvailable) {
if (typeof ToastService !== "undefined") {
ToastService.showWarning("matugen not available - cannot generate system themes")
}
return return
} }
generateSystemThemesFromCurrentTheme() generateSystemThemesFromCurrentTheme()
@@ -509,7 +508,7 @@ Singleton {
function setDesiredTheme(kind, value, isLight, iconTheme, matugenType) { function setDesiredTheme(kind, value, isLight, iconTheme, matugenType) {
if (!matugenAvailable) { if (!matugenAvailable) {
console.warn("matugen not available - cannot set system theme") console.warn("matugen not available or disabled - cannot set system theme")
return return
} }
@@ -584,7 +583,7 @@ Singleton {
function applyGtkColors() { function applyGtkColors() {
if (!matugenAvailable) { if (!matugenAvailable) {
if (typeof ToastService !== "undefined") { if (typeof ToastService !== "undefined") {
ToastService.showError("matugen not available - cannot apply GTK colors") ToastService.showError("matugen not available or disabled - cannot apply GTK colors")
} }
return return
} }
@@ -597,7 +596,7 @@ Singleton {
function applyQtColors() { function applyQtColors() {
if (!matugenAvailable) { if (!matugenAvailable) {
if (typeof ToastService !== "undefined") { if (typeof ToastService !== "undefined") {
ToastService.showError("matugen not available - cannot apply Qt colors") ToastService.showError("matugen not available or disabled - cannot apply Qt colors")
} }
return return
} }
@@ -666,12 +665,9 @@ Singleton {
id: matugenCheck id: matugenCheck
command: ["which", "matugen"] command: ["which", "matugen"]
onExited: code => { onExited: code => {
matugenAvailable = (code === 0) matugenAvailable = (code === 0) && !envDisableMatugen
if (!matugenAvailable) { if (!matugenAvailable) {
if (typeof ToastService !== "undefined") { console.log("matugen not not available in path or disabled via DMS_DISABLE_MATUGEN")
ToastService.wallpaperErrorStatus = "matugen_missing"
ToastService.showWarning("matugen not found - dynamic theming disabled")
}
return return
} }
if (extractionRequested) { if (extractionRequested) {

View File

@@ -413,6 +413,8 @@ dms ipc call mpris next
## Theming ## Theming
dms will spawn a matugen process on theme changes to generate color palettes for installed and supported apps. If you do not want these files generated, you can set the env variable `DMS_DISABLE_MATUGEN=1` to disable it entirely.
### Custom Themes ### Custom Themes
DankMaterialShell supports custom color themes! You can create your own Material Design 3 color schemes or use pre-made themes like Cyberpunk Electric, Hotline Miami, and Miami Vice. DankMaterialShell supports custom color themes! You can create your own Material Design 3 color schemes or use pre-made themes like Cyberpunk Electric, Hotline Miami, and Miami Vice.

View File

@@ -181,7 +181,9 @@ build_once() {
printf "%s\n\n" "$OUT" > "$TMP" printf "%s\n\n" "$OUT" > "$TMP"
cat "$CONFIG_DIR/ghostty/config-dankcolors" >> "$TMP" cat "$CONFIG_DIR/ghostty/config-dankcolors" >> "$TMP"
mv "$TMP" "$CONFIG_DIR/ghostty/config-dankcolors" mv "$TMP" "$CONFIG_DIR/ghostty/config-dankcolors"
pkill -USR2 -x ghostty >/dev/null 2>&1 || true if [[ -f "$CONFIG_DIR/ghostty/config" ]] && grep -q "^[^#]*config-dankcolors" "$CONFIG_DIR/ghostty/config" 2>/dev/null; then
pkill -USR2 -x ghostty >/dev/null 2>&1 || true
fi
fi fi
fi fi