Skip to content

thinkpad: run the lock wrapper from xss-lock#47

Merged
cwage merged 1 commit into
masterfrom
vault-lock-integration
Jul 13, 2026
Merged

thinkpad: run the lock wrapper from xss-lock#47
cwage merged 1 commit into
masterfrom
vault-lock-integration

Conversation

@cwage

@cwage cwage commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Run the lock wrapper from xss-lock on the thinkpad instead of bare xsecurelock.

Changes

  • .xsession.thinkpad: xss-lock --transfer-sleep-lock now invokes ~/bin/xscreensaver-lock rather than xsecurelock directly. 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 wrapper execs xsecurelock, so XSS_SLEEP_LOCK_FD still 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

  • Restart X session, vault open, close lid: on resume the vault is closed and ssh-agent is empty
  • Verified sleep-lock transfer: screen locks before suspend completes

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.
Copilot AI review requested due to automatic review settings July 13, 2026 17:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-lock to invoke $HOME/bin/xscreensaver-lock instead of calling xsecurelock directly.
  • Add inline documentation explaining why the wrapper is used and how XSS_SLEEP_LOCK_FD behavior is preserved via exec.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cwage
cwage merged commit 8403e76 into master Jul 13, 2026
1 check passed
@cwage
cwage deleted the vault-lock-integration branch July 13, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants