Brian Lovin
/
Hacker News

Show HN: WhatCable, a tiny menu bar app for inspecting USB-C cables

github.com

USB-C cables can be a mess. One cable charges at 5W, another does 100W and Thunderbolt 4, and they look identical in the drawer.

WhatCable sits in your menu bar and reads the cable data your Mac already has access to. Plug in a cable and it tells you in plain English what it can actually do: charging wattage, data speed, display support, Thunderbolt, etc.

Built in Swift/SwiftUI. Open source, free, no tracking.

GitHub: https://github.com/darrylmorley/whatcable

Daily Digest email

Get the top HN stories in your inbox every day.

pimeys

Cool. Just want to chime in that I wanted to see how quickly GPT-5.5 can turn this into a KDE Plasma 6 Plasmoid. Took about 10 minutes and two dollars, and now I have a nice QML app showing the same information in my taskbar.

Just wanted to say this because I feel it's really crazy that I can just do this today...

geordieboozer

To save me 10 mins and $2, is this posted to GitHub somewhere?

rustyhancock

Absolutely this is worth packaging for KDE.

Although I imagine if you don't have the motivation to make it in the first place, you likely don't have the motivation to package it.

Zetaphor

I've got Opus crunching on it now, will update when I have it finished and published

Edit:

https://github.com/Zetaphor/whatcable-linux

Running on my Fedora KDE machine right now. Also includes a CLI so you could wrap your own widget

I still need to figure out publishing, doing this in between work meetings.

TeMPOraL

Admiral Ackbar has entered the chat.

Making something has a well-defined end. Packaging something for distribution is an easy way to walk yourself into a long-term commitment.

techwizrd

I am happy to package it and port it for Gtk/GNOME today.

undefined

[deleted]

pimeys

I feel like this is so lazy bothering maintainers for it is not great.

pimeys

It's 1st of May here, so probably not doing it today. Looking into it a bit more when I get back from the parties. but it's basically just three files: QML for the UI, some python code to parse /proc data and a metadata file.

lostlogin

> It's 1st of May here

Is that date significant somewhere? It was an nice sunny Friday for me.

rigrassm

Did exactly this with the Sennheiser BTD-700 Bluetooth dongle. Found someone had done the work to create a little C library for controlling the dongle and with that Claude had created a nice widget for KDE to control my headphones.

porridgeraisin

Yeah it's insane how quickly the platform issue get solved by LLMs for 90% of software.

I fixed lots of old tools' issues with using older broken APIs as well this way.

billyhoffman

Props to @sleepingNomad here, who has done 16 releases in the last 7 hours, incorporating feedback from HN on the fly!

* Don't like menubar apps? you you can run it as a normal app

* Don't like GUIs? Now you can run it on the command line

Just look at that Changelog:

https://github.com/darrylmorley/whatcable/releases?page=2

sleepingNomad

Thanks! HN gave me great bug reports and feature requests. Claude helped me ship fast. 16 releases in 7 hours is a lot easier with a decent pair programmer.

fredcallagan

Software development will never be as it was 3 years ago :D and that is great :D

AnonC

Quite impressive, indeed. OP/sleepingNomad, can I have this on MacPorts, please? Thank you.

sleepingNomad

Added to the list!

sagacity

This is pretty nice, but why do a lot of Mac apps insist on living in the menu bar?

mft_

Agreed, especially for something like this that might get used a handful of times (I’m assuming most people don’t have myriad cables or want to check them regularly?)

The problem of course is that on my 14” screen the area to the right of the notch is already close to full and I don’t even have that many things there…

sleepingNomad

It works for me, but I understand for others it might not. So, there's now a "Show in menu bar" toggle in Settings. Turn it off and WhatCable runs as a regular Dock app with a normal window instead.

poisonborz

Making 1 click to access is faster than typing the app name in finder. Dock is usually full and used for different type of apps. Makes also constantly visible output possible with standard ui patterns.

Someone

And ‘every’ Mac developer thinks people will want to run their tool all the time.

For this kind of read-only tool, I doubt that’s the case. A regular application probably serves most users better.

