Releases: forcequitOS/netcaps
Version 1.6.1
Efficiency & Leniency
- The default interval's been changed again to be LESS efficient, because I've done some magic tricks to decrease CPU usage further, and CPU usage was already really low.
- Caps Lock state is checked only every 500ms now
- A per-device cooldown been introduced when failing due to the infamous exclusive access error
- When a super specific error (that still indicates a success) which I've only seen caused when using Karabiner is detected, any other devices will be skipped
- Only the first LED will be enumerated for a given device
- CPU usage should be somewhat reduced now if you use Karabiner-Elements. Your CPU usage for netcaps WILL ALWAYS be better, though, if you disable Karabiner's virtual HID device. The peak CPU usage I've gotten WITH Karabiner on this release is ~10%. Without, it's around 6%.
Future: Don't re-enumerate duplicate devices maybe or maybe not depending on if I can be bothered.
Version 1.6.0
Important release with tons of fixes, efficiency improvements, and quality-of-life features
I try.
Overall should be dramatically more stable and reliable I hope. Sleep/wake events should be recognized and accounted for, there's some semblance of error handling that should trigger IOHIDManager to be restarted, device disconnections and reconnections should be handled pretty gracefully, and CPU usage should be reduced.
- CPU usage should be significantly lower now. It's a difficult compromise between balancing maximum CPU usage and shortest blink duration. However I have gotten CPU usage down to a maximum of around 10% (At peak network activity) without HORRIBLY compromising minimum blink duration. Still, though, the shortest blink will be longer now than the shortest blink was previously. I hope all of the three netcaps users will understand.
- When entering and resuming from sleep (At least when closing and reopening the lid of a MacBook), the IOHIDManager instance would go bad and pretty much stop functioning. I've tried to detect only the specific error code that indicates this (As IOHIDManager reports a lot of error codes, despite things working fine!)*, so a new IOHIDManager instance should be spawned now when this is detected.
- When a keyboard device is inaccessible (Typically due to being asleep), the program will rest for a little bit, this is similar to the other enhancement I made in the aim of better CPU usage in 1.5.0.
- When entering sleep manually, not when closing the MacBook lid and such, now the LED should 100%, guaranteed, always, turn off automatically. I was relying on the system to pick up my slack, and while it DOES, it's not instantaneous, while this fix is.
- The network interface list is cached now, reloading every 30 seconds/if it's completely empty (never) to try and salvage some form of CPU usage.
- Priority has been reduced even further when running in silent mode. Will this help with the big CPU usage crisis? Probably not.
- There's now a bunch of (6) command-line arguments to filter which arguments are listened on. Legitimately have at it. Command-line flags are also handled a decent bit better, but I still probably should have just used ArgumentParser or something. I think. I don't know.
- IOHIDManager only really reports errors if you have Karabiner's virtual HID device running. Otherwise, it works fine.
Potential future feature idea that I want to simply write down but have no promises on ever delivering: Command-line argument to set the time interval. This is pretty important, since for Bluetooth keyboards, the LED won't really turn on for short pulses at a certain value.
I don't like Swift 6! @MainActor this, @MainActor that. Maybe I should actually rewrite this mess for Swift 6 as intended than just annotating everything with @MainActor... huh.
Version 1.5.0
1, 2, 3, efficiency!
This revision to netcaps is a legitimately dramatic improvement for memory efficiency (and a few little enhancements for better CPU efficiency, too), with some minor tweaks to how network activity is determined. Let's take a look.
- Filters out unimportant/duplicate network addresses, if there's any common and important ones for network activity that I missed in my whitelist, let me know. This should mean that having Wi-Fi off really will mean the indicator is 100% off (even if communication is happening to the loopback address), and that stuff like peer-to-peer communications over AirDrop can be seen easier.
- The actual Caps Lock LED toggling stuff is handled by a class now, which allows for IOHIDManager to be reused between toggles, rather than generating a new one every single time (Which was really rough on memory before), this is probably the largest improvement.
- When network activity is idle for enough checks, a delay is added to reduce the number of CPU cycles used, it's still plenty responsive enough for actual usage.
That's really about it! Enjoy 1.5.0!
Version 1.4.0
Pretty important bug fix.
- Fixes the trace trap / Thread 1: Swift runtime failure: arithmetic overflow error by switching from UInt32 to UInt64. That was a bad oversight.
That's about it. Have fun.
Version 1.3.1
Slightly reduces the interval for the Caps Lock enabled state. Who would've thought?!
Adds a binary release if you really hate Homebrew that much. The binary release is only for arm64 Macs and might only work on Tahoe. I have no clue. Mileage may vary.
Version 1.3.0
Fixes Caps Lock behavior and extends the interval for the Caps Lock state again
Now refuses to run if Input Monitoring permissions haven't been granted, opens System Settings and prints to console in this situation. I believe when it's running headless (Or from Xcode) it needs permissions granted, but any other way it doesn't. Confusing.
Version 1.2.1
Increases the time interval for Caps Lock enabled state
Version 1.2.0
Actually and truly, the first, initial, one and only, final public release of this software. Fully functional and such.
Never back down never what?