material palette: apply to kde material you colors

This commit is contained in:
end-4
2025-06-16 22:46:14 +02:00
parent 1cebec39f7
commit 96d17f8fcb
4 changed files with 49 additions and 21 deletions
@@ -56,11 +56,5 @@ apply_qt() {
python "$CONFIG_DIR/scripts/kvantum/changeAdwColors.py" # apply config colors
}
apply_ags() {
pidof agsv1 && agsv1 run-js "handleStyles(false);"
pidof agsv1 && agsv1 run-js 'openColorScheme.value = true; Utils.timeout(2000, () => openColorScheme.value = false);'
}
apply_ags &
apply_qt &
apply_term &
@@ -10,6 +10,20 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
MATUGEN_DIR="$XDG_CONFIG_HOME/matugen"
terminalscheme="$XDG_CONFIG_HOME/quickshell/scripts/terminal/scheme-base.json"
handle_kde_material_you_colors() {
# Map $type_flag to allowed scheme variants for kde-material-you-colors-wrapper.sh
local kde_scheme_variant=""
case "$type_flag" in
scheme-content|scheme-expressive|scheme-fidelity|scheme-fruit-salad|scheme-monochrome|scheme-neutral|scheme-rainbow|scheme-tonal-spot)
kde_scheme_variant="$type_flag"
;;
*)
kde_scheme_variant="scheme-tonal-spot" # default
;;
esac
"$XDG_CONFIG_HOME"/matugen/templates/kde/kde-material-you-colors-wrapper.sh --scheme-variant "$kde_scheme_variant"
}
pre_process() {
local mode_flag="$1"
# Set GNOME color-scheme if mode_flag is dark or light
@@ -31,6 +45,8 @@ post_process() {
local screen_height="$2"
local wallpaper_path="$3"
handle_kde_material_you_colors &
# Determine the largest region on the wallpaper that's sufficiently un-busy to put widgets in
if [ ! -f "$MATUGEN_DIR/scripts/least_busy_region.py" ]; then
echo "Error: least_busy_region.py script not found in $MATUGEN_DIR/scripts/"