Make every control tell the truth
The audit's first tier, in one change: every case found where the interface
asserted something the system did not do.
Twenty-one compositor-owned preferences -- the whole Mouse & Touchpad page,
plus window layout, snapping, dim-inactive and the magnifier -- had the live
half (hyprctl eval) and not the config-time half, so they quietly reverted on
every hyprctl reload. All 70 hypr-backed keys now have a prefs.get() in the
Lua, and hypr-prefs-contract pins both the presence and that the Lua fallback
equals the schema default, which is how the touchpad page misreported natural
scrolling on first boot.
The idle generator fell back from unwritten battery keys to the AC values
while the Power page displayed the schema defaults: a fresh laptop showed
"suspend at 20 minutes" and generated no suspend listener, then discharged to
zero in a bag. Unwritten keys now use the defaults the page shows
(idle-defaults-contract pins generator to schema; idle-config-contract
re-pinned to the new rule with the tradeoff recorded), and change-settings
enables managed idle on any machine with a battery -- without starting
hypridle in whatever session the installer runs under.
The per-app lock-screen notification switches wrote fields nothing read:
hyprlock cannot render notifications. Removed, with the rule model shrunk to
{enabled}, stale stored fields dropped at normalization, and the contract now
forbidding the page from growing lock-screen switches it cannot honor.
The battery warning thresholds were searchable, documented as "Found on
Power & Lock", and rendered nowhere -- and crossing the low threshold changed
only a glyph's color. Both sliders now exist where search was already sending
people, and low battery publishes a real notification at important priority.
Three handoffs opened GNOME panels that are inert in a Hyprland session. The
keyboard handoff is gone (that panel writes gsettings nothing here reads, and
the working controls sat on the same page); Connectivity gains a Wi-Fi row
that opens GNOME's actual Wi-Fi panel -- hidden SSIDs and 802.1X finally have
a road -- beside the network row that legitimately drives NetworkManager; the
universal-access handoff is gone, its few working toggles being controls this
app already owns. And the accessibility page now gives the true reason sticky
keys are missing: each Wayland compositor implements its own and Hyprland
does not yet -- not "an X11 feature with no Wayland equivalent," which sent
people to the wrong conclusion about the platform.
Claude-Session: https://claude.ai/code/session_01Epx9ZC1gwm81K3jm9x9CKh
This commit is contained in:
@@ -35,12 +35,39 @@ hl.config({
|
||||
-- Still focus-follows-pointer, just less twitchy.
|
||||
mouse_refocus = false,
|
||||
|
||||
-- Flat pointer response, no acceleration. Matters for gaming.
|
||||
-- Flat pointer response by default, no acceleration. Matters for
|
||||
-- gaming; Settings offers adaptive for people who want it back.
|
||||
sensitivity = prefs.get("pointerSensitivity", 0),
|
||||
accel_profile = "flat",
|
||||
accel_profile = prefs.get("accelProfile", "flat"),
|
||||
|
||||
natural_scroll = prefs.get("naturalScroll", false),
|
||||
scroll_factor = prefs.get("scrollFactor", 1.0),
|
||||
left_handed = prefs.get("leftHanded", false),
|
||||
|
||||
-- Clicking a floating window raises and focuses it.
|
||||
float_switch_override_focus = 2,
|
||||
|
||||
-- Every touchpad preference Settings offers is read here as well as
|
||||
-- applied live: the live half (hyprctl eval) reaches a running
|
||||
-- compositor, and THIS half is what survives `hyprctl reload` and the
|
||||
-- gap before the shell starts. A schema `hypr:` entry without a
|
||||
-- prefs.get() here is a control that quietly reverts -- the whole
|
||||
-- Mouse & Touchpad page once had exactly that bug. Defaults must
|
||||
-- match PreferenceSchema's; the hypr-prefs-contract checks both.
|
||||
touchpad = {
|
||||
tap_to_click = prefs.get("touchpadTapToClick", true),
|
||||
natural_scroll = prefs.get("touchpadNaturalScroll", true),
|
||||
disable_while_typing = prefs.get("touchpadDisableWhileTyping", true),
|
||||
scroll_factor = prefs.get("touchpadScrollFactor", 1.0),
|
||||
drag_lock = prefs.getInt("touchpadDragLock", 0),
|
||||
middle_button_emulation = prefs.get("touchpadMiddleButtonEmulation", false),
|
||||
},
|
||||
},
|
||||
|
||||
-- Tuning for the three-finger gestures registered below.
|
||||
gestures = {
|
||||
workspace_swipe_distance = prefs.getInt("swipeDistance", 300),
|
||||
workspace_swipe_invert = prefs.get("swipeInvert", true),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -68,10 +68,10 @@ hl.config({
|
||||
-- Harmless on its own; tearing only happens where a rule opts in.
|
||||
allow_tearing = true,
|
||||
|
||||
layout = "dwindle",
|
||||
layout = prefs.get("windowLayout", "dwindle"),
|
||||
|
||||
snap = {
|
||||
enabled = true,
|
||||
enabled = prefs.get("windowSnapping", true),
|
||||
window_gap = prefs.getInt("snapWindowGap", 10),
|
||||
monitor_gap = prefs.getInt("snapMonitorGap", 10),
|
||||
respect_gaps = prefs.get("snapRespectGaps", false),
|
||||
@@ -88,6 +88,10 @@ hl.config({
|
||||
fullscreen_opacity = prefs.get("fullscreenOpacity", 1.0),
|
||||
inactive_opacity = prefs.get("inactiveOpacity", 1.0),
|
||||
|
||||
-- Accessibility: dim every window but the focused one.
|
||||
dim_inactive = prefs.get("dimInactive", false),
|
||||
dim_strength = prefs.get("dimStrength", 0.5),
|
||||
|
||||
blur = {
|
||||
enabled = prefs.get("blurEnabled", true),
|
||||
size = prefs.get("blurSize", 8),
|
||||
@@ -150,6 +154,7 @@ hl.config({
|
||||
-- to how the Forge extension behaved on GNOME.
|
||||
preserve_split = prefs.get("preserveSplit", true),
|
||||
smart_resizing = true,
|
||||
force_split = prefs.getInt("forceSplit", 0),
|
||||
},
|
||||
|
||||
-- Only in effect when the tiling layout is "master". Panama ships dwindle,
|
||||
@@ -193,7 +198,11 @@ hl.config({
|
||||
allow_session_lock_restore = true,
|
||||
|
||||
-- Don't let apps steal focus by shouting; matches GNOME's behavior.
|
||||
focus_on_activate = false,
|
||||
focus_on_activate = prefs.get("focusOnActivate", false),
|
||||
|
||||
-- Whether pointing at another monitor is enough to move focus there,
|
||||
-- or it takes a click. GNOME moves on pointer; both are offered.
|
||||
mouse_move_focuses_monitor = prefs.get("mouseMoveFocusesMonitor", true),
|
||||
|
||||
-- Window swallowing: a terminal hides itself while a graphical
|
||||
-- application launched from it is open, and comes back when that
|
||||
@@ -237,6 +246,10 @@ hl.config({
|
||||
|
||||
-- Fade the cursor out after 4s of no movement, like GNOME does.
|
||||
inactive_timeout = prefs.get("cursorInactiveTimeout", 4),
|
||||
|
||||
-- The accessibility magnifier. 1.0 = off.
|
||||
zoom_factor = prefs.get("magnifierFactor", 1.0),
|
||||
zoom_rigid = prefs.get("magnifierRigid", false),
|
||||
},
|
||||
|
||||
ecosystem = {
|
||||
|
||||
Reference in New Issue
Block a user