fix(shell): synchronize surface card border width with hyprland active border width - #11403
Open
cleon01day wants to merge 1 commit into
Open
cleon01day wants to merge 1 commit into
cleon01day wants to merge 1 commit into
Conversation
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
Synchronize Quickshell surface card border widths with Hyprland active border width tokens, resolving an issue where customizing
general.border_sizein Hyprland leaves shell surfaces stuck at 2px.Context & Problem
In Omarchy, users can customize
general.border_sizein~/.config/hypr/looknfeel.lua(e.g., settingborder_size = 1for a crisp hairline border on high-DPI/Retina screens).However, Quickshell layer surfaces (
omarchy.menu,Osd,NotificationCard,Clipboard,Emojis,ReminderFlow,PolkitAgent) do not track or inherit the active Hyprland border width. Currently, each component passesMath.max(1, Style.space(2))directly toBorder.surfaceSpec, which evaluates to a hardcoded 2px fallback.Although
[hyprland]inshell.toml.tplwas explicitly designed to keep surface cards aligned with Hyprland (# Surface sections reference these so lock, notifications, popups, and menu-style cards stay aligned with the current Hyprland active-border gradient), andBorder.qmlalready contains an uncalled helperhyprlandActiveSpecthat referencesvalue("hyprland", "active-border-width"), this width was never exposed in the template or checked insurfaceWidths.In stock Omarchy, this discrepancy was masked because both Hyprland and Quickshell happened to use
2by default. As soon as a user customizesborder_size, the shell surfaces fall out of visual alignment with application windows.Solution
active-border-widthindefault/themed/shell.toml.tpl:Added
active-border-width = 2under[hyprland]alongside existing border gradient tokens.hyprland.active-border-widthinshell/Commons/Border.qml:In
surfaceWidths, if the section does not define an explicitborder-width, checkvalue("hyprland", "active-border-width")before falling back to the component'sfallbackWidth.[menu] border-width = 1inshell.toml) continue to take top precedence.active-border-widthis omitted (legacy themes), it gracefully falls back tofallbackWidth(Style.space(2)).[controls]/ buttons / tabs) remains completely untouched as it usescontrolSpec.Added
test/shell.d/surface-border-sync-test.shverifying fallback resolution priority across all three tiers.Verification
./test/cli: all 105 tests passed.test/shell.d/surface-border-sync-test.sh: all 5 assertions passed.test/shell.d/border-geometry-test.sh,button-border-stability-test.sh, androw-border-stability-test.sh: all passed.