fix: theme application hängt nicht auf frischer VM (alle Display-D-Bus-Aufrufe guarded)
Vier Änderungen: 1. Duplikat in apply_wallpaper entfernt (überlappende Edits hinterließen einen zweiten hyprctl-Block außerhalb des pgrep-Guards) 2. gsettings in write_gtk_settings hinter pgrep -x Hyprland guard (gsettings set → D-Bus → könnte swaync auto-starten → hängt) 3. kwriteconfig6 in write_kde_color_scheme hinter pgrep -x Hyprland (kwriteconfig6 schreibt nicht nur Config, macht auch D-Bus-Calls) 4. apply_theme() blockt jetzt komplett: ALLE Display-Aufrufe (hyprctl, swaync-client, waybar, notify, awww, swww, gsettings, kwriteconfig6) werden nur ausgeführt wenn Hyprland läuft. Ohne Hyprland: nur Config-Files schreiben (load_theme, write_app_styles, write_desktop_app_theme, write_hyprlock_theme, write_starship_theme, write_sddm_theme_assets, apply_wallpaper-schreibt-nur). Kein einziger D-Bus-Call fällt mehr an.
This commit is contained in:
@@ -199,7 +199,7 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
|
|
||||||
if command -v gsettings >/dev/null 2>&1; then
|
if command -v gsettings >/dev/null 2>&1 && pgrep -x Hyprland >/dev/null 2>&1; then
|
||||||
gsettings set org.gnome.desktop.interface color-scheme "$APP_THEME_MODE" >/dev/null 2>&1 || true
|
gsettings set org.gnome.desktop.interface color-scheme "$APP_THEME_MODE" >/dev/null 2>&1 || true
|
||||||
gsettings set org.gnome.desktop.interface accent-color "$GNOME_ACCENT_COLOR" >/dev/null 2>&1 || true
|
gsettings set org.gnome.desktop.interface accent-color "$GNOME_ACCENT_COLOR" >/dev/null 2>&1 || true
|
||||||
gsettings set org.gnome.desktop.interface gtk-theme "$GTK_THEME_NAME" >/dev/null 2>&1 || true
|
gsettings set org.gnome.desktop.interface gtk-theme "$GTK_THEME_NAME" >/dev/null 2>&1 || true
|
||||||
@@ -458,7 +458,7 @@ inactiveBackground=$panel_rgb
|
|||||||
inactiveForeground=$muted_rgb
|
inactiveForeground=$muted_rgb
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if command -v kwriteconfig6 >/dev/null 2>&1; then
|
if command -v kwriteconfig6 >/dev/null 2>&1 && pgrep -x Hyprland >/dev/null 2>&1; then
|
||||||
kwriteconfig6 --file kdeglobals --group General --key ColorScheme "$KDE_COLOR_SCHEME" >/dev/null 2>&1 || true
|
kwriteconfig6 --file kdeglobals --group General --key ColorScheme "$KDE_COLOR_SCHEME" >/dev/null 2>&1 || true
|
||||||
kwriteconfig6 --file kdeglobals --group General --key Name "$NAME" >/dev/null 2>&1 || true
|
kwriteconfig6 --file kdeglobals --group General --key Name "$NAME" >/dev/null 2>&1 || true
|
||||||
kwriteconfig6 --file kdeglobals --group Icons --key Theme "$ICON_THEME_NAME" >/dev/null 2>&1 || true
|
kwriteconfig6 --file kdeglobals --group Icons --key Theme "$ICON_THEME_NAME" >/dev/null 2>&1 || true
|
||||||
@@ -1076,6 +1076,7 @@ EOF
|
|||||||
|
|
||||||
printf '%s\n' "$WALLPAPER" >"$CURRENT_WALLPAPER"
|
printf '%s\n' "$WALLPAPER" >"$CURRENT_WALLPAPER"
|
||||||
|
|
||||||
|
if pgrep -x Hyprland >/dev/null 2>&1; then
|
||||||
if command -v awww >/dev/null 2>&1; then
|
if command -v awww >/dev/null 2>&1; then
|
||||||
if ! pgrep -x awww-daemon >/dev/null 2>&1; then
|
if ! pgrep -x awww-daemon >/dev/null 2>&1; then
|
||||||
start_detached awww-daemon
|
start_detached awww-daemon
|
||||||
@@ -1104,7 +1105,7 @@ EOF
|
|||||||
return
|
return
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v hyprctl >/dev/null 2>&1 && pgrep -x Hyprland >/dev/null 2>&1; then
|
if command -v hyprctl >/dev/null 2>&1; then
|
||||||
if ! pgrep -x hyprpaper >/dev/null 2>&1; then
|
if ! pgrep -x hyprpaper >/dev/null 2>&1; then
|
||||||
start_detached hyprpaper
|
start_detached hyprpaper
|
||||||
sleep 0.2
|
sleep 0.2
|
||||||
@@ -1113,6 +1114,8 @@ EOF
|
|||||||
hyprctl hyprpaper preload "$WALLPAPER" >/dev/null || true
|
hyprctl hyprpaper preload "$WALLPAPER" >/dev/null || true
|
||||||
hyprctl hyprpaper wallpaper ",$WALLPAPER" >/dev/null || true
|
hyprctl hyprpaper wallpaper ",$WALLPAPER" >/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply_theme() {
|
apply_theme() {
|
||||||
@@ -1139,11 +1142,12 @@ EOF
|
|||||||
hyprctl keyword general:col.inactive_border "$INACTIVE_BORDER" >/dev/null || true
|
hyprctl keyword general:col.inactive_border "$INACTIVE_BORDER" >/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if pgrep -x Hyprland >/dev/null 2>&1; then
|
||||||
if command -v swaync-client >/dev/null 2>&1; then
|
if command -v swaync-client >/dev/null 2>&1; then
|
||||||
swaync-client -rs >/dev/null 2>&1 || true
|
swaync-client -rs >/dev/null 2>&1 || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if command -v waybar >/dev/null 2>&1 && pgrep -x Hyprland >/dev/null 2>&1; then
|
if command -v waybar >/dev/null 2>&1; then
|
||||||
restart_waybar
|
restart_waybar
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -1152,6 +1156,7 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
notify "$NAME aktiviert."
|
notify "$NAME aktiviert."
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ "${1:-}" == "--apply" ]]; then
|
if [[ "${1:-}" == "--apply" ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user