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

推荐订阅源

有赞技术团队
有赞技术团队
M
MIT News - Artificial intelligence
Hugging Face - Blog
Hugging Face - Blog
博客园 - 聂微东
量子位
S
SegmentFault 最新的问题
V
Visual Studio Blog
博客园 - 【当耐特】
Apple Machine Learning Research
Apple Machine Learning Research
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
小众软件
小众软件
Stack Overflow Blog
Stack Overflow Blog
Vercel News
Vercel News
D
Docker
J
Java Code Geeks
博客园 - 三生石上(FineUI控件)
博客园 - Franky
Recent Announcements
Recent Announcements
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
MongoDB | Blog
MongoDB | Blog
D
DataBreaches.Net
Y
Y Combinator Blog
云风的 BLOG
云风的 BLOG
V
V2EX

Hacker News: Show HN

PurrrrrFocus: Pomodoro Timer App - App Store Workflow Engine — Multi-Step Orchestration for Bun RapidPhoto: Pro Photo Editor App - App Store GitHub - DheerG/swarms: Achieve extraordinary results with claude code across a variety of tasks SPICE simulation → oscilloscope → verification with Claude Code — Lucas Gerads Show HN: VCoding – A 5 MB native Windows IDE with no dynamic dependencies Show HN: LLMs don't hallucinate because they're bad at math, it's the format GitHub - Agent-FM/agentfm-core: AgentFM is a peer-to-peer network that turns everyday computers into a decentralized AI supercomputer. AgentFM lets you run massive AI workloads directly across a global mesh of idle CPUs and GPUs. Show HN: Tracking Top US Science Olympiad Alumni over Last 25 Years GitHub - Potarix/agent-hub: One place to talk to all your agents Show HN: Runtime security for AI agents(injection,tool abuse, data exfiltration) GitHub - dubeyKartikay/lazyspotify: Terminal Spotify client for macOS and Linux GitHub - the-banana-tool/king-louie: Easy to use GUI Personal AI Assistant. Win/Linux/Mac. Show HN I made my vacation rental bookable by AI agents–no Airbnb, 0% commission GitHub - basteez/jsf-autoreload: maven plugin to enable hot reload on jsf projects uvm32/hosts/host-gdbstub at main · ringtailsoftware/uvm32 GitHub - labsai/EDDI: Config-driven engine that turns JSON into production-grade AI agents. Multi-agent orchestration, 12+ LLM providers, MCP/A2A protocols, RAG, persistent memory, and enterprise compliance (EU AI Act, GDPR, HIPAA). Built on Quarkus. GitHub - glitchnsec/fortyone-oss: AI Executive Assistant Platform Quickstart | Alien GitHub - muxshed/shed: One stream in, or many. Every destination, simultaneously. No cloud middleman, no per-channel fees, no limits. GitHub - ocrbase-hq/ocrbase: 📄 PDF/IMG ->.MD/JSON Document OCR API for PaddleOCR and GLMOCR. Self-hostable. GitHub - impactjo/home-memory: MCP server that lets your AI assistant remember everything about your home. GitHub - Sets88/dbcls: DbCls is a powerful terminal database client that supports various databases GitHub - neptun2000/heor-agent-mcp GitHub - SeanFDZ/macmind: Single-layer transformer in HyperTalk for the classic Macintosh RollQuation: Math Puzzles - Apps on Google Play GitHub - dropbox/witchcraft Show HN: Agent-cache – Multi-tier LLM/tool/session caching for Valkey and Redis GitHub - opentalon/opentalon: OpenTalon is an open-source platform built from the ground up in Go as a robust alternative to OpenClaw LinkedIn™ 职位抓取工具 - Chrome 应用商店
kitcat 2.0
Milad Alizadeh · 2026-06-23 · via Hacker News: Show HN

I released kitcat a while back: a matplotlib backend that draws plots directly into your terminal instead of opening a GUI window. The original release was barely a hundred lines and dead simple, and I’ve ended up reaching for it almost every day since.

The 2.0 release addresses the two things people asked for most:

  • Plots that behave inside tmux
  • Better default sizing

Both rely on features only kitty and Ghostty support, and better sizing needs kitty specifically. Everywhere else gets the old behaviour.

Plots that behave inside tmux

Previous versions drew plots at the cursor. They scrolled fine on their own, but the moment something other than the terminal itself started shuffling text around, things fell apart. tmux, for example, redraws its panes constantly with no idea there’s an image there — so the plot would sit at a fixed position while the text scrolled out from under it, fail to clip at a pane boundary, or linger after the pane was hidden.

This release switches to Unicode placeholders, a newer feature of the kitty graphics protocol that AFAIK only kitty and Ghostty implement. What’s different is that the image is no longer painted at a screen position. Instead we use a Unicode character as a placeholder to tell the terminal to display an image at that cell. The picture you see is really just text. And because it’s text, anything that moves text, e.g. tmux, moves the image for free — it scrolls with the buffer, clips at pane edges, and reflows when you resize the window:

Better default sizing

The other complaint was size. Previous versions always rendered at matplotlib’s default DPI, so on a HiDPI display the plot and its labels came out noticeably smaller than the surrounding terminal text. In 2.0 kitcat queries the display’s real DPI — something only kitty reports — and applies a scaling factor so the figure matches. Ghostty and everything else don’t expose a DPI, so we fall back to the old behaviour.

Detecting the terminal program

Surprisingly, most of my time went into figuring out which terminal program was in use. You can’t trust environment variables like $TERM or $TERM_PROGRAM for this: even when they start out correct, SSH or a multiplexer like tmux may overwrite them — and those are exactly the cases kitcat needs to work in.

The most reliable way I found was to ask the terminal directly — send it a query escape sequence and read its reply. kitcat’s first choice is XTGETTCAP, which queries a terminfo capability in real time; asking for the terminal-name capability (TN) gets the terminal’s own answer with no environment variable in the loop:

printf '\033P+q544e\033\\'

The reply comes back hex-encoded — on kitty it’s 787465726d2d6b69747479, which is just xterm-kitty spelled out in hex.

XTVERSION is the next option. It just asks the terminal to identify itself:

Not every terminal answers these — they vary wildly in what they support and how they identify themselves (there’s a running survey of terminal capabilities that shows just how uneven it gets) — so environment variables stay as a last resort. In practice we mostly care about detecting kitty and Ghostty, which both support replying to these queries.

Update

pip install --upgrade kitcat