Repository navigation
feat: ship a sketchybar-app-font glyph set and match app name prefixes - #27
Merged
Merged
Conversation
|
🎉 This PR is included in version 0.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Using sketchybar-app-font in workspace widgets means writing its 880-name map into
appGlyphsby hand. Matching is also exact, while 11 of the font's names are wildcards such asAdobe Bridge*. Fixes #20.Changes
examples/modules/sketchybar-app-font.jsonis generated from the font's v3.0.8icon_map.json(CC0-1.0). It sets theappGlyphstoken, with 880 app names plus"*": ":default:", and asketchybarAppFontVersiontoken. A workspace widget opts in with"appGlyphs": "@token.appGlyphs", and roottokens.appGlyphsentries merge into the map.scripts/update-app-glyphs.shregenerates the module from the font's latest release, using zsh, curl and the system perl, with no new dependencies. Keys are sorted, so regenerating gives small diffs.*matches app names that start with the rest of the key. Exact bundle IDs and names win, then the longest such key, and a bare*is the fallback (appGlyph(for:in:)inBarView.swift). AeroSpace and yabai workspaces both use it.appGlyphsalso accepts a token reference.Testing
swift test: 103 passed, including a newWidgetTestscase for exact over longest prefix over fallback, and for no glyph when there is no*.StableBar --validateaccepts the module on its own, through an include and a nested include, and with root entries merged in. It rejects a non-string root entry, which shows the token resolves to the whole map.icon_map.json: every name maps to its icon.Notes:
font-sketchybar-app-fontcask is at 3.0.7, one release behind the module, so the newest glyphs may be missing with it.Merging
One commit, so any merge method keeps it in the changelog.
Claude Opus 5.5 via Claude Code