Also, if you want users to have the option of permanently displaying this kind of info, a desktop widget (https://developer.apple.com/documentation/widgetkit) may be a better option than a menu bar item.

sgt

Exactly, this should just be a regular app with an optional menu bar option for those who want to switch it on.

sleepingNomad

I like this idea.

lxgr

> Dock is usually full

My menu bar is also full and, unlike the Dock, I can’t resize it to fit more.

poisonborz

You can put it in a secondary onclick taskbar with Ice (similarly to Windows)

efskap

Sure you can.

defaults -currentHost write -globalDomain NSStatusItemSpacing -int 2

defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 2

Replace write with delete to undo.

UqWBcuFx6NV4r

OK, thanks. We understand what a menu bar is.

How is this conducive to the typical usage pattern of an app like this?

kranner

For some reason the app supports a separate standalone window mode as well [0]. It's not clear why the developer took the trouble to support two different modes when the menubar mode doesn't seem to add anything (like a live-updating icon for throughput).

Well, I can think of one reason why it wasn't that much more trouble. François Chollet had a nice tweet [1] on why removing human cognitive friction is resulting in needless software complexity.

[0] https://github.com/darrylmorley/whatcable/blob/main/Sources/...

[1] https://x.com/fchollet/status/2045929951539707957

awakeasleep

Are you saying you wish this was a desktop app and you would just open it occasionally when curious?

If so, it feels like a needlessly indirect and combative way to go about it.

johanyc

Spotlight exists. Typing is much faster than moving your cursor to a small target like a menu bar item.

_Microft

Is it not rather useful in this particular case? You will see the reported capabilities whenever you plug in a cable. Or do people rather want to diagnose and label their cables just once?

sagacity

Sure, but do you diagnose cables so often that you need a permanent icon in the menu bar?

Following that logic, every application you use more than a handful of times should live there.

Anyway. I'm not trying to argue, I think this is a neat tool, but when the Windows tray got bloated with icons people used to complain about it.

jrochkind1

oh no you're right, my menu bar is full already.

thih9

> Not on the App Store. App Sandbox blocks the IOKit reads we depend on.

Interesting - do we know why that api is not allowed? I see no reason, especially if it would also require runtime permission from user.

jareds

Thanks for creating this. I'm blind so the $16 USB tester off amazon to sort through my drawer of cables is not an option. This will stop me from needing to buy a sbc just so I have something running Linux to test cables.

n3storm

can something like this be done for linux? maybe a wrapper for lsusb. I just found https://github.com/doug-gilbert/lsucpd which adds PD and more.

bichiliad

I love that this is a native mac app. Thanks for building this, and thanks for sharing.

sleepingNomad

Thanks for taking a look, just pleased other people find it useful.

bkummel

Doesn't work for me. Says "No USB-C ports detected", although I'm pretty sure my monitor is connected via USB-C, and the monitor also has a built-in USB hub where my USB keyboard is connected to.

bkummel

There's an issue on Github for this now: https://github.com/darrylmorley/whatcable/issues/2

avidiax

Wontfix for Intel Macbooks: https://github.com/darrylmorley/whatcable/issues/12

Seems the Intel southbridge isn't known to expose the needed info.

sleepingNomad

Hi, should be fixed now.

codepoet80

Not for me! Intel Mac Pro 7,1, Sequoia 15.7.3, running v0.4.7

ricardobeat

I remember seeing a recent analysis where the vast majority of cables from Amazon misreported their capabilities. Is this tool going to be able to catch those, or blindly report what the chip advertises?

Neywiny

I think for real cables the delta could also be explained by damage or just a bad plug-in attempt, so even if you're not trying to detect counterfeit cables it could be useful to know:

1. What does the host support

2. What does the cable support

3. What does the device support

4. What actually got negotiated

avidiax

The tool can only tell you what the cable says. Detecting the gauge and composition of the wires in the cable is either destructive or requires temperature probes.

Detecting whether the signal characteristics are close enough to in-spec or not requires a speed test, perhaps, but that also doesn't necessarily mean the cable is the problem if such a test failed.

thenthenthen

This would be super to have! I do a lot of software defined radio work and the quality of USB (C) cables is pretty much a wild west. I needed some for a workshop and it was almost impossible to find a cable that didnt have crazy reflections and interference at all frequencies. I went through 6 different brands and vendors. In the end the cleanest signal came from an original Apple Type C cable (around 20usd). I am not sure if its because their shielding, differential pairs or signal integrity computation (iirc there is like a pretty beefy soc in the connector), or that I used it with an Apple Macbook. Some of the cables I found to perform badly were cut open, revealing missing shielding and none of them had twisted pairs.

bhouston

I tried to contribute back adapter current Wattage display to stats, but I got my PR closed without comment. It is similar to this:

https://github.com/exelban/stats/pull/3024

NelsonMinar

This reminds me ChromeOS has some USB-C cable identification superpowers: https://www.reddit.com/r/UsbCHardware/comments/1pyojjd/comme...

Not sure if it's using the same thing this MacOS thing is doing. In the link the author explains that the cable e-Marker contains a "Discover Identity" message that you can read and display in ChromeOS. Most ordinary Windows hardware can't read it because of BIOS limitations, but Chromebooks can. I'm guessing Macs can too.

tuzemec

Awesome! It handles my kinda complicated setup with docking station, USB and DisplayPort switches pretty well.

Daily Digest email

Get the top HN stories in your inbox every day.