Expose 19 more compositor options that only looks.lua could reach
Measured the gap first: of the 38 real Hyprland options Panama's own Lua
sets, only 16 were editable in Settings. Everything else required a text
editor, which is the thing this app exists to stop. This closes most of
that: 66 mapped options now, from 47.
Window shape and shadows on Appearance: corner shape (rounding_power),
focused and fullscreen opacity, shadow falloff and hard-edged shadows.
Window edges, master layout and Hyprland's own notices on Desktop & Dock.
Three of these are corrections rather than additions.
Master layout options existed nowhere, while Settings has offered "Master
and stack" as a choice since this morning -- a layout you can select and
cannot configure is barely a choice. Its card is hidden unless that
layout is actually selected, since settings that do nothing under the
layout you are running are worse than not offering the layout at all.
The four Hyprland notices -- logo, splash, update news, donation nag --
are all turned off by looks.lua on the user's behalf. Defensible as a
default, but not a decision anyone could reverse. They are stored
positively ("show this") and written as Hyprland's `disable_*` through a
new `invert` flag, because a switch labelled "Disable splash text" that
must be ON to hide something is a small cruelty. The Lua does the same
inversion so both sides agree.
Everything new also reads from prefs in looks.lua. Without that these
would apply live and silently revert on the next compositor reload,
which is the failure this codebase keeps designing against.
Two shapes the write path had never seen. Border colours are gradients
and shadow offsets are vec2, and the verifier understood neither -- it
returned false for anything outside int/bool/float/str/css, so both
would have reported every write as rejected. Gradients also need real
care: the stubs declare them as `string|{colors,angle}`, and the string
form carries only ONE stop, so writing "rgba(a) rgba(b) 45deg" as a
string is accepted and keeps the previous value. Verified that directly.
They are also written in one notation and read back in another
(`{colors={"rgba(3b426199)"},angle=45}` becomes `993b4261 45deg`), so
comparison normalises both sides.
Border COLOUR is deliberately not exposed yet. col.inactive_border is
written by ColorScheme on every scheme change, so a user's choice would
be silently overwritten, and col.active_border is the Prism gradient,
which needs a colour control this app does not have. Shadow offset is
left out for the same reason -- the vec2 support is in place for
whenever the widget exists.
Verified each new option applies and reverts against the live
compositor, and that the schema, enum-map, nav, write and commit/reset
contracts all pass.
Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L
This commit is contained in:
@@ -206,6 +206,147 @@ Singleton {
|
||||
hypr: { path: ["decoration", "inactive_opacity"], option: "decoration:inactive_opacity", readAs: "float" }
|
||||
},
|
||||
|
||||
{
|
||||
key: "activeOpacity", type: "real", def: 1.0, min: 0.5, max: 1.0, step: 0.05,
|
||||
group: "windows",
|
||||
label: "Focused window opacity",
|
||||
detail: "Fade even the focused window; 1.0 is fully opaque",
|
||||
hypr: { path: ["decoration", "active_opacity"], option: "decoration:active_opacity", readAs: "float" }
|
||||
},
|
||||
{
|
||||
key: "fullscreenOpacity", type: "real", def: 1.0, min: 0.5, max: 1.0, step: 0.05,
|
||||
group: "windows",
|
||||
label: "Fullscreen opacity",
|
||||
detail: "Applied instead of the focused opacity when a window is fullscreen",
|
||||
hypr: { path: ["decoration", "fullscreen_opacity"], option: "decoration:fullscreen_opacity", readAs: "float" }
|
||||
},
|
||||
{
|
||||
key: "roundingPower", type: "real", def: 2.0, min: 2.0, max: 10.0, step: 0.5,
|
||||
group: "windows",
|
||||
label: "Corner shape",
|
||||
detail: "2 is a circular corner; higher values approach a squircle",
|
||||
hypr: { path: ["decoration", "rounding_power"], option: "decoration:rounding_power", readAs: "float" }
|
||||
},
|
||||
|
||||
// ── Window edges ────────────────────────────────────────────────────
|
||||
// How the pointer interacts with a window's border, and how windows
|
||||
// behave near each other. All shipped by looks.lua with no way to
|
||||
// change any of it.
|
||||
{
|
||||
key: "resizeOnBorder", type: "bool", def: true, group: "edges",
|
||||
label: "Resize by dragging the border",
|
||||
detail: "Drag a window's edge to resize it, instead of only with the keyboard",
|
||||
hypr: { path: ["general", "resize_on_border"], option: "general:resize_on_border", readAs: "bool" }
|
||||
},
|
||||
{
|
||||
key: "borderGrabArea", type: "int", def: 15, min: 0, max: 40, step: 1,
|
||||
unit: "px",
|
||||
group: "edges",
|
||||
label: "Border grab area",
|
||||
detail: "How far outside the border still counts as grabbing it. Larger is easier to hit",
|
||||
hypr: { path: ["general", "extend_border_grab_area"], option: "general:extend_border_grab_area", readAs: "int" }
|
||||
},
|
||||
{
|
||||
key: "hoverIconOnBorder", type: "bool", def: true, group: "edges",
|
||||
label: "Show the resize cursor",
|
||||
detail: "Change the pointer when it is over a resizable border",
|
||||
hypr: { path: ["general", "hover_icon_on_border"], option: "general:hover_icon_on_border", readAs: "bool" }
|
||||
},
|
||||
{
|
||||
key: "snapWindowGap", type: "int", def: 10, min: 0, max: 60, step: 1,
|
||||
unit: "px",
|
||||
group: "edges",
|
||||
label: "Snap distance between windows",
|
||||
detail: "How close two floating windows must be before they snap together",
|
||||
hypr: { path: ["general", "snap", "window_gap"], option: "general:snap:window_gap", readAs: "int" }
|
||||
},
|
||||
{
|
||||
key: "snapMonitorGap", type: "int", def: 10, min: 0, max: 60, step: 1,
|
||||
unit: "px",
|
||||
group: "edges",
|
||||
label: "Snap distance to screen edges",
|
||||
detail: "How close a floating window must be to an edge before it snaps to it",
|
||||
hypr: { path: ["general", "snap", "monitor_gap"], option: "general:snap:monitor_gap", readAs: "int" }
|
||||
},
|
||||
{
|
||||
key: "snapRespectGaps", type: "bool", def: false, group: "edges",
|
||||
label: "Snapping respects gaps",
|
||||
detail: "Snapped windows keep the configured gap instead of touching",
|
||||
hypr: { path: ["general", "snap", "respect_gaps"], option: "general:snap:respect_gaps", readAs: "bool" }
|
||||
},
|
||||
|
||||
// ── Master layout ───────────────────────────────────────────────────
|
||||
// Only meaningful when the tiling layout is Master and stack. Offering
|
||||
// that layout with none of its options was an omission: it is the one
|
||||
// layout whose whole behaviour is in these settings.
|
||||
{
|
||||
key: "masterFactor", type: "real", def: 0.55, min: 0.1, max: 0.9, step: 0.05,
|
||||
group: "master",
|
||||
label: "Master area size",
|
||||
detail: "How much of the screen the master window takes",
|
||||
hypr: { path: ["master", "mfact"], option: "master:mfact", readAs: "float" }
|
||||
},
|
||||
{
|
||||
key: "masterOrientation", type: "enum", def: "left", group: "master",
|
||||
label: "Master area position",
|
||||
detail: "Which side of the screen the master window occupies",
|
||||
options: [
|
||||
{ value: "left", label: "Left" },
|
||||
{ value: "right", label: "Right" },
|
||||
{ value: "top", label: "Top" },
|
||||
{ value: "bottom", label: "Bottom" },
|
||||
{ value: "center", label: "Centre" }
|
||||
],
|
||||
hypr: { path: ["master", "orientation"], option: "master:orientation", readAs: "str" }
|
||||
},
|
||||
{
|
||||
key: "masterNewStatus", type: "enum", def: "slave", group: "master",
|
||||
label: "New windows become",
|
||||
detail: "Whether a new window takes the master area or joins the stack",
|
||||
options: [
|
||||
{ value: "master", label: "The master window" },
|
||||
{ value: "slave", label: "Part of the stack" },
|
||||
{ value: "inherit", label: "Whatever the focused window is" }
|
||||
],
|
||||
hypr: { path: ["master", "new_status"], option: "master:new_status", readAs: "str" }
|
||||
},
|
||||
{
|
||||
key: "masterNewOnTop", type: "bool", def: false, group: "master",
|
||||
label: "Add new windows at the top",
|
||||
detail: "New stack windows go above the others rather than below",
|
||||
hypr: { path: ["master", "new_on_top"], option: "master:new_on_top", readAs: "bool" }
|
||||
},
|
||||
|
||||
// ── Hyprland's own notices ──────────────────────────────────────────
|
||||
// Panama turns all four off on the user's behalf. That is a defensible
|
||||
// default and was not a decision anyone could reverse without editing
|
||||
// looks.lua, which is precisely the kind of thing this app exists to
|
||||
// stop.
|
||||
{
|
||||
key: "hyprlandLogo", type: "bool", def: false, group: "notices",
|
||||
label: "Hyprland wallpaper",
|
||||
detail: "The stock background Hyprland draws when no wallpaper is set",
|
||||
hypr: { path: ["misc", "disable_hyprland_logo"], option: "misc:disable_hyprland_logo", readAs: "bool", invert: true }
|
||||
},
|
||||
{
|
||||
key: "hyprlandSplash", type: "bool", def: false, group: "notices",
|
||||
label: "Splash text",
|
||||
detail: "The line of text Hyprland renders over the stock background",
|
||||
hypr: { path: ["misc", "disable_splash_rendering"], option: "misc:disable_splash_rendering", readAs: "bool", invert: true }
|
||||
},
|
||||
{
|
||||
key: "hyprlandUpdateNews", type: "bool", def: false, group: "notices",
|
||||
label: "Update announcements",
|
||||
detail: "The window Hyprland opens after an update to describe what changed",
|
||||
hypr: { path: ["ecosystem", "no_update_news"], option: "ecosystem:no_update_news", readAs: "bool", invert: true }
|
||||
},
|
||||
{
|
||||
key: "hyprlandDonationNag", type: "bool", def: false, group: "notices",
|
||||
label: "Donation reminders",
|
||||
detail: "The prompt Hyprland shows twice a year asking for support",
|
||||
hypr: { path: ["ecosystem", "no_donation_nag"], option: "ecosystem:no_donation_nag", readAs: "bool", invert: true }
|
||||
},
|
||||
|
||||
// ── Effects ─────────────────────────────────────────────────────────
|
||||
{
|
||||
key: "blurEnabled", type: "bool", def: true, group: "effects",
|
||||
@@ -241,6 +382,19 @@ Singleton {
|
||||
detail: "How far the shadow spreads from the window edge",
|
||||
hypr: { path: ["decoration", "shadow", "range"], option: "decoration:shadow:range", readAs: "int" }
|
||||
},
|
||||
{
|
||||
key: "shadowSharp", type: "bool", def: false, group: "effects",
|
||||
label: "Hard-edged shadow",
|
||||
detail: "A crisp shadow instead of a soft falloff",
|
||||
hypr: { path: ["decoration", "shadow", "sharp"], option: "decoration:shadow:sharp", readAs: "bool" }
|
||||
},
|
||||
{
|
||||
key: "shadowRenderPower", type: "int", def: 3, min: 1, max: 4, step: 1,
|
||||
group: "effects",
|
||||
label: "Shadow falloff",
|
||||
detail: "How sharply the shadow fades out. Higher is tighter to the window",
|
||||
hypr: { path: ["decoration", "shadow", "render_power"], option: "decoration:shadow:render_power", readAs: "int" }
|
||||
},
|
||||
{
|
||||
key: "glowEnabled", type: "bool", def: true, group: "effects",
|
||||
label: "Focus glow",
|
||||
|
||||
Reference in New Issue
Block a user