forked from Shinonome/dots-hyprland
switchwall: less duplicate config file declaration
This commit is contained in:
@@ -14,9 +14,8 @@ 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
|
# Check if Qt app theming is enabled in config
|
||||||
CONFIG_FILE="$XDG_CONFIG_HOME/illogical-impulse/config.json"
|
if [ -f "$SHELL_CONFIG_FILE" ]; then
|
||||||
if [ -f "$CONFIG_FILE" ]; then
|
enable_qt_apps=$(jq -r '.appearance.wallpaperTheming.enableQtApps' "$SHELL_CONFIG_FILE")
|
||||||
enable_qt_apps=$(jq -r '.appearance.wallpaperTheming.enableQtApps' "$CONFIG_FILE")
|
|
||||||
if [ "$enable_qt_apps" == "false" ]; then
|
if [ "$enable_qt_apps" == "false" ]; then
|
||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
@@ -254,9 +253,8 @@ switch() {
|
|||||||
pre_process "$mode_flag"
|
pre_process "$mode_flag"
|
||||||
|
|
||||||
# Check if app and shell theming is enabled in config
|
# Check if app and shell theming is enabled in config
|
||||||
CONFIG_FILE="$XDG_CONFIG_HOME/illogical-impulse/config.json"
|
if [ -f "$SHELL_CONFIG_FILE" ]; then
|
||||||
if [ -f "$CONFIG_FILE" ]; then
|
enable_apps_shell=$(jq -r '.appearance.wallpaperTheming.enableAppsAndShell' "$SHELL_CONFIG_FILE")
|
||||||
enable_apps_shell=$(jq -r '.appearance.wallpaperTheming.enableAppsAndShell' "$CONFIG_FILE")
|
|
||||||
if [ "$enable_apps_shell" == "false" ]; then
|
if [ "$enable_apps_shell" == "false" ]; then
|
||||||
echo "App and shell theming disabled, skipping matugen and color generation"
|
echo "App and shell theming disabled, skipping matugen and color generation"
|
||||||
return
|
return
|
||||||
@@ -285,7 +283,7 @@ main() {
|
|||||||
noswitch_flag=""
|
noswitch_flag=""
|
||||||
|
|
||||||
get_type_from_config() {
|
get_type_from_config() {
|
||||||
jq -r '.appearance.palette.type' "$XDG_CONFIG_HOME/illogical-impulse/config.json" 2>/dev/null || echo "auto"
|
jq -r '.appearance.palette.type' "$SHELL_CONFIG_FILE" 2>/dev/null || echo "auto"
|
||||||
}
|
}
|
||||||
|
|
||||||
detect_scheme_type_from_image() {
|
detect_scheme_type_from_image() {
|
||||||
|
|||||||
Reference in New Issue
Block a user