- C++ 82.6%
- JavaScript 10%
- Python 6.4%
- Objective-C++ 0.8%
- CSS 0.1%
- Other 0.1%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docs | ||
| patches | ||
| scripts | ||
| yttrium | ||
| .gclient | ||
| .gitignore | ||
| CHROMIUM_REVISION | ||
| README.md | ||
Yttrium
A keyboard-driven, tiling Chromium for macOS: no tab strip, no toolbar, every
tab is a pane in a Hyprland-style tiling layout (scrolling columns by default),
workspaces backed by tab groups, hint mode, a floating command palette (urls with
history completion, bangs, extensions and every action), and full uBlock Origin built in. Configured in
~/.config/yttrium/config.
Opening panes from the command palette, scrolling the column strip, hints,
the fibonacci layout, a second workspace with a !ddg bang, and the
workspace switcher.
Layout
This repo is the gclient root. Chromium itself is not tracked here.
.gclient gclient config (Chromium checkout lives in src/)
CHROMIUM_REVISION upstream Chromium commit the patches apply to
yttrium/ our code; symlinked into Chromium as src/yttrium (//yttrium)
ui/ tiling, workspaces, hints, command palette, config (//yttrium/ui)
renderer/ renderer helpers for the injected scripts (//yttrium/renderer)
third_party/ublock_origin/ uBO vendoring (src/ is fetched, not tracked)
editor/ source viewer page: CodeMirror 6 + @gregorlohaus/codemirror-helix
(dist/ is built by `yt apply`: npm ci && npm run build)
branding/ icon master SVG + layers
tools/make_icon.py generates every icon asset
patches/ one patch per Chromium file we change or add
scripts/yt the developer tool (below)
src/ Chromium (ignored)
Why not a git submodule / git-subtrac for Chromium: the patched Chromium would have to be a commit somewhere, and git-subtrac would pull Chromium's entire history (tens of GB) into this repo. Pinning a revision and keeping per-file patches is what Brave and ungoogled-chromium do; it keeps this repo small and rebases reviewable.
Workflow
Edit Chromium files in src/ as usual, then:
scripts/yt status # which Chromium changes aren't in patches/ yet
scripts/yt export # write them to patches/ (then commit here)
scripts/yt build # build out/Release/Yttrium.app (niced, leaves a core free)
scripts/yt run # run it
Fresh checkout:
gclient sync # clones Chromium into src/ (once)
scripts/yt sync # check out CHROMIUM_REVISION, gclient sync, apply patches
Moving to a new Chromium revision (yt reset diffs against the revision in
CHROMIUM_REVISION, so it runs before that changes):
scripts/yt status # must list nothing: else `yt export` and commit first
scripts/yt reset # drop our changes from src/ (back to the old revision)
echo <new rev> > CHROMIUM_REVISION
scripts/yt sync # fetch + check out the new revision, gclient sync, apply
yt apply applies each patch with git apply --3way: a patch whose
surroundings changed upstream is merged against the version it was made from
instead of being rejected. Real conflicts are left in src/ as <<<<<<<
markers and listed; resolve them (or port a patch by hand where the file is
unchanged), yt export (it skips files that still have markers), build, and
commit CHROMIUM_REVISION with patches/.
yt apply also builds the editor bundle (needs node/npm), regenerates the
icon assets (they are build products of yttrium/tools/make_icon.py, never
patches) and fetches uBlock Origin, each only when it is missing.
Updating uBlock Origin (the release zip from gorhill/uBlock; src/ is
fetched, only VERSION and the generated files.gni are tracked):
yttrium/third_party/ublock_origin/update.py [VERSION] # default: latest
scripts/yt build # then commit VERSION and files.gni
Updating CodeMirror and the Helix keys (package-lock.json pins them;
dist/ and node_modules/ are not tracked):
cd yttrium/editor
npm outdated # what is newer
npm update # within package.json's ranges (npm install pkg@latest
# for a new major)
npm run build # dist/editor.js
scripts/yt build # then commit package.json and package-lock.json
On another checkout, after pulling one of those bumps, rerun
update.py $(cat yttrium/third_party/ublock_origin/VERSION) or
npm ci && npm run build: yt apply won't, since the old ones are there.
Build setup: out/Release/args.gn uses ccache (cc_wrapper = "ccache"), a
component release build without symbols, plus media support:
proprietary_codecs = true # H.264 / AAC / HEVC
ffmpeg_branding = "Chrome"
enable_widevine = true # DRM; the CDM itself is not built
The Widevine CDM is downloaded by Chromium's component updater on first use,
or can be copied from Chrome to skip the wait:
.../Google Chrome Framework.framework/Versions/Current/Libraries/WidevineCdm
→ ~/Library/Application Support/Yttrium/WidevineCdm/<version from its manifest.json>/.
Yttrium isn't VMP-signed by Google, so some streaming services may refuse
licenses or limit quality.
