fix(panel): skip restart on upgrade + rename config dirs#16
Merged
Conversation
install-panel-launcher.sh now checks if the plugin slot is already a launcher in xfconf. If so, this is an upgrade — the panel already has the plugin loaded, so no pkill+restart is needed. Restart only on fresh install (new plugin ID). This prevents xfce4-panel from being killed inside the systemd update service's cgroup on every auto-update.
…switch ~/.config/theme-switcher/ → ~/.config/xfce-night-switch/ ~/.cache/theme-switcher/ → ~/.cache/xfce-night-switch/ /tmp/theme-switcher-loc.tmp → /tmp/xfce-night-switch-loc.tmp xfce-night-switch-setup migrates existing dirs on upgrade. Merged duplicate theme-switcher-config.default into packaging/config.default.
install-panel-launcher.sh: distinguish three cases: 1. fresh install (plugin not in xfconf) → pkill + start 2. upgrade + panel running → skip entirely 3. upgrade + panel was dead (killed by prior bug) → start without pkill xfce-night-switch-setup: add PR test confirmation block (cherry-pick from feat/pr-test-gate); fix ASCII art alignment with printf.
prostopasta
force-pushed
the
fix/panel-no-restart-on-update
branch
from
June 15, 2026 17:53
513de8c to
3e2d469
Compare
Running setup via 'su -' from postinst caused it to run twice when the user also called it manually, and showed the interactive PR test prompt in a non-clean context (competing with dpkg/cron output). Setup is now always run explicitly by the user or by auto-update.sh.
Tag: pr-{N}-test-{sha7} (unique per push, no more overwrites)
Version: x.y.z-pr.{N}.{sha7}
Old releases with pr-{N}-test tag are preserved for history.
- PR confirmation now uses yad GUI dialog (immune to background terminal output from cron/services); falls back to read if yad unavailable - Cron entry redirects output to ~/.local/share/xfce-night-switch/auto-theme.log so auto-theme output no longer leaks into the user terminal - Migrates existing cron entry without log redirect on upgrade
Owner
Author
|
/test-passed |
After test confirmation: 1. Sets test-gate check to success 2. Waits up to 4 min for all other checks to complete 3. Squash-merges the PR and deletes the branch (--admin to bypass protection)
🧪 Test build ready — PR #16Install the test build (Ubuntu/Debian/Mint): wget -q 'https://github.com/prostopasta/xfce-night-switch/releases/download/pr-16-test-03687b0/xfce-night-switch_1.3.0-pr.16.03687b0_all.deb' -O /tmp/xns-test.deb \
&& sudo dpkg -i /tmp/xns-test.deb \
&& xfce-night-switch-setupAfter testing, confirm it works by commenting: |
Owner
Author
|
/test-passed |
prostopasta
added a commit
that referenced
this pull request
Jun 28, 2026
…improvements (#16) * fix(panel): skip restart when plugin already registered (upgrade) install-panel-launcher.sh now checks if the plugin slot is already a launcher in xfconf. If so, this is an upgrade — the panel already has the plugin loaded, so no pkill+restart is needed. Restart only on fresh install (new plugin ID). This prevents xfce4-panel from being killed inside the systemd update service's cgroup on every auto-update. * refactor: rename config/cache dirs from theme-switcher to xfce-night-switch ~/.config/theme-switcher/ → ~/.config/xfce-night-switch/ ~/.cache/theme-switcher/ → ~/.cache/xfce-night-switch/ /tmp/theme-switcher-loc.tmp → /tmp/xfce-night-switch-loc.tmp xfce-night-switch-setup migrates existing dirs on upgrade. Merged duplicate theme-switcher-config.default into packaging/config.default. * ci: trigger PR test build * fix(panel): start panel if dead on upgrade, fix ASCII art in test prompt install-panel-launcher.sh: distinguish three cases: 1. fresh install (plugin not in xfconf) → pkill + start 2. upgrade + panel running → skip entirely 3. upgrade + panel was dead (killed by prior bug) → start without pkill xfce-night-switch-setup: add PR test confirmation block (cherry-pick from feat/pr-test-gate); fix ASCII art alignment with printf. * fix(postinst): remove auto-run of xfce-night-switch-setup Running setup via 'su -' from postinst caused it to run twice when the user also called it manually, and showed the interactive PR test prompt in a non-clean context (competing with dpkg/cron output). Setup is now always run explicitly by the user or by auto-update.sh. * fix(ci): include commit SHA in PR test build tag and version Tag: pr-{N}-test-{sha7} (unique per push, no more overwrites) Version: x.y.z-pr.{N}.{sha7} Old releases with pr-{N}-test tag are preserved for history. * fix(ci): clean up all test releases when PR is closed/merged * fix(panel): restart on panel change, skip only when same panel (upgrade) * fix(setup): yad dialog for PR confirmation; redirect cron to log file - PR confirmation now uses yad GUI dialog (immune to background terminal output from cron/services); falls back to read if yad unavailable - Cron entry redirects output to ~/.local/share/xfce-night-switch/auto-theme.log so auto-theme output no longer leaks into the user terminal - Migrates existing cron entry without log redirect on upgrade * fix(ci): auto-merge PR with branch delete after /test-passed After test confirmation: 1. Sets test-gate check to success 2. Waits up to 4 min for all other checks to complete 3. Squash-merges the PR and deletes the branch (--admin to bypass protection)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes
Panel disappears after auto-update (root cause)
install-panel-launcher.shwas unconditionallypkill-ing and restartingxfce4-panelon every run — including during upgrades triggered from within thexfce-night-switch-update.servicecgroup. The restarted panel process is a child of the service, and when the service exits, the cgroup is cleaned up, killing the panel.Fix: check if the plugin slot is already registered as a
launcherin xfconf. If yes → upgrade, skip restart. If no → fresh install, restart required to load the new plugin.Rename config/cache dirs
~/.config/theme-switcher/→~/.config/xfce-night-switch/~/.cache/theme-switcher/→~/.cache/xfce-night-switch/xfce-night-switch-setupmigrates existing directories on upgrade (no config loss).Commits
fix(panel): skip restart when plugin already registered (upgrade) → triggers v1.2.4refactor: rename config/cache dirs from theme-switcher to xfce-night-switch → no release bump