aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorDon Williams <don.e.williams@gmail.com>2026-08-07 10:25:03 -0400
committerPinapelz <yukais@pinapelz.com>2026-08-29 21:41:34 -0700
commit0315ec9785a32bc6b4738ac13f0dee387560e739 (patch)
tree0f04b8c47348333d8dde7a9b3aab2fb2bd59653b /config
parent10c7de51688d4c1e22da7e9e7127a0e61d7cf08e (diff)
Fixed waybar startup issues and restart
Trimmed time and add --no-restart option to theme scripts that were causing delays and waybar restarts when not needed Signed-off-by: Don Williams <don.e.williams@gmail.com> On branch development Your branch is up to date with 'origin/development'. Changes to be committed: modified: config/hypr/configs/Startup_Apps.conf modified: config/hypr/scripts/ApplyThemeMode.sh modified: config/hypr/scripts/DarkLight.sh
Diffstat (limited to 'config')
-rw-r--r--config/hypr/configs/Startup_Apps.conf2
-rwxr-xr-xconfig/hypr/scripts/ApplyThemeMode.sh2
-rwxr-xr-xconfig/hypr/scripts/DarkLight.sh45
3 files changed, 31 insertions, 18 deletions
diff --git a/config/hypr/configs/Startup_Apps.conf b/config/hypr/configs/Startup_Apps.conf
index 2516db34..dd078b70 100644
--- a/config/hypr/configs/Startup_Apps.conf
+++ b/config/hypr/configs/Startup_Apps.conf
@@ -13,7 +13,7 @@ $livewallpaper=""
$wallDIR = $HOME/Pictures/wallpapers # change path manually here if needed
### wallpaper stuff ###
-exec-once = sh -c 'sleep 2; $HOME/.config/hypr/scripts/WallpaperDaemon.sh & $HOME/.config/hypr/scripts/ApplyThemeMode.sh & $HOME/.config/hypr/scripts/WaybarStartup.sh'
+exec-once = sh -c 'sleep 2; $HOME/.config/hypr/scripts/WallpaperDaemon.sh & $HOME/.config/hypr/scripts/ApplyThemeMode.sh && $HOME/.config/hypr/scripts/WaybarStartup.sh'
#exec-once = mpvpaper '*' -o "load-scripts=no no-audio --loop" $livewallpaper
# wallpaper random
#exec-once = $SwwwRandom $wallDIR # random wallpaper switcher every 30 minutes
diff --git a/config/hypr/scripts/ApplyThemeMode.sh b/config/hypr/scripts/ApplyThemeMode.sh
index f0b45aaf..f3f9d3fb 100755
--- a/config/hypr/scripts/ApplyThemeMode.sh
+++ b/config/hypr/scripts/ApplyThemeMode.sh
@@ -8,4 +8,4 @@
# Re-apply saved Dark/Light mode on startup without toggling.
SCRIPTSDIR="${XDG_CONFIG_HOME:-$HOME/.config}/hypr/scripts"
-"$SCRIPTSDIR/DarkLight.sh" --apply-current --preserve-wallpaper --no-notify
+"$SCRIPTSDIR/DarkLight.sh" --apply-current --preserve-wallpaper --no-notify --no-restart
diff --git a/config/hypr/scripts/DarkLight.sh b/config/hypr/scripts/DarkLight.sh
index e8e69910..fa62ebc2 100755
--- a/config/hypr/scripts/DarkLight.sh
+++ b/config/hypr/scripts/DarkLight.sh
@@ -40,6 +40,7 @@ apply_saved_mode=0
notify_enabled=1
preserve_wallpaper=0
forced_mode=""
+no_restart=0
ensure_managed_kitty_conf() {
if [[ -f "$user_kitty_conf" && -r "$user_kitty_conf" ]]; then
@@ -92,14 +93,18 @@ while [ $# -gt 0 ]; do
--preserve-wallpaper)
preserve_wallpaper=1
;;
+ --no-restart)
+ no_restart=1
+ ;;
--help)
cat <<'EOF'
-Usage: DarkLight.sh [--apply-current] [--mode Dark|Light] [--no-notify] [--preserve-wallpaper]
+Usage: DarkLight.sh [--apply-current] [--mode Dark|Light] [--no-notify] [--preserve-wallpaper] [--no-restart]
(no args) Toggle between Dark and Light and persist selection
--apply-current Re-apply saved mode (defaults to Dark when unset)
--mode <mode> Force target mode to Dark or Light
--no-notify Suppress notifications
--preserve-wallpaper Keep current wallpaper instead of choosing random Dynamic-Wallpapers image
+ --no-restart Apply theme settings only; skip killing processes and running Refresh.sh
EOF
exit 0
;;
@@ -107,10 +112,13 @@ EOF
shift
done
-# intial kill process
-for pid in waybar rofi swaync ags swaybg; do
- killall -SIGUSR1 "$pid"
-done
+# Signal running processes to prepare for theme change.
+# Skip hiding waybar on startup (--no-restart) so it stays visible while colors regenerate.
+if [ "$no_restart" -eq 0 ]; then
+ for pid in waybar rofi swaync ags swaybg; do
+ killall -SIGUSR1 "$pid"
+ done
+fi
# Initialize wallpaper daemon if needed
@@ -342,19 +350,24 @@ set_custom_gtk_theme "$next_mode"
update_theme_mode
-${SCRIPTSDIR}/WallustSwww.sh &&
+${SCRIPTSDIR}/WallustSwww.sh
-sleep 2
-# kill process
-for pid1 in waybar rofi swaync ags swaybg; do
- killall "$pid1"
-done
-
-sleep 1
-${SCRIPTSDIR}/Refresh.sh
+if [ "$no_restart" -eq 0 ]; then
+ sleep 2
+ # kill process
+ for pid1 in waybar rofi swaync ags swaybg; do
+ killall "$pid1"
+ done
+ sleep 1
+ ${SCRIPTSDIR}/Refresh.sh
+ sleep 0.5
+else
+ # Reload waybar in-place so it picks up the newly generated wallust colors.
+ # SIGUSR2 = reload config/CSS without restarting the process.
+ systemctl --user reload waybar.service 2>/dev/null || killall -SIGUSR2 waybar 2>/dev/null || true
+fi
-sleep 0.5
-# Display notifications for theme and icon changes
+# Display notifications for theme and icon changes
[ "$notify_enabled" -eq 1 ] && notify-send -u low -i "$notif" " Themes switched to:" " $next_mode Mode"
exit 0
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage