窗户毛衣
Window Sweaters

原始链接: https://github.com/saragordic/window-sweaters

Window Sweaters 是一款 macOS 应用,可为窗口添加毛衣针织边框,灵感源自应用颜色。可通过 Homebrew、发布版 ZIP 或从源码构建进行安装;由于未经过公证,macOS 可能要求在「隐私与安全性」中批准。使用菜单栏的毛线图标可调整样式、图案、宽度、针脚大小、暂停、退出或禁用应用。支持按应用定制毛衣或匹配的锯齿主题,提供 37 种自定义配色,其他应用则在本地采样图标颜色。需要 macOS 13+、Apple Silicon/Intel 及辅助功能权限。配置文件和图表可编辑。支持可选的启动 shell 脚本。可通过 Homebrew 或手动删除进行卸载,随后需单独移除辅助功能权限。采用 GPL-3.0 许可证。

Hacker News 上一篇帖子介绍了产品设计师 Sara Gordic 开发的 macOS 应用 “Window Sweaters”,它会为应用窗口加上类似毛衣的边框。作者表示这是她的第一个开源项目,出于娱乐制作,并称若不信任二进制文件,用户可自行构建。评论褒贬不一:许多人觉得它可爱并称赞这个想法,也有用户要求截图或基于天气的主题,并指出它仅支持 macOS。一些人提出运行新 GitHub 二进制文件的信任和供应链顾虑,包括关于使用 LLM 智能体审计或安装代码的讨论。随后更广泛地讨论了 AI 辅助的 vibe-coded 项目,有人认为 LLM 让这类项目意义减弱,也有人捍卫创意、想法价值和代码共享。作者为其设计背景和持续修复进行了辩护。总体而言,该帖结合了对这款异想天开的桌面应用的热情与对 AI 生成呈现和安全性的怀疑。
相关文章

原文

A little Mac app I made to give my windows sweaters. 🧶 Knitted borders, colours inspired by your favourite apps, and a cosier desktop.

Four overlapping windows edged with knitted borders in green, blue and rust colourways

You can just send this repo to your coding agent and ask it to install Window Sweaters for you:

Install Window Sweaters on my Mac: https://github.com/saragordic/window-sweaters

Or install it yourself with Homebrew:

brew trust saragordic/tap
brew install --cask saragordic/tap/window-sweaters

Then open Window Sweaters from your Applications folder.

You can also grab the latest ZIP from Releases, unzip it, and drag Window Sweaters.app into Applications.

If macOS blocks it, open System Settings → Privacy & Security → Open Anyway after trying to launch it. The app isn't notarized by Apple yet. Apple's instructions explain this step.

Click the yarn icon in your menu bar to change the style, pattern, border width, and stitch size. You can also pause the sweaters or quit from there.

To leave an app bare, open Apps and untick it. Its windows lose their sweater straight away, everything else stays as it is, and it stays off until you tick it again, even after a restart. Only want sweaters on a few apps? Choose Turn Off for All Apps, then tick the ones you like. Apps you open later start off too.

By App gives each app its own sweater. Zigzag gives them all a softer, matching cream zigzag in colours taken from their icons. Try both and see what you like.

If macOS asks for Accessibility access, enable Window Sweaters in System Settings → Privacy & Security → Accessibility so it can follow which window is focused.

Custom sweaters for 37 apps, and counting! Almost 40 little colourways, with colours picked by hand. These are just a few of my favourites:

Eight apps shown in By App and Zigzag styles, with enlarged yarn details

Shown above in By App and Zigzag. Here’s everyone we’ve knitted for so far:

  • Apple: Finder, Safari, Mail, Messages, Notes, Calendar, Reminders, Apple Music, Photos, Preview, Terminal.
  • Work and notes: Notion, Paper, Granola, Microsoft Teams, Slack, Zoom.
  • Coding and AI: Cursor, VS Code, Claude, ChatGPT, Codex, Grok Bot, Ghostty.
  • Design: Figma, Adobe Photoshop, Adobe Illustrator.
  • Microsoft Office: Word, Excel, PowerPoint, Outlook.
  • More favourites: Spotify, WhatsApp, Google Chrome, Firefox, Telegram, Discord.

See every sweater and its close-up stitches in the catalogue, or download the By App PDF.

The 37 custom sweaters keep their hand-picked colours and patterns. Other apps borrow colours from their own icons, softened into yarn, and get a two-colour zigzag, picnic or twinkle sweater in By App mode. The pattern stays the same for each app. If an icon has no usable colour, the app keeps a stable colour chosen from its name.

Icons are sampled locally in the background when needed. While the colour is being prepared, the border uses its usual fallback. Zigzag uses icon colours for every app, the 37 custom ones included, with a cream zigzag, or a deeper shade of the app’s colour on pale apps. Colours you set in apps.conf always win. Other shared patterns keep their own contrast yarns, with each app’s own base colour.

A little work in progress

I built this on my Mac and use it myself, but there are still rough edges. Borders hide while you resize a window and return when you're done.

The app is built for macOS 13 or later, on Apple Silicon and Intel. I've tested it on Apple Silicon with macOS 26; older macOS versions and Intel Macs haven't had the same hands-on testing. It uses private macOS window APIs, so system updates may affect how it works.

If something looks wrong, open an issue and tell me your macOS version, Mac model, and whether you're using another screen. Reproduction steps help a lot.

You'll need Apple's Command Line Tools (xcode-select --install) and Python 3.

git clone https://github.com/saragordic/window-sweaters.git
cd window-sweaters
./scripts/build-app.sh
python3 scripts/install-local.py

This builds outputs/Window Sweaters.app, installs it in ~/Applications, and opens it. The installer backs up any previous local installation before replacing it.

If you'd like to experiment, edit these files and restart the app:

~/Library/Application Support/Knit Borders/apps.conf
~/Library/Application Support/Knit Borders/charts/

The folder still uses the app's original name so existing settings keep working. For example, an app rule looks like this:

Claude = #D58561 atelier-claude

Names match app-name prefixes, ignoring capitalisation; the longest match wins. You can also put your own PNG charts in the charts folder to replace built-in patterns.

If you like setting things up from the command line, Window Sweaters also runs an optional shell script at startup, if you have one at ~/.config/window-sweaters/sweatersrc or ~/.sweatersrc.

Quit Window Sweaters from the yarn icon first. Then, if you installed it with Homebrew:

brew uninstall --zap --cask window-sweaters

--zap also removes your saved colourways. Leave it off to keep them for later.

If you installed it by hand, drag Window Sweaters.app to the Trash, then delete these if you want everything gone:

~/Library/Application Support/Knit Borders
~/Library/Preferences/local.knitborders.app.plist

macOS remembers the Accessibility permission separately, so remove Window Sweaters from System Settings → Privacy & Security → Accessibility too.

make test       # run the tests
make catalogue  # render the sweater collection
make bench     # benchmark the renderer

See CONTRIBUTING.md for more details.

Built on JankyBorders by Felix Kratz, with thanks. Released under GPL-3.0. See NOTICE.md for attribution.

联系我们 contact @ memedata.com