Stage 3 and 4 of docs/superpowers/plans/2026-08-17-panama-cohesion.md. Add SettingsPage plus ToggleRow, SliderRow, ChoiceRow, ActionRow, and TextRow. A row names a schema key and needs nothing else: label, detail, range, and unit come from PreferenceSchema, and writes go through SystemSettings.commitPreference, which routes compositor-backed keys through apply-and-verify and local keys straight to the store. The page scaffold that was copy-pasted eleven times is now one component. Rebuild Appearance around a live preview of the real desktop, scaled by the ratio between the preview and the actual monitor so a 10px gap on a 4500px display looks as small as it is. Rebuild Desktop & Dock and Input & Shortcuts on the shared rows, replacing the read-only text that stood in for controls that were merely expensive to add. Generate the shortcut list from hyprctl binds. The page held a hand-typed nineteen entries against a real keymap of a hundred and thirteen; it could not show the rest and went stale whenever a bind changed. Every bind now carries its own description -- backfilled for the twenty-nine that lacked one -- and keybinds-contract.sh fails if any bind lacks one, since undescribed binds are dropped from the page. Make Restore defaults span every store Panama owns. Resetting only the schema store left the Home accessory arrangement customised while claiming to restore defaults, which is worse than no reset because it is silent. Done through HomePreferences' existing public aliases rather than a new API. Four defects found while building: cursor:inactive_timeout is answered by getoption as float, not int. A wrong readAs does not fail loudly; it makes every write to that key look rejected, and the user saw an error for a change that worked. schema-hypr-shape-contract.sh now checks all 23 mapped options against the running compositor. The Settings window is tiled, so implicitWidth is only a hint and rows must survive roughly 400px. SliderRow stacks its control under the label below 520px. Binding an anchor to undefined to switch layouts does not reliably release it. Both row layouts are positioned explicitly. Concurrent compositor writes are queued and merged rather than refused. The startup replay of every compositor-backed preference routinely overlaps a UI change, and refusing left the store and the compositor disagreeing. Claude-Session: https://claude.ai/code/session_01BRvzt4H8XXLPVH5MyYdk9L
95 lines
3.4 KiB
QML
95 lines
3.4 KiB
QML
// Appearance — the page the rest of the settings vocabulary was built for.
|
|
//
|
|
// Before Stage 3 this page adjusted a clock format and three vitals toggles,
|
|
// and its "Theme" card was two rows of text pretending to be controls. It now
|
|
// drives the compositor directly: every row here is applied through
|
|
// `hyprctl eval` and confirmed by reading the value back before it is stored.
|
|
//
|
|
// The preview is pinned above the controls rather than sitting inline, because
|
|
// the numbers are meaningless on their own -- "outer gaps 24" only means
|
|
// something once you have watched the windows move apart by that much, at the
|
|
// scale of the display you actually use.
|
|
|
|
import QtQuick
|
|
import qs.config
|
|
import qs.services
|
|
|
|
SettingsPage {
|
|
id: root
|
|
|
|
title: "Appearance"
|
|
lede: "Drag anything below. The preview above is your real geometry, to scale."
|
|
|
|
header: Component {
|
|
Column {
|
|
spacing: 9
|
|
|
|
DesktopPreview {
|
|
width: parent.width
|
|
}
|
|
|
|
Text {
|
|
width: parent.width
|
|
horizontalAlignment: Text.AlignHCenter
|
|
text: SystemSettings.lastError !== ""
|
|
? SystemSettings.lastError
|
|
: "Live preview — the focused window wears the prism border"
|
|
color: SystemSettings.lastError !== "" ? Theme.warn : Theme.fgMuted
|
|
font.family: Theme.fontFamily
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
elide: Text.ElideRight
|
|
}
|
|
}
|
|
}
|
|
|
|
SettingsCard {
|
|
title: "Windows"
|
|
subtitle: "Spacing and shape of tiled windows. Each change is applied to the compositor and confirmed before it is saved."
|
|
|
|
SliderRow { setting: "windowRounding" }
|
|
SliderRow { setting: "gapsIn" }
|
|
SliderRow { setting: "gapsOut" }
|
|
SliderRow { setting: "borderSize"; zeroLabel: "None" }
|
|
SliderRow { setting: "inactiveOpacity"; divider: false }
|
|
}
|
|
|
|
SettingsCard {
|
|
title: "Effects"
|
|
subtitle: "Each of these costs frame time. Turning one off is a legitimate way to buy it back while gaming."
|
|
|
|
ToggleRow { setting: "blurEnabled" }
|
|
SliderRow { setting: "blurSize" }
|
|
SliderRow { setting: "blurPasses" }
|
|
ToggleRow { setting: "shadowEnabled" }
|
|
SliderRow { setting: "shadowRange"; zeroLabel: "None" }
|
|
ToggleRow { setting: "glowEnabled" }
|
|
SliderRow { setting: "glowRange"; zeroLabel: "None" }
|
|
ToggleRow { setting: "animationsEnabled"; divider: false }
|
|
}
|
|
|
|
SettingsCard {
|
|
title: "Clock"
|
|
|
|
ToggleRow { setting: "use24Hour" }
|
|
ToggleRow { setting: "showSeconds" }
|
|
ToggleRow { setting: "showWeekday"; divider: false }
|
|
}
|
|
|
|
SettingsCard {
|
|
title: "System vitals"
|
|
subtitle: "Choose what appears beside the workspace indicator."
|
|
|
|
ToggleRow { setting: "showCpu" }
|
|
ToggleRow { setting: "showMemory" }
|
|
ToggleRow { setting: "showGpu"; divider: false }
|
|
}
|
|
|
|
SettingsCard {
|
|
title: "Theme"
|
|
subtitle: "Panama has one curated visual identity rather than a matrix of partially compatible themes. The controls above adjust its parameters — how much space, how soft, how much motion — without replacing it."
|
|
|
|
TextRow { label: "Color palette"; detail: "Tokyo Night Moon"; value: "Prism" }
|
|
TextRow { label: "Interface type"; detail: "Adwaita Sans"; value: "System"; divider: false }
|
|
}
|
|
}
|