惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
Y
Y Combinator Blog
F
Fortinet All Blogs
H
Hackread – Cybersecurity News, Data Breaches, AI and More
N
Netflix TechBlog - Medium
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
T
The Blog of Author Tim Ferriss
D
DataBreaches.Net
量子位
博客园 - 三生石上(FineUI控件)
I
InfoQ
Engineering at Meta
Engineering at Meta
WordPress大学
WordPress大学
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿
D
Docker
美团技术团队
雷峰网
雷峰网
U
Unit 42
Stack Overflow Blog
Stack Overflow Blog
Recent Announcements
Recent Announcements
人人都是产品经理
人人都是产品经理

Hacker News

GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis Bonsai 1-bit WebGPU - a Hugging Face Space by webml-community Moving a large-scale metrics pipeline from StatsD to OpenTelemetry / Prometheus GitHub - Nightmare-Eclipse/RedSun: The Red Sun vulnerability repository GitHub - SethPyle376/hiraeth: Local AWS emulator focused on fast integration testing, with SQS support, SQLite-backed state, and a debug-friendly web UI. GitHub - macOS26/Agent: Any AI, replaces Claude Code, Cursor, OpenClaw. Over 18 LLM providers (Claude, OpenAI, Gemini, Ollama, Zai, HF, Qwen) wired into a native Mac app that writes code, builds Xcode projects, bumps versions, manages git, automates Safari, use AppleScript, JS or Accessibility, extend Agent! w/ MCP Servers, run tasks from your iPhone via Messages. YouTube now lets you turn off Shorts I Made a Terminal Pager Burgers | マクドナルド公式 Commands — HackerNews CLI documentation ChatGPT for Excel PiCore - Raspberry Pi Port of Tiny Core Linux Live Nation illegally monopolized ticketing market, jury finds Google Broke Its Promise to Me. Now ICE Has My Data. Founding Engineer at Adaptional | Y Combinator CRISPR takes important step toward silencing Down syndrome’s extra chromosome GitHub - saffron-health/libretto: The AI toolkit for building reliable browser automations US v. Heppner (S.D.N.Y. 2026) no attorney-client privilege for AI chats [pdf] Retrofitting JIT Compilers into C Interpreters IPv6 – Google The Accursèd Alphabetical Clock Cybersecurity Looks Like Proof of Work Now Fragments: April 14 Cal.com Goes Closed Source: Why AI Security Is Forcing Our Decision | Cal.com - Scheduling Software for Online Bookings Laravel raised money and now injects ads directly into your agent When moving fast, talking is the first thing to break Too much Discussion of the XOR swap trick – Heather Cafe Introduction to Spherical Harmonics for Graphics Programmers The Grand Line
GitHub - darrylmorley/whatcable: macOS menu bar app that ...
sleepingNoma · 2026-05-01 · via Hacker News

What can this USB-C cable actually do?

A small macOS menu bar app that tells you, in plain English, what each USB-C cable plugged into your Mac can actually do, and why your Mac might be charging slowly.

USB-C hides a lot under one connector. Anything from a USB 2.0 charge-only cable to a 240W / 40 Gbps Thunderbolt 4 cable, all looking identical in your drawer. macOS already exposes the relevant info via IOKit; WhatCable surfaces it as a friendly menu bar popover.

Latest release Platform License: MIT

WhatCable popover

What it shows

Per port, in plain English:

  • At-a-glance headline — Thunderbolt / USB4, USB device, Charging only, Slow USB / charge-only cable, Nothing connected
  • Charging diagnostic — when something's plugged in, a banner identifies the bottleneck:
    • "Cable is limiting charging speed" (cable rated below the charger)
    • "Charging at 30W (charger can do up to 96W)" (Mac is asking for less, e.g. battery near full)
    • "Charging well at 96W" (everything matches)
  • Cable e-marker info — the cable's actual speed (USB 2.0, 5 / 10 / 20 / 40 / 80 Gbps), current rating (3 A / 5 A → up to 60W / 100W / 240W), and the chip's vendor
  • Charger PDO list — every voltage profile the charger advertises (5V / 9V / 12V / 15V / 20V…) with the currently negotiated profile highlighted in real time
  • Connected device identity — vendor name and product type, decoded from the PD Discover Identity response
  • Active transports — USB 2 / USB 3 / Thunderbolt / DisplayPort
  • "Show technical details" toggle revealing the underlying IOKit properties for engineers

Right-click the menu bar icon for Refresh, a Keep window open toggle (handy for screenshots and demos), About, and Quit.

Install

Download the latest WhatCable.zip from the Releases page, unzip, and drag WhatCable.app to /Applications.

The app is universal (Apple silicon + Intel), signed with a Developer ID, and notarised by Apple — no Gatekeeper warnings.

Requires macOS 14 (Sonoma) or later.

How it works

WhatCable reads three families of IOKit services. No entitlements, no private APIs, no helper daemons:

Service What it gives us
AppleHPMInterfaceType10/11 Per-port state: connection, transports, plug orientation, e-marker presence
IOPortFeaturePowerSource Full PDO list from the connected source, with the live "winning" PDO
IOPortTransportComponentCCUSBPDSOP PD Discover Identity VDOs for SOP (port partner) and SOP' (cable e-marker)

Cable speed and power decoding follow the USB Power Delivery 3.x spec.

Build from source

swift run WhatCable

Requires Swift 5.9 (Xcode 15+).

Build a distributable .app

./scripts/build-app.sh

Produces a universal dist/WhatCable.app (arm64 + x86_64) and dist/WhatCable.zip.

Modes:

Configuration Result
No .env Ad-hoc signed. Works locally; Gatekeeper warns on other Macs.
.env with DEVELOPER_ID Developer ID signed + hardened runtime.
.env with DEVELOPER_ID + NOTARY_PROFILE Full notarisation + stapled ticket. Gatekeeper-clean for everyone.

One-time setup for full notarisation:

# 1. Find your signing identity
security find-identity -v -p codesigning

# 2. Store notarytool credentials in the keychain
xcrun notarytool store-credentials "WhatCable-notary" \
    --apple-id "you@example.com" \
    --team-id "ABCDE12345" \
    --password "<app-specific-password>"   # generate at appleid.apple.com

# 3. Create your .env from the template
cp .env.example .env
# ...and fill in DEVELOPER_ID

Caveats

  • Cable e-marker info only appears for cables that carry one. Most USB-C cables under 60 W are unmarked. Any Thunderbolt / USB4 cable, any 5 A / 100 W+ cable, and most quality data cables will be e-marked.
  • PD spec coverage: the decoder targets PD 3.0 / 3.1. PD 3.2 EPR variants may need tweaks once we see real data.
  • Vendor name lookup is bundled but not exhaustive — common cable, charger, hub, dock, and storage vendors are recognised; others fall back to the hex VID.
  • macOS only. iOS sandboxing makes USB-C e-marker access much harder.
  • Not on the App Store. App Sandbox blocks the IOKit reads we depend on.

Contributing

Issues and PRs welcome. The code is small and tries to stay readable — start at Sources/CableTest/ContentView.swift for the UI, PortSummary.swift for the plain-English logic, or PDVDO.swift for the bit-twiddling.

Credits

Built by Darryl Morley.

Inspired by every time someone has asked "is this cable any good?".