feat: plugin informing *why* touch is needed - #84
Draft
tobixen wants to merge 1 commit into
Draft
Conversation
Reimplements the process-context detection from PR max-baz#82 (max-baz#82) as an external plugin, per the maintainer's suggestion, instead of patching the core app. The plugin listens on the detector's existing Unix socket ($XDG_RUNTIME_DIR/yubikey-touch-detector.socket) and, on a GPG_1 event, traces the gpg-agent connection via `ss -xpn` + peer-inode matching to identify the calling process, then shows it with `notify-send`. No detector changes needed. - Ports the ss/gpgconf/proc tracing logic to Python with unit tests. - Excludes gpg-agent, scdaemon and the detector itself (the latter only catchable via /proc cmdline basename, since ss reports the 15-char-truncated comm "yubikey-touch-d"). - Includes a single replaceable notification with a post-touch banner, a systemd user unit, and a README documenting scope/limitations. prompt: please look into the pull request comments. I'm advised to rewrite the patch into a plugin. followup-prompt: (decisions) plugin form = Python script; branch = new branch, keep the original Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Owner
|
Awesome! This is exactly the dream scenario for this project, to enable people to build cool and personalized stuff on top! I know people used wiki to share tips & snippets, but maybe this code is a bit too much to share via wiki? At the same time LLMs are known to blow the code up, it's quite possible that the same can be achieved in much fewer lines of code if you press it hard enough 😂 In any case, I'm happy to share feedback while you are still developing and testing it, but in the end I don't think I should play the gatekeeper role, I think it would be better if you put the final version into a standalone repo, and if you want link to it from the wiki in this project? |
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.
This superceded #82.
Adds a plugin to a new contrib directory. "Draft" because it's AI-generated code that has neither been reviewed nor tested thoroghly yet. It's also an open question if this should be distributed in a contrib-folder, as a stand-alone project or in a different way.