Fixed non-Windows notifications, improved readme examples, and fixed USB plug/unplug detection #3
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.
You were using the windows-specific class for node-notifier, even though the whole benefit of node-notifier is that it handles cross-platform stuff for you. Switched to using the default notifier, which is cross-platform.
The examples in the readme didn't include newlines at the end of the debug print functions in the keymap, which means that the debugger wouldn't detect the output (sometimes. the QMK debugger would never detect it without them, but the application still detected them sometimes). That is now fixed.
Your path.join wasn't set right, so the icon wasn't displaying in the notification. This, too, has been fixed.
I set the notification text and title to better defaults, because it was annoying me. I also changed the connect/disconnect text along with this.
Maybe this was working on Windows somehow, but at least on Linux, when the device was unplugged, HID would crash the whole app. I fixed this. Also, on Linux,
usb-detection
just didn't work, so I switched to the newerusb
, which does.I also set it to check if the vendor ID and the product ID were right before displaying the connection/disconnection message, in case the user has multiple devices by the same vendor (which I do, although I never actually ran into issues with this).
This is a great project and I'm glad it exists, so here's me giving it a bit of much-needed love!