thinkpad: run the lock wrapper from xss-lock#47
Merged
Conversation
Suspend-triggered locks previously spawned xsecurelock directly, skipping the ssh-agent purge (and now the vault force-close) that manual and idle locks get via ~/bin/xscreensaver-lock. The wrapper execs xsecurelock, so XSS_SLEEP_LOCK_FD still transfers and suspend waits for the lock to engage.
There was a problem hiding this comment.
Pull request overview
Updates the ThinkPad X session startup script so suspend-triggered screen locks run through the same lock wrapper used for manual and idle locks, ensuring expected cleanup (e.g., ssh-agent purge and vault close) also happens on lid-close/suspend.
Changes:
- Switch
xss-lock --transfer-sleep-lockto invoke$HOME/bin/xscreensaver-lockinstead of callingxsecurelockdirectly. - Add inline documentation explaining why the wrapper is used and how
XSS_SLEEP_LOCK_FDbehavior is preserved viaexec.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Run the lock wrapper from xss-lock on the thinkpad instead of bare xsecurelock.
Changes
.xsession.thinkpad:xss-lock --transfer-sleep-locknow invokes~/bin/xscreensaver-lockrather thanxsecurelockdirectly. Suspend-triggered locks previously skipped the cleanup that manual (Mod+l) and idle (xautolock) locks get — the ssh-agent purge, and now the gocryptfs vault force-close added in the companion cwage/bin PR. The wrapperexecs xsecurelock, soXSS_SLEEP_LOCK_FDstill transfers and suspend waits for the lock to engage.Companion PRs: cwage/bin (vault helper + wrapper changes) and cwage/nix-workstation (packages + sleep.target backstop).
Test Plan
vault open, close lid: on resume the vault is closed and ssh-agent is empty