forked from Shinonome/dots-hyprland
add option to disable theming (#1586)
This commit is contained in:
@@ -66,6 +66,11 @@ Singleton {
|
|||||||
property bool extraBackgroundTint: true
|
property bool extraBackgroundTint: true
|
||||||
property int fakeScreenRounding: 2 // 0: None | 1: Always | 2: When not fullscreen
|
property int fakeScreenRounding: 2 // 0: None | 1: Always | 2: When not fullscreen
|
||||||
property bool transparency: false
|
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 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
|
property string type: "auto" // Allowed: auto, scheme-content, scheme-expressive, scheme-fidelity, scheme-fruit-salad, scheme-monochrome, scheme-neutral, scheme-rainbow, scheme-tonal-spot
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -57,5 +57,16 @@ apply_qt() {
|
|||||||
python "$CONFIG_DIR/scripts/kvantum/changeAdwColors.py" # apply config colors
|
python "$CONFIG_DIR/scripts/kvantum/changeAdwColors.py" # apply config colors
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_qt &
|
# Check if terminal theming is enabled in config
|
||||||
apply_term &
|
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
|
||||||
|
|||||||
@@ -12,6 +12,15 @@ MATUGEN_DIR="$XDG_CONFIG_HOME/matugen"
|
|||||||
terminalscheme="$SCRIPT_DIR/terminal/scheme-base.json"
|
terminalscheme="$SCRIPT_DIR/terminal/scheme-base.json"
|
||||||
|
|
||||||
handle_kde_material_you_colors() {
|
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
|
# Map $type_flag to allowed scheme variants for kde-material-you-colors-wrapper.sh
|
||||||
local kde_scheme_variant=""
|
local kde_scheme_variant=""
|
||||||
case "$type_flag" in
|
case "$type_flag" in
|
||||||
@@ -46,6 +55,7 @@ post_process() {
|
|||||||
local screen_height="$2"
|
local screen_height="$2"
|
||||||
local wallpaper_path="$3"
|
local wallpaper_path="$3"
|
||||||
|
|
||||||
|
|
||||||
handle_kde_material_you_colors &
|
handle_kde_material_you_colors &
|
||||||
|
|
||||||
# Determine the largest region on the wallpaper that's sufficiently un-busy to put widgets in
|
# 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"
|
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[@]}"
|
matugen "${matugen_args[@]}"
|
||||||
source "$(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate"
|
source "$(eval echo $ILLOGICAL_IMPULSE_VIRTUAL_ENV)/bin/activate"
|
||||||
python3 "$SCRIPT_DIR/generate_colors_material.py" "${generate_colors_material_args[@]}" \
|
python3 "$SCRIPT_DIR/generate_colors_material.py" "${generate_colors_material_args[@]}" \
|
||||||
|
|||||||
@@ -42,6 +42,11 @@ ApplicationWindow {
|
|||||||
icon: "settings",
|
icon: "settings",
|
||||||
component: "modules/settings/ServicesConfig.qml"
|
component: "modules/settings/ServicesConfig.qml"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Advanced",
|
||||||
|
icon: "construction",
|
||||||
|
component: "modules/settings/AdvancedConfig.qml"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "About",
|
name: "About",
|
||||||
icon: "info",
|
icon: "info",
|
||||||
|
|||||||
Reference in New Issue
Block a user