让 Windows 资源管理器中由 Zed / ZedG 关联的源码文件显示更细分的文件类型图标,而不是全部显示同一个编辑器图标。
这个 fork 使用 KDE Breeze Icons 风格的 .ico 文件,保留原项目的轻量 PowerShell 覆盖方式:复制图标,写入当前用户的 DefaultIcon 注册表项,刷新 Explorer。
- 面向 Windows 上的官方 Stable Zed,以及使用
ZedI18n.<ext>ProgID 的 ZedG / 汉化版。 - 只影响 Windows 资源管理器 / 桌面里的文件图标。
- 不修改 Zed 编辑器内部的 Project Panel / 文件树图标主题。
- 不修改 Windows 受保护的
UserChoice默认应用哈希。 - 默认只给已有的
Zed.<ext>/ZedI18n.<ext>文件关联补充DefaultIcon。 - 对 ZedG 这类没有预先创建 ProgID 的版本,可以显式使用
-CreateMissingProgIds创建当前用户 ProgID。
- 图标风格来自 KDE Breeze Icons: https://develop.kde.org/frameworks/breeze-icons/
- 本仓库只分发已经转换好的 Windows
.ico文件。 - 有些前端/配置类文件在 Breeze 中没有专门图标,会使用最接近的 Breeze mimetype 图标:
- TypeScript / React -> JavaScript
- Vue / Jade -> HTML
- LESS -> CSS
- Bower -> JSON
- PowerShell / shell -> script
- YAML / default / code -> generic text
下载或解压本仓库后,在 PowerShell 中进入仓库目录运行:
Set-ExecutionPolicy -Scope Process Bypass -Force
.\install.ps1脚本会自动检测当前用户已安装的 Zed 文件关联前缀,优先使用 ZedI18n,否则使用 Zed。
脚本会:
- 检查
file-icons目录中的必需.ico文件是否存在。 - 复制图标到
%LOCALAPPDATA%\ZedFileIcons\file-icons。 - 为已有的
HKCU\Software\Classes\Zed.<ext>\DefaultIcon写入对应.ico路径。 - 通知 Explorer 刷新文件关联。
通常不需要额外参数。如果你使用的构建没有预先创建任何 ZedI18n.<ext> / Zed.<ext> ProgID,可以显式指定前缀和可执行文件:
Set-ExecutionPolicy -Scope Process Bypass -Force
.\install.ps1 -ProgIdPrefix ZedI18n -ZedExe "C:\Program Files\ZedG\ZedG.exe" -CreateMissingProgIds-CreateMissingProgIds 只在当前用户下创建缺失的 HKCU\Software\Classes\ZedI18n.<ext>,并写入:
shell\open\command->"C:\Program Files\ZedG\ZedG.exe" "%1"DefaultIcon-> 对应 Breeze.icoZedFileIconsOverlayCreated=1标记,供卸载时识别
不会改 UserChoice,不会强行设置默认应用。
如果 Explorer 仍显示旧图标,请注销并重新登录,或清理 Windows 图标缓存。
官方 Zed 默认前缀:
Set-ExecutionPolicy -Scope Process Bypass -Force
.\uninstall.ps1ZedG / 汉化版前缀:
Set-ExecutionPolicy -Scope Process Bypass -Force
.\uninstall.ps1 -ProgIdPrefix ZedI18n -RemoveCreatedProgIds默认卸载只删除本覆盖包写入的 DefaultIcon 键和复制到本机的图标目录。加上 -RemoveCreatedProgIds 时,只会额外删除带有 ZedFileIconsOverlayCreated=1 标记、由本脚本创建的 ProgID。
不一定每次都需要。Zed 更新如果没有重写文件关联,图标会继续保留;如果更新后图标变回默认图标,重新运行对应的 install.ps1 命令即可。脚本是幂等的,可以重复运行。
后续更新 Breeze 图标时请看 AGENT.md。原则是:只替换 file-icons/*.ico 和重新打包 ZedFileIconsOverlay.zip,不要大改 install.ps1 / uninstall.ps1 的注册表策略。
本项目是个人使用的覆盖补丁,不是 Zed 官方项目,也不是 KDE 官方项目。请在符合相关许可的前提下使用和分发 Breeze 图标资产。
Show more specific file-type icons in Windows Explorer for source files associated with Zed / ZedG, instead of showing the same editor icon for every associated file.
This fork uses KDE Breeze Icons styled .ico files and keeps the overlay lightweight: copy icons, write current-user DefaultIcon registry values, and refresh Explorer.
- Targets official Stable Zed on Windows, plus ZedG / localized builds that use
ZedI18n.<ext>ProgIDs. - Affects Windows Explorer / Desktop file icons only.
- Does not change Zed's in-app Project Panel or file-tree icon theme.
- Does not modify Windows protected
UserChoicedefault-app hashes. - By default, only adds
DefaultIconvalues for existingZed.<ext>/ZedI18n.<ext>ProgIDs. - For ZedG-like builds that do not create ProgIDs in advance, use
-CreateMissingProgIdsexplicitly.
- Icon style comes from KDE Breeze Icons: https://develop.kde.org/frameworks/breeze-icons/
- This repository distributes pre-converted Windows
.icofiles. - Some frontend/config file types do not have exact Breeze icons, so the nearest Breeze mimetype icon is used:
- TypeScript / React -> JavaScript
- Vue / Jade -> HTML
- LESS -> CSS
- Bower -> JSON
- PowerShell / shell -> script
- YAML / default / code -> generic text
Download or extract this repository, open PowerShell in the repository directory, then run:
Set-ExecutionPolicy -Scope Process Bypass -Force
.\install.ps1The script auto-detects the current user's Zed file-association prefix, preferring ZedI18n and then falling back to Zed.
The installer script will:
- Check that required
.icofiles exist infile-icons. - Copy icons to
%LOCALAPPDATA%\ZedFileIcons\file-icons. - Set matching
.icopaths underHKCU\Software\Classes\Zed.<ext>\DefaultIcon. - Notify Explorer to refresh shell associations.
Usually no extra arguments are needed. If your build has not pre-created any ZedI18n.<ext> / Zed.<ext> ProgIDs, explicitly pass a prefix and executable path:
Set-ExecutionPolicy -Scope Process Bypass -Force
.\install.ps1 -ProgIdPrefix ZedI18n -ZedExe "C:\Program Files\ZedG\ZedG.exe" -CreateMissingProgIds-CreateMissingProgIds only creates missing HKCU\Software\Classes\ZedI18n.<ext> keys for the current user, then writes:
shell\open\command->"C:\Program Files\ZedG\ZedG.exe" "%1"DefaultIcon-> matching Breeze.icoZedFileIconsOverlayCreated=1marker for safe uninstall detection
It does not touch UserChoice and does not force default-app associations.
If Explorer still shows cached icons, sign out and back in, or clear the Windows icon cache.
Official Zed prefix:
Set-ExecutionPolicy -Scope Process Bypass -Force
.\uninstall.ps1ZedG / localized prefix:
Set-ExecutionPolicy -Scope Process Bypass -Force
.\uninstall.ps1 -ProgIdPrefix ZedI18n -RemoveCreatedProgIdsBy default, uninstall removes only overlay DefaultIcon keys and copied local icons. With -RemoveCreatedProgIds, it additionally removes only ProgIDs marked with ZedFileIconsOverlayCreated=1 by this script.
Not always. If the Zed updater does not rewrite file associations, the icons should stay. If Explorer falls back to the default editor icon after an update, run the matching install.ps1 command again. The script is idempotent.
See AGENT.md for future Breeze icon updates. The intended maintenance pattern is to replace file-icons/*.ico and rebuild ZedFileIconsOverlay.zip only, without large changes to the install.ps1 / uninstall.ps1 registry strategy.
This is a personal overlay patch and is not affiliated with the official Zed project or the KDE project. Use and redistribute Breeze icon assets only when allowed by the relevant licenses.