Add versioned releases, self-update, installer polish, and a test suite - #1
Open
cr2007 wants to merge 4 commits into
Open
Add versioned releases, self-update, installer polish, and a test suite#1cr2007 wants to merge 4 commits into
cr2007 wants to merge 4 commits into
Conversation
install.sh now checks required commands, detects gitlogue via PATH and every location its own docs describe, and writes a commented config.env instead of requiring users to hand-edit the installed script. Add uninstall.sh (with --purge) and a release.yml workflow that publishes a GitHub Release when a vX.Y.Z tag matching the script's VERSION is pushed.
Embed VERSION and a `gitscrnsvr update`/--update command that checks the latest GitHub release and replaces the installed script and service unit. Read settings from ~/.config/gitscrnsvr/config.env instead of requiring edits to the installed script, so update can safely overwrite it. Replace the hardcoded gitlogue path with find_gitlogue(), which checks PATH and every location gitlogue's own docs describe. Fix a real bug: the daemon's idle timer ran independently of GNOME's actual lock state, so it could launch a second gitlogue instance behind an already-locked screen. is_screen_locked() now guards against that. Also make kill_screensaver() poll instead of a flat 1s sleep so the old window closes faster after wake is detected. Restructure the script around main()/validate_environment()/ run_daemon() so it can be sourced for tests without running the daemon loop, and extract pure parsing helpers (idle/lock-reply parsing, version comparison, release-tag parsing) from their D-Bus and network I/O.
Dependency-free bash test harness under tests/ covering the pure parsing helpers and find_gitlogue detection in gitscrnsvr, the CLI surface, and install.sh/uninstall.sh behavior. Everything runs against scratch HOME directories with systemctl stubbed out so the suite never touches the real machine's config or systemd units. Add .github/workflows/test.yml to run the suite on every push and pull request.
Cover the new install.sh/uninstall.sh flow, the config.env reference (repository, gitlogue display flags with the full theme list, idle timing, advanced overrides), gitscrnsvr update/version/help commands, the release process, and how to run tests/run_all.sh.
cr2007
force-pushed
the
overall-improvements
branch
from
July 28, 2026 19:26
a6c632f to
6645289
Compare
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.
Summary
install.sh, a newuninstall.sh(with--purge), and arelease.ymlGitHub Actions workflow that publishes a GitHub Release when avX.Y.Ztag matchinggitscrnsvr's embeddedVERSIONis pushed.gitscrnsvr version/updatecommands (self-updates from the latest GitHub release), move settings out of the installed script into~/.config/gitscrnsvr/config.env, and replace the hardcoded gitlogue path withfind_gitlogue(), which checksPATHand every install location gitlogue's own docs describe.gitlogueinstance behind an already-locked screen.is_screen_locked()now guards against that, andkill_screensaver()polls instead of a flat 1s sleep so the old window closes faster.gitscrnsvraroundmain()/validate_environment()/run_daemon()so it can be sourced for tests without running the daemon loop, and extract pure parsing helpers (idle/lock-reply parsing, version comparison, release-tag parsing) from their D-Bus/network I/O.tests/(pure-function parsing,find_gitloguedetection, CLI surface,install.sh/uninstall.shbehavior against scratchHOMEdirs withsystemctlstubbed out) and atest.ymlCI workflow to run it on every push/PR.Test plan
tests/run_all.shpasses locally (33/33 assertions)install.sh/uninstall.shexercised end-to-end in a scratch$HOMEgitscrnsvrlive-tested on a real GNOME session: idle detection, launch, wake, lock, and the lock-state fix all confirmed working