diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index 5d427a97..1b9b1dd8 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -66,6 +66,11 @@ Singleton { property bool extraBackgroundTint: true property int fakeScreenRounding: 2 // 0: None | 1: Always | 2: When not fullscreen property bool transparency: false + property JsonObject wallpaperTheming: JsonObject { + property bool enableAppsAndShell: true + property bool enableQtApps: true + property bool enableTerminal: true + } property JsonObject palette: JsonObject { property string type: "auto" // Allowed: auto, scheme-content, scheme-expressive, scheme-fidelity, scheme-fruit-salad, scheme-monochrome, scheme-neutral, scheme-rainbow, scheme-tonal-spot } diff --git a/.config/quickshell/ii/modules/settings/AdvancedConfig.qml b/.config/quickshell/ii/modules/settings/AdvancedConfig.qml new file mode 100644 index 00000000..d0f22d4d --- /dev/null +++ b/.config/quickshell/ii/modules/settings/AdvancedConfig.qml @@ -0,0 +1,46 @@ +import QtQuick +import QtQuick.Controls +import QtQuick.Layouts +import "root:/services/" +import "root:/modules/common/" +import "root:/modules/common/widgets/" + +ContentPage { + forceWidth: true + + ContentSection { + title: "Color generation" + + ConfigRow { + uniform: true + ConfigSwitch { + text: "Shell & utilities" + checked: Config.options.appearance.wallpaperTheming.enableAppsAndShell + onCheckedChanged: { + Config.options.appearance.wallpaperTheming.enableAppsAndShell = checked; + } + } + ConfigSwitch { + text: "Qt apps" + checked: Config.options.appearance.wallpaperTheming.enableQtApps + onCheckedChanged: { + Config.options.appearance.wallpaperTheming.enableQtApps = checked; + } + StyledToolTip { + content: "Shell & utilities theming must also be enabled" + } + } + ConfigSwitch { + text: "Terminal" + checked: Config.options.appearance.wallpaperTheming.enableTerminal + onCheckedChanged: { + Config.options.appearance.wallpaperTheming.enableTerminal = checked; + } + StyledToolTip { + content: "Shell & utilities theming must also be enabled" + } + } + + } + } +} diff --git a/.config/quickshell/ii/scripts/colors/applycolor.sh b/.config/quickshell/ii/scripts/colors/applycolor.sh index b86fb679..ddb93bd2 100755 --- a/.config/quickshell/ii/scripts/colors/applycolor.sh +++ b/.config/quickshell/ii/scripts/colors/applycolor.sh @@ -57,5 +57,16 @@ apply_qt() { python "$CONFIG_DIR/scripts/kvantum/changeAdwColors.py" # apply config colors } -apply_qt & -apply_term & +# Check if terminal theming is enabled in config +CONFIG_FILE="$XDG_CONFIG_HOME/illogical-impulse/config.json" +if [ -f "$CONFIG_FILE" ]; then + enable_terminal=$(jq -r '.appearance.wallpaperTheming.enableTerminal' "$CONFIG_FILE") + if [ "$enable_terminal" = "true" ]; then + apply_term & + fi +else + echo "Config file not found at $CONFIG_FILE. Applying terminal theming by default." + apply_term & +fi + +# apply_qt & # Qt theming is already handled by kde-material-colors diff --git a/.config/quickshell/ii/scripts/colors/switchwall.sh b/.config/quickshell/ii/scripts/colors/switchwall.sh index de76444f..0d9ffadb 100755 --- a/.config/quickshell/ii/scripts/colors/switchwall.sh +++ b/.config/quickshell/ii/scripts/colors/switchwall.sh @@ -12,6 +12,15 @@ MATUGEN_DIR="$XDG_CONFIG_HOME/matugen" terminalscheme="$SCRIPT_DIR/terminal/scheme-base.json" handle_kde_material_you_colors() { + # Check if Qt app theming is enabled in config + CONFIG_FILE="$XDG_CONFIG_HOME/illogical-impulse/config.json" + if [ -f "$CONFIG_FILE" ]; then + enable_qt_apps=$(jq -r '.appearance.wallpaperTheming.enableQtApps' "$CONFIG_FILE") + if [ "$enable_qt_apps" == "false" ]; then + return + fi + fi + # Map $type_flag to allowed scheme variants for kde-material-you-colors-wrapper.sh local kde_scheme_variant="" case "$type_flag" in @@ -46,6 +55,7 @@ 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 @@ -242,6 +252,16 @@ switch() { pre_process "$mode_flag" + # Check if app and shell theming is enabled in config + CONFIG_FILE="$XDG_CONFIG_HOME/illogical-impulse/config.json" + if [ -f "$CONFIG_FILE" ]; then + enable_apps_shell=$(jq -r '.appearance.wallpaperTheming.enableAppsAndShell' "$CONFIG_FILE") + if [ "$enable_apps_shell" == "false" ]; then + echo "App and shell theming disabled, skipping matugen and color generation" + return + fi + fi + matugen "${matugen_args[@]}" source "$(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate" python3 "$SCRIPT_DIR/generate_colors_material.py" "${generate_colors_material_args[@]}" \ diff --git a/.config/quickshell/ii/settings.qml b/.config/quickshell/ii/settings.qml index 0e181e0b..e76f8dcb 100644 --- a/.config/quickshell/ii/settings.qml +++ b/.config/quickshell/ii/settings.qml @@ -42,6 +42,11 @@ ApplicationWindow { icon: "settings", component: "modules/settings/ServicesConfig.qml" }, + { + name: "Advanced", + icon: "construction", + component: "modules/settings/AdvancedConfig.qml" + }, { name: "About", icon: "info",