Add custom power icon font to replace circle-slash - #7
Merged
Merged
Conversation
The Openbox mouse policy bound a bare Left press in the Frame context. That
one line swallowed every left click in VS Code while the right and middle
buttons kept working, because Openbox grabs the two window contexts with
different pointer modes (openbox/mouse.c, mouse_grab_for_client):
Frame grab on the frame window, GrabModeAsync
Client grab on the client window, GrabModeSync
Only the synchronous grab is replayed - mouse_replay_pointer() calls
XAllowEvents(ReplayPointer) "to send the event through to the client", and
mouse.c arms it for the client context alone. The asynchronous grab on the
frame consumes the press. On top of that the frame is the client window's
parent, and X activates the outermost of two competing passive grabs, so the
Frame binding also stopped the Client one from ever firing.
Drop the Frame context. Click-to-focus already came from the Client bindings,
which are what upstream's rc.xml uses bare buttons for; upstream binds only
modifier combinations (A-Left and friends) under Frame, for exactly this
reason. The comment left behind says why, so it does not get added back.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K67j2gUu6CKtsw7RisXrFc
The tray's power button drew $(circle-slash), a circle with a diagonal bar through it - a "no entry" sign, not a power symbol. None of codicon's 753 icons is one, so the glyph now comes from a one-glyph font of the shell's own, registered through contributes.icons and used as $(vscodeos-power). It is IEC 5009: a ring broken at the top with a bar rising through the gap. media/icons/build-font.py generates it to codicon's own metrics - 300 units per em, a 19-unit stroke, optically centred on the 16 px box - so it sits at the same size, weight and baseline as the $(plug) and $(volume) glyphs beside it. The woff is 956 bytes and is committed; the generator needs fonttools and only runs if the glyph itself changes, and it pins the head timestamps so a rebuild of an unchanged glyph is a byte-identical file. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K67j2gUu6CKtsw7RisXrFc
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.
Summary
Adds a custom icon font (
vscodeos-icons.woff) containing an IEC 5009 power symbol to replace the inadequatecircle-slashcodicon in the status bar power button. The power symbol is drawn to match codicon's metrics for visual consistency.Key Changes
New icon font generator (
extension/media/icons/build-font.py): Python script that generates a single-glyph WOFF font containing the IEC 5009 power symbol using fontTools. The glyph is carefully designed with:Icon registration (
extension/package.json): Registered the custom power icon undercontributes.iconsasvscodeos-power, pointing to the generated font at character U+E000Status bar update (
extension/src/statusbar/index.ts): Changed power button icon from$(circle-slash)to$(vscodeos-power)with updated comments explaining why a custom font was necessaryBuild script update (
scripts/build-extension.sh): Added installation of the.wofffont file to the packaged extensionDocumentation (
extension/README.md): Added explanation of why the custom font exists and how it's generatedOpenbox config fix (
rootfs-common/etc/skel/.config/openbox/rc.xml): Removed problematic Frame context mouse binding that was consuming left-clicks in the editor; added detailed comment explaining X11 grab semantics and why Frame bindings must be modifier-prefixedImplementation Details
The power glyph uses a broken ring (IEC 5009 standard) with a vertical bar through the gap. Arcs are approximated with quadratic Bezier curves, achieving worst-case radial error of 0.005 units (~0.0003 pixels). The font is committed to the repository; the generator script only needs to run when the glyph design changes.
https://claude.ai/code/session_01K67j2gUu6CKtsw7RisXrFc