Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zed Windows File Icons Overlay

中文 | English

中文

让 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 刷新文件关联。

手动指定 / 创建缺失 ProgID

通常不需要额外参数。如果你使用的构建没有预先创建任何 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 .ico
  • ZedFileIconsOverlayCreated=1 标记,供卸载时识别

不会改 UserChoice,不会强行设置默认应用。

如果 Explorer 仍显示旧图标,请注销并重新登录,或清理 Windows 图标缓存。

卸载

官方 Zed 默认前缀:

Set-ExecutionPolicy -Scope Process Bypass -Force
.\uninstall.ps1

ZedG / 汉化版前缀:

Set-ExecutionPolicy -Scope Process Bypass -Force
.\uninstall.ps1 -ProgIdPrefix ZedI18n -RemoveCreatedProgIds

默认卸载只删除本覆盖包写入的 DefaultIcon 键和复制到本机的图标目录。加上 -RemoveCreatedProgIds 时,只会额外删除带有 ZedFileIconsOverlayCreated=1 标记、由本脚本创建的 ProgID。

Zed 更新后是否需要重跑

不一定每次都需要。Zed 更新如果没有重写文件关联,图标会继续保留;如果更新后图标变回默认图标,重新运行对应的 install.ps1 命令即可。脚本是幂等的,可以重复运行。

维护说明

后续更新 Breeze 图标时请看 AGENT.md。原则是:只替换 file-icons/*.ico 和重新打包 ZedFileIconsOverlay.zip,不要大改 install.ps1 / uninstall.ps1 的注册表策略。

说明

本项目是个人使用的覆盖补丁,不是 Zed 官方项目,也不是 KDE 官方项目。请在符合相关许可的前提下使用和分发 Breeze 图标资产。

English

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.

Scope

  • 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 UserChoice default-app hashes.
  • By default, only adds DefaultIcon values for existing Zed.<ext> / ZedI18n.<ext> ProgIDs.
  • For ZedG-like builds that do not create ProgIDs in advance, use -CreateMissingProgIds explicitly.

Icon Source

  • Icon style comes from KDE Breeze Icons: https://develop.kde.org/frameworks/breeze-icons/
  • This repository distributes pre-converted Windows .ico files.
  • 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

Usage

Download or extract this repository, open PowerShell in the repository directory, then run:

Set-ExecutionPolicy -Scope Process Bypass -Force
.\install.ps1

The 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 .ico files exist in file-icons.
  • Copy icons to %LOCALAPPDATA%\ZedFileIcons\file-icons.
  • Set matching .ico paths under HKCU\Software\Classes\Zed.<ext>\DefaultIcon.
  • Notify Explorer to refresh shell associations.

Manual prefix / missing ProgIDs

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 .ico
  • ZedFileIconsOverlayCreated=1 marker 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.

Uninstall

Official Zed prefix:

Set-ExecutionPolicy -Scope Process Bypass -Force
.\uninstall.ps1

ZedG / localized prefix:

Set-ExecutionPolicy -Scope Process Bypass -Force
.\uninstall.ps1 -ProgIdPrefix ZedI18n -RemoveCreatedProgIds

By 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.

Do I Need To Re-run This After Updating Zed?

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.

Maintenance

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.

Notes

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.

About

Windows Explorer file-icon overlay for official Stable Zed, using VS Code-style .ico assets and per-extension DefaultIcon registry entries.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages