1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-24 21:42:51 -05:00

theme repairs:

- gtk3 colloid light/dark fix
- fix missing gtk4 missing variables
- matugen script handle light/dark preference
- fix state of display tab light/dark toggle
This commit is contained in:
bbedward
2025-08-22 10:57:22 -04:00
parent 51b73be68c
commit ae3b77a257
5 changed files with 1047 additions and 8346 deletions

View File

@@ -69,24 +69,47 @@ if [ ! -f "matugen-config.toml" ]; then
exit 1
fi
TEMP_CONFIG="/tmp/matugen-config-$$.toml"
cp "matugen-config.toml" "$TEMP_CONFIG"
if [ "$IS_LIGHT" = "true" ]; then
COLLOID_TEMPLATE="$SHELL_DIR/templates/gtk3-colloid-light.css"
else
COLLOID_TEMPLATE="$SHELL_DIR/templates/gtk3-colloid-dark.css"
fi
sed -i "/\[templates\.gtk3\]/,/^\[/ s|input_path = './templates/gtk-colors.css'|input_path = '$COLLOID_TEMPLATE'|" "$TEMP_CONFIG"
sed -i "s|input_path = './templates/|input_path = '$SHELL_DIR/templates/|g" "$TEMP_CONFIG"
MATUGEN_MODE=""
if [ "$IS_LIGHT" = "true" ]; then
MATUGEN_MODE="-m light"
else
MATUGEN_MODE="-m dark"
fi
if [ "$MODE" = "generate" ]; then
echo "Generating matugen themes from wallpaper: $INPUT_SOURCE"
echo "Using config: $SHELL_DIR/matugen-config.toml"
echo "Using config: $TEMP_CONFIG with template: $COLLOID_TEMPLATE"
if ! matugen -v -c matugen-config.toml image "$INPUT_SOURCE"; then
if ! matugen -v -c "$TEMP_CONFIG" image "$INPUT_SOURCE" $MATUGEN_MODE; then
echo "Failed to generate themes with matugen" >&2
rm -f "$TEMP_CONFIG"
exit 1
fi
elif [ "$MODE" = "generate-color" ]; then
echo "Generating matugen themes from color: $INPUT_SOURCE"
echo "Using config: $SHELL_DIR/matugen-config.toml"
echo "Using config: $TEMP_CONFIG with template: $COLLOID_TEMPLATE"
if ! matugen -v -c matugen-config.toml color hex "$INPUT_SOURCE"; then
if ! matugen -v -c "$TEMP_CONFIG" color hex "$INPUT_SOURCE" $MATUGEN_MODE; then
echo "Failed to generate themes with matugen" >&2
rm -f "$TEMP_CONFIG"
exit 1
fi
fi
rm -f "$TEMP_CONFIG"
echo "Updating system theme preferences..."
color_scheme=""