@aphrody/m3-os-themes

中文文档
1.4.7发布于 2026/10/23Apache-2.0TypeScriptES Module近 30 天下载 1961

Material 3 OS theme generators and installers (Windows 11, GNOME Shell, COSMIC, Chromium browsers) derived from @aphrody/m3-tokens dynamic colour roles.

原始使用文档

@aphrody/m3-os-themes

Generates and installs Material 3 OS themes (Windows 11, GNOME Shell, COSMIC, Chromium browsers) from a seed colour, with the colour roles of @aphrody/m3-tokens/dynamic-color.

bun add -d @aphrody/m3-os-themes
bunx --bun m3-os-themes generate --target all --seed '#6750a4' --mode auto --out ./m3-os-themes-out

License: Apache-2.0 (LICENSE). Install guide: docs/material/m3/INSTALL.md.

Full usage (in the Aphrody checkout yolo m3 os-themes takes the same arguments):

m3-os-themes <install|generate|uninstall> \
  --target windows|gnome|cosmic|chromium|all --seed '#6750a4' --mode light|dark|auto \
  [--name Aphrody] [--variant tonalSpot] [--out dir] [--icons dir] [--dry-run] [--apply]
  • generate writes only into --out (default ./m3-os-themes-out).
  • --icons <dir> (GNOME and COSMIC) also installs a freedesktop icon theme into ~/.local/share/icons and selects it (gsettings icon-theme; COSMIC com.system76.CosmicTk/v1/icon_theme); --uninstall restores the previous icon theme. Build the full Material Symbols theme with bun packages/material-design-icons/scripts/export-theme.ts --out dist/icons, then pass --icons dist/icons/freedesktop/Aphrody-M3.
  • install and uninstall print the plan and change nothing unless --apply is given. --apply generates the files, then runs the target script for the host OS.
TargetArtifactsInstaller
windowsM3-<name>-{light,dark}.theme, wallpapers, registry values (Themes\Personalize AppsUseLightTheme/SystemUsesLightTheme/ColorPrevalence, DWM AccentColor/ColorizationColor, Explorer\Accent)install-windows.ps1 (snapshot on first run, -Uninstall restores, -WhatIf)
gnome~/.local/share/themes/M3-<name>/{gnome-shell,gtk-3.0,gtk-4.0} CSS, ~/.config/gtk-4.0/gtk.cssinstall-gnome.sh (gsettings: gtk-theme, color-scheme, accent-color, user-theme; --uninstall)
cosmiccosmic-theme ThemeBuilder RON keys under ~/.config/cosmic/com.system76.CosmicTheme.{Dark,Light}.Builder/v1/ and M3-<name>-<mode>.roninstall-cosmic.sh (snapshot, --uninstall)
chromiumMV3 theme {light,dark}/manifest.json + images, BrowserThemeColor policy JSON and .reg for Chrome, Edge, Brave, Chromiuminstall-chromium.sh, install-chromium.md (Load unpacked)

Tests generate everything in memory or in a temp directory and never touch the system: bun test test/. The COSMIC key layout and the GNOME Shell selectors follow the upstream formats and were not exercised on a live COSMIC or GNOME session.

Pending (work item C1): once the Bun fork ships bun:cosmic (cosmic-config read/write), replace the hand-written cosmic-config writes in src/cosmic.ts/install-cosmic.sh and validate the keys through it. Same candidate on the Rust side: the hand-rolled .desktop parser in crates/ui/drive/src/file_opening/linux.rs (vs freedesktop-desktop-entry).

版本与发布记录

@aphrody/m3-os-themes 共发布 8 个版本,首次发布于 2026/10/05;过去 12 个月发布了 8 个版本。

版本发布日期距今
1.4.7latest2026/10/2316 天前
1.4.42026/10/1821 天前
3.3.112026/10/1029 天前
3.3.92026/10/1029 天前
3.3.82026/10/0930 天前
3.3.72026/10/071 个月前

关于 @aphrody/m3-os-themes 的常见问题

@aphrody/m3-os-themes 是什么?

Material 3 OS theme generators and installers (Windows 11, GNOME Shell, COSMIC, Chromium browsers) derived from @aphrody/m3-tokens dynamic colour roles.

如何安装 @aphrody/m3-os-themes?

在项目目录运行 npm install @aphrody/m3-os-themes,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 m3-os-themes,可以用 npx m3-os-themes 直接运行。

@aphrody/m3-os-themes 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aphrody/m3-os-themes 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@aphrody/m3-os-themes 可以商用吗?

@aphrody/m3-os-themes 使用 Apache-2.0 许可。宽松许可:允许商业使用、修改和再分发,并附带明确的专利授权;分发时需保留许可与 NOTICE 文件,修改过的文件要注明改动。以上为概括,不构成法律意见,请以许可原文为准。

@aphrody/m3-os-themes 的下载量有多少?

根据 npm 官方下载统计,@aphrody/m3-os-themes 在 2026/10/06 – 2026/11/04 这 30 天内被下载 1,961 次,日均约 65 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aphrody/m3-os-themes 还在维护吗?

最新版本 1.4.7 发布于 2026/10/23(16 天前);至今共发布 8 个版本,其中过去 12 个月发布了 8 个;首次发布于 2026/10/05。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。