Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Distinct Notification Data and Yubikey Serial Number Inclusion #50

Open
nilp0inter opened this issue Dec 15, 2023 · 2 comments

Comments

@nilp0inter
Copy link

nilp0inter commented Dec 15, 2023

Hi,

I'm currently using yubikey-touch-detector in conjunction with dunst for notifications. I've encountered a couple of areas where enhancements could significantly improve user experience:

  1. Inclusion of Event Type in Notification Data: Currently, all types of events trigger the same notification data. It would be highly beneficial to differentiate these events. Could we consider including the type of event in the appname or the body of the notification? This would allow for custom matching and distinct icons for each event type in dunst.

  2. Inclusion of Yubikey's Serial Number in Notifications: I have two Yubikeys connected to my PC - a Yubikey Bio for U2F and a Yubikey 5 for GPG/PIV. Being able to identify which Yubikey needs interaction (via its serial number in the notification) would be immensely helpful for users like me who use multiple devices.

These enhancements would not only improve my workflow but could also be beneficial for others in similar scenarios.

Thank you for considering these suggestions. I look forward to any feedback or discussion on these potential features.

Cheers!

@maximbaz
Copy link
Owner

Hello! Thanks for the suggestions! 🙏

With a side-note that the built-in libnotify integration is meant more like an example and should be generally be tailored to use-cases when people don't want to configure anything and just want a rudimentary notification, I think your first suggestion would benefit everyone, so I don't mind adding it 👍 Would you like to send a PR? I think a body might be a better place to add this, but suggest whatever you feel is best.

It sounds also that it would solve your second point without adding a serial number, just because one of your Yubikeys is used explicitly for U2F and another for non-U2F stuff, so you would be able to distinguish based on that?

For reference, you can plug into yubikey's socket (e.g. like so) or even just parse stdout output (e.g. like so), and implement whatever custom notification logic you like without touching the code 😉

For the serial number idea, the biggest problem is that I think it's actually very complicated, if not entirely impossible, to detect the serial number... Especially for anything that is not U2F, detection is currently based on some hacky heuristics, there isn't any official API to know if a Yubikey is waiting for a touch...

@mochaaP
Copy link
Contributor

mochaaP commented Jan 13, 2024

might be related: #51
switching to ykpers seemly make the distinct by device index, based on assumptions from the ykinfo cli.

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

No branches or pull requests

3 participants