Convert British spellings to American across the repo
colour -> color, behaviour -> behavior, centre -> center, favourite -> favorite, and about twenty other pairs, applied consistently across comments, docs, error/UI copy, and a handful of QML identifiers that used the British spelling as their actual name: SystemSettings' serialiseValue/serialiseTable/normaliseGradient, Displays' normaliseModes, Wallpaper's normalisePolicy, SettingsBackup's serialiseHomeState, DateTime's ntpSynchronised property, Clipboard's _normalise helper, and ShortcutCapture's cancelled signal (with its onCancelled handler in ShortcutsPage.qml). Every call site and the two tests that assert on the literal source text (settings-ownership and settings-backup-live contracts) were updated in lockstep. Left untouched: config/dot/espanso/match/packages/misspell-en/ is a vendored third-party autocorrect dictionary -- its entries are typo corrections, not our prose, and rewriting them would fight the package's own purpose (and any future re-sync from upstream). The already-American `favorites` property (Home page pinned accessories) was never actually misspelled -- only nearby comments and error strings said "favourites" -- so no data migration was needed there. Claude-Session: https://claude.ai/code/session_01E6TJUAh41HaP25MVHWkhRZ
This commit is contained in:
@@ -101,7 +101,7 @@ Singleton {
|
||||
const raw = (parsed && typeof parsed === "object") ? parsed : {};
|
||||
|
||||
// Upgrade before anything reads a value. A stored key the current
|
||||
// schema no longer recognises is carried through untouched and silently
|
||||
// schema no longer recognizes is carried through untouched and silently
|
||||
// stops taking effect, so the conversion has to happen here rather than
|
||||
// being noticed later by whoever owns that setting.
|
||||
const result = Migrations.apply(raw);
|
||||
|
||||
@@ -19,7 +19,7 @@ Singleton {
|
||||
printErrors: false
|
||||
atomicWrites: true
|
||||
onSaved: root.saveError = ""
|
||||
onSaveFailed: error => root.saveError = "Could not save Home favourites."
|
||||
onSaveFailed: error => root.saveError = "Could not save Home favorites."
|
||||
|
||||
JsonAdapter {
|
||||
id: values
|
||||
|
||||
@@ -5,7 +5,7 @@ pragma Singleton
|
||||
// The schema is the single source of truth for what a setting IS, but it cannot
|
||||
// describe what a setting USED to be. Renaming a key, changing its units, or
|
||||
// splitting one setting into two all leave a stored value that the new schema
|
||||
// does not recognise -- and an unrecognised key is silently carried through
|
||||
// does not recognize -- and an unrecognized key is silently carried through
|
||||
// untouched, so the user's choice simply stops taking effect with nothing to
|
||||
// say why. That is the failure this exists to prevent.
|
||||
//
|
||||
|
||||
@@ -171,7 +171,7 @@ Singleton {
|
||||
unit: "px",
|
||||
group: "windows",
|
||||
label: "Inner gaps",
|
||||
detail: "Space between neighbouring tiled windows",
|
||||
detail: "Space between neighboring tiled windows",
|
||||
hypr: { path: ["general", "gaps_in"], option: "general:gaps_in", readAs: "css" }
|
||||
},
|
||||
{
|
||||
@@ -278,7 +278,7 @@ Singleton {
|
||||
// ── 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.
|
||||
// layout whose whole behavior is in these settings.
|
||||
{
|
||||
key: "masterFactor", type: "real", def: 0.55, min: 0.1, max: 0.9, step: 0.05,
|
||||
group: "master",
|
||||
@@ -295,7 +295,7 @@ Singleton {
|
||||
{ value: "right", label: "Right" },
|
||||
{ value: "top", label: "Top" },
|
||||
{ value: "bottom", label: "Bottom" },
|
||||
{ value: "center", label: "Centre" }
|
||||
{ value: "center", label: "Center" }
|
||||
],
|
||||
hypr: { path: ["master", "orientation"], option: "master:orientation", readAs: "str" }
|
||||
},
|
||||
@@ -429,7 +429,7 @@ Singleton {
|
||||
{
|
||||
key: "keyboardVariant", type: "string", def: "", group: "input",
|
||||
// Same shape as the layout list and for the same reason: this is
|
||||
// serialised into an hl.config string.
|
||||
// serialized into an hl.config string.
|
||||
pattern: "^$|^[a-z0-9_]{1,24}(,[a-z0-9_]{1,24})*$",
|
||||
label: "Layout variant",
|
||||
detail: "XKB variant, such as dvorak or colemak. Empty for the standard layout",
|
||||
@@ -475,7 +475,7 @@ Singleton {
|
||||
// The compositor publishes the authoritative mapping itself --
|
||||
// `hyprctl descriptions` gives
|
||||
// map: [{"separate":3},{"detached":2},{"follow":1},{"disabled":0}]
|
||||
// -- so a desktop labelled "Click to focus" was in fact following
|
||||
// -- so a desktop labeled "Click to focus" was in fact following
|
||||
// the pointer, and the way to actually get click-to-focus was to
|
||||
// choose "Never". Value 3 was missing entirely.
|
||||
//
|
||||
@@ -852,14 +852,14 @@ Singleton {
|
||||
detail: "A time earlier than the start simply means the next morning"
|
||||
},
|
||||
|
||||
// ── Colour scheme ───────────────────────────────────────────────────
|
||||
// ── Color scheme ───────────────────────────────────────────────────
|
||||
// Light is Tokyo Night Day, the official light variant, rather than a
|
||||
// palette invented to merely not be dark. Both share the same hues at
|
||||
// different lightness, which is what keeps the Prism identity intact
|
||||
// across the switch.
|
||||
//
|
||||
// services/ColorScheme.qml pushes the choice to GTK and to the
|
||||
// compositor's border colours, because an application toolbar or a
|
||||
// compositor's border colors, because an application toolbar or a
|
||||
// window border still wearing the other scheme is more jarring than
|
||||
// either scheme on its own.
|
||||
{
|
||||
@@ -873,10 +873,10 @@ Singleton {
|
||||
},
|
||||
{
|
||||
key: "accentName", type: "enum", def: "blue", group: "appearance",
|
||||
label: "Accent colour",
|
||||
label: "Accent color",
|
||||
detail: "Drives the focused window border, the bar hairline, and every active state",
|
||||
// NAMED accents, not a free colour. Each name carries a curated
|
||||
// pair per scheme, because one hex cannot serve both: a colour
|
||||
// NAMED accents, not a free color. Each name carries a curated
|
||||
// pair per scheme, because one hex cannot serve both: a color
|
||||
// legible on the dark ground is usually illegible on the light one.
|
||||
// The palette and its measured contrast live in config/Theme.qml,
|
||||
// which is also what stops this list drifting from what is drawn.
|
||||
@@ -998,7 +998,7 @@ Singleton {
|
||||
},
|
||||
|
||||
// ── Application titlebars ──────────────────────────────────────────
|
||||
// These affect applications that honour GNOME's window preferences.
|
||||
// These affect applications that honor GNOME's window preferences.
|
||||
// Hyprland itself has no server-side titlebar buttons, so minimize is
|
||||
// deliberately absent rather than presented as a switch that lies.
|
||||
{
|
||||
@@ -1061,7 +1061,7 @@ Singleton {
|
||||
// ── Which GPU the vitals readout tracks ─────────────────────────────
|
||||
// A sysfs path rather than a card number, because the number is neither
|
||||
// stable across machines nor meaningful. Constrained to the one shape
|
||||
// that can be read for utilisation; VitalsWidget hides itself when the
|
||||
// that can be read for utilization; VitalsWidget hides itself when the
|
||||
// path is unreadable, so a stale value degrades to no readout rather
|
||||
// than a wrong one.
|
||||
{
|
||||
@@ -1077,7 +1077,7 @@ Singleton {
|
||||
// Coordinates rather than a place name, because that is what Open-Meteo
|
||||
// takes and it needs no API key. weatherLocation is only the label shown
|
||||
// in the UI; it is never sent anywhere, so it can say whatever makes the
|
||||
// reading recognisable.
|
||||
// reading recognizable.
|
||||
{
|
||||
key: "weatherLatitude", type: "real", def: 27.7375, min: -90, max: 90, step: 0.0001,
|
||||
group: "weather", internal: true,
|
||||
@@ -1212,7 +1212,7 @@ Singleton {
|
||||
|
||||
// ── Display configuration ───────────────────────────────────────────
|
||||
// { "<output>": { mode, scale, transform, x, y, primary } }, applied by
|
||||
// hypr/monitors.lua on top of the shipped values. Colour management and
|
||||
// hypr/monitors.lua on top of the shipped values. Color management and
|
||||
// bit depth are deliberately not here: those carry a documented
|
||||
// screencopy tradeoff that a settings page cannot explain at the moment
|
||||
// you would be changing it.
|
||||
@@ -1325,7 +1325,7 @@ Singleton {
|
||||
case "string": {
|
||||
const text = typeof value === "string" ? value : String(value);
|
||||
// A constrained string is rejected rather than sanitised. Several
|
||||
// of these are serialised into an hl.config payload, and quietly
|
||||
// of these are serialized into an hl.config payload, and quietly
|
||||
// stripping characters would turn a typo into a different setting
|
||||
// instead of an error the user can see.
|
||||
if (entry.pattern && !new RegExp(entry.pattern).test(text))
|
||||
|
||||
@@ -62,7 +62,7 @@ Singleton {
|
||||
readonly property int focusDurationMinutes: DesktopPreferences.get("focusDurationMinutes")
|
||||
|
||||
// ── Dock ────────────────────────────────────────────────────────────────
|
||||
// Pinned apps, in order, taken from the GNOME dash favourites.
|
||||
// Pinned apps, in order, taken from the GNOME dash favorites.
|
||||
readonly property var dockPinned: DesktopPreferences.get("dockPinned")
|
||||
|
||||
// Dash-to-Dock was set to intellihide against all windows: the dock hides
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
pragma Singleton
|
||||
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
// Tokyo Night Moon — the single source of truth for every colour, radius,
|
||||
// Tokyo Night Moon — the single source of truth for every color, radius,
|
||||
// duration and font in the shell. Nothing below this file should hardcode a
|
||||
// colour; if you find yourself writing "#" outside this file, add a token here.
|
||||
// color; if you find yourself writing "#" outside this file, add a token here.
|
||||
//
|
||||
// The bar keeps GNOME's 36px information density but sits directly on the
|
||||
// desktop, edge to edge. The dock retains the former glass vocabulary: bottom,
|
||||
@@ -18,7 +18,7 @@ import QtQuick
|
||||
Singleton {
|
||||
id: root
|
||||
|
||||
// ── Colour scheme ───────────────────────────────────────────────────────
|
||||
// ── Color scheme ───────────────────────────────────────────────────────
|
||||
// Tokyo Night ships an official light variant (Day), so light mode is that
|
||||
// rather than a palette invented to merely not be dark. The two share the
|
||||
// same hues at different lightness, which is what lets the Prism identity
|
||||
@@ -46,12 +46,12 @@ Singleton {
|
||||
//
|
||||
// `accent` is the primary and carries every state meaning (focused, active,
|
||||
// on). `accentSecondary` never appears alone, only as the far end of a
|
||||
// gradient. That restraint is the whole point: the two colours meeting is
|
||||
// the signature, so the second colour stops being special the moment it is
|
||||
// gradient. That restraint is the whole point: the two colors meeting is
|
||||
// the signature, so the second color stops being special the moment it is
|
||||
// used as a flat fill.
|
||||
//
|
||||
// NAMED accents rather than a free colour. Each name carries a curated
|
||||
// triple per scheme, because an arbitrary hex cannot work in both: a colour
|
||||
// NAMED accents rather than a free color. Each name carries a curated
|
||||
// triple per scheme, because an arbitrary hex cannot work in both: a color
|
||||
// legible on the Moon background is usually illegible on the Day one, and a
|
||||
// picker that lets someone choose an unreadable desktop is not a feature.
|
||||
// Every pair below measures at least 3:1 against the ground it sits on.
|
||||
@@ -72,7 +72,7 @@ Singleton {
|
||||
|
||||
// Falls back to blue for an unknown name, so a settings file written by a
|
||||
// newer Panama -- or edited by hand -- degrades to the shipped identity
|
||||
// rather than to an undefined colour.
|
||||
// rather than to an undefined color.
|
||||
readonly property var accentPair: root.accents[DesktopPreferences.get("accentName")] ?? root.accents["blue"]
|
||||
|
||||
readonly property color accent: root.dark ? root.accentPair.dark : root.accentPair.light
|
||||
@@ -136,7 +136,7 @@ Singleton {
|
||||
|
||||
// Nerd Font, used ONLY to draw icon glyphs — never for text. It is the
|
||||
// pragmatic alternative to freedesktop symbolic icons, which ship with a
|
||||
// hardcoded dark fill Qt will not recolour (see widgets/ThemedIcon.qml).
|
||||
// hardcoded dark fill Qt will not recolor (see widgets/ThemedIcon.qml).
|
||||
readonly property string fontMono: DesktopPreferences.get("iconFont")
|
||||
|
||||
// Apply to any text whose digits change in place — clocks, percentages,
|
||||
@@ -180,7 +180,7 @@ Singleton {
|
||||
}
|
||||
|
||||
// Blend two tokens — used for hover/pressed states so we never invent a
|
||||
// colour that isn't derived from the palette.
|
||||
// color that isn't derived from the palette.
|
||||
function mix(a: color, b: color, ratio: real): color {
|
||||
return Qt.rgba(a.r + (b.r - a.r) * ratio, a.g + (b.g - a.g) * ratio, a.b + (b.b - a.b) * ratio, a.a + (b.a - a.a) * ratio);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ Singleton {
|
||||
// the active workspace pill and slider fills.
|
||||
//
|
||||
// Where the gradient runs left-to-right the blue leads, because the eye
|
||||
// reads left first and blue is the colour that carries meaning.
|
||||
// reads left first and blue is the color that carries meaning.
|
||||
readonly property real prismStart: 0.22
|
||||
readonly property real prismEnd: 0.78
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ ShellRoot {
|
||||
}
|
||||
|
||||
function refreshIdentityFixture(): string {
|
||||
const modes = Displays.normaliseModes([
|
||||
const modes = Displays.normalizeModes([
|
||||
"[email protected]",
|
||||
"[email protected]"
|
||||
]);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//
|
||||
// Fixture steps rather than the real list: the real one is empty until the
|
||||
// first breaking schema change, and a mechanism that has never been run against
|
||||
// a failing step is not one to discover the behaviour of during an upgrade.
|
||||
// a failing step is not one to discover the behavior of during an upgrade.
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
// Bar {}
|
||||
// }
|
||||
//
|
||||
// Layout mirrors GNOME's: workspaces + vitals left, clock + weather centre,
|
||||
// Layout mirrors GNOME's: workspaces + vitals left, clock + weather center,
|
||||
// media + tray + status cluster right.
|
||||
|
||||
import Quickshell
|
||||
@@ -83,7 +83,7 @@ PanelWindow {
|
||||
}
|
||||
}
|
||||
|
||||
// ── Centre ──────────────────────────────────────────────────────────
|
||||
// ── Center ──────────────────────────────────────────────────────────
|
||||
Row {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
// The centre clock, kept in the same place and the same format GNOME had it:
|
||||
// The center clock, kept in the same place and the same format GNOME had it:
|
||||
// weekday, date, 12-hour time with seconds. Clicking it opens the calendar,
|
||||
// exactly like GNOME's date menu.
|
||||
|
||||
@@ -35,7 +35,7 @@ Pill {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
text: Qt.formatDateTime(clock.date, root.format)
|
||||
font.family: Theme.fontFamily
|
||||
// Seconds tick once a second in the centre of the bar; without tabular
|
||||
// Seconds tick once a second in the center of the bar; without tabular
|
||||
// figures the whole clock shifts sideways on every digit change.
|
||||
font.features: Theme.tabularFigures
|
||||
font.pixelSize: Theme.fontSize
|
||||
|
||||
@@ -62,7 +62,7 @@ Pill {
|
||||
if (!root.wifiNetwork)
|
||||
return "\u{F092D}"; // md-wifi_strength_off
|
||||
|
||||
// NetworkManager reports strength 0-100; some backends normalise to
|
||||
// NetworkManager reports strength 0-100; some backends normalize to
|
||||
// 0-1, so accept either rather than showing one bar forever.
|
||||
const raw = root.wifiNetwork.signalStrength ?? 0;
|
||||
const strength = raw <= 1 ? raw * 100 : raw;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// One glyph + percentage pair inside VitalsWidget. Split out so the three
|
||||
// fields cannot drift apart in spacing, width or colour thresholds.
|
||||
// fields cannot drift apart in spacing, width or color thresholds.
|
||||
|
||||
import QtQuick
|
||||
import qs.config
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Vitals extension was configured with (_processor_usage_, _memory_usage_,
|
||||
// _gpu#1_usage_).
|
||||
//
|
||||
// Values are colour-coded rather than graphed: at bar size a number you can
|
||||
// Values are color-coded rather than graphed: at bar size a number you can
|
||||
// glance at beats a sparkline you have to squint at.
|
||||
|
||||
import QtQuick
|
||||
|
||||
@@ -36,7 +36,7 @@ Item {
|
||||
|
||||
implicitWidth: row.implicitWidth + 12
|
||||
// Full bar height makes (0, 0) part of the wheel target. The dots stay
|
||||
// optically centred by the row and active-pill geometry below.
|
||||
// optically centered by the row and active-pill geometry below.
|
||||
implicitHeight: Theme.barHeight
|
||||
|
||||
// Scroll over the padding either side of the row, not just over a dot.
|
||||
@@ -59,7 +59,7 @@ Item {
|
||||
border.width: 0 // QTBUG-137166: rounded rects can lose their corners
|
||||
|
||||
// The prism, as a fill rather than a hairline. This is the one element
|
||||
// in the bar that is always coloured, so it is where the pair belongs.
|
||||
// in the bar that is always colored, so it is where the pair belongs.
|
||||
gradient: Gradient {
|
||||
orientation: Gradient.Horizontal
|
||||
GradientStop {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// The floating control panel at the bottom of the capture overlay.
|
||||
//
|
||||
// Layout is a deliberate copy of GNOME 42's screenshot UI: the area segmented
|
||||
// control on top, and below it the shutter dead-centre with "Show Pointer" on
|
||||
// control on top, and below it the shutter dead-center with "Show Pointer" on
|
||||
// the left and the screenshot/screencast switch on the right.
|
||||
|
||||
import QtQuick
|
||||
@@ -13,7 +13,7 @@ Rectangle {
|
||||
|
||||
signal captureRequested
|
||||
|
||||
// Set by the overlay so the shutter can grey out when Window mode has
|
||||
// Set by the overlay so the shutter can gray out when Window mode has
|
||||
// nothing pickable (no Hyprland, or an empty workspace).
|
||||
property bool captureEnabled: true
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// One segment of the Screen / Window / Selection control.
|
||||
//
|
||||
// Icons are Nerd Font glyphs rather than freedesktop icons on purpose: the
|
||||
// Adwaita "symbolic" SVGs are flat black and Qt, unlike GTK, will not recolour
|
||||
// Adwaita "symbolic" SVGs are flat black and Qt, unlike GTK, will not recolor
|
||||
// them, so they'd be invisible on this dark overlay.
|
||||
|
||||
import QtQuick
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Selection mode: a GNOME-style rubber band over the frozen screen.
|
||||
//
|
||||
// Behaviours copied from GNOME 42: the overlay opens with a sensible centred
|
||||
// Behaviors copied from GNOME 42: the overlay opens with a sensible centered
|
||||
// selection already in place (so the shutter is immediately useful), dragging
|
||||
// inside moves it, dragging a corner resizes from the opposite corner, and
|
||||
// dragging anywhere else starts a fresh band.
|
||||
@@ -52,7 +52,7 @@ Item {
|
||||
root.resetSelection();
|
||||
}
|
||||
|
||||
// Centred, roughly the middle half of the screen.
|
||||
// Centered, roughly the middle half of the screen.
|
||||
function resetSelection(): void {
|
||||
if (root.width <= 0 || root.height <= 0)
|
||||
return;
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
// The month grid from GNOME's date menu.
|
||||
//
|
||||
// Six week rows always, so the grid height never changes as you page through
|
||||
// months and the panel below it never jumps. Days belonging to the neighbouring
|
||||
// months and the panel below it never jumps. Days belonging to the neighboring
|
||||
// months fill the edges, dimmed. Today wears the accent.
|
||||
//
|
||||
// Days become real navigation targets now that Evolution Data Server backs the
|
||||
// panel. Up to three source-coloured markers show whether a date has events.
|
||||
// panel. Up to three source-colored markers show whether a date has events.
|
||||
|
||||
import Quickshell
|
||||
import QtQuick
|
||||
@@ -134,7 +134,7 @@ Item {
|
||||
}
|
||||
}
|
||||
|
||||
// Centred on the row rather than between the pill and the arrows,
|
||||
// Centered on the row rather than between the pill and the arrows,
|
||||
// so it does not shift sideways when the pill appears.
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
// GNOME's date/time menu: calendar, ongoing activity and messages in one panel,
|
||||
// dropping from the top centre because that is where GNOME put it and the
|
||||
// dropping from the top center because that is where GNOME put it and the
|
||||
// muscle memory is the whole point.
|
||||
//
|
||||
// A layer-shell surface rather than a PopupWindow because the inline reply
|
||||
// fields have to be typeable, and because the clock it hangs from is owned by a
|
||||
// different module.
|
||||
//
|
||||
// Layer-shell centres a surface on whichever axis it is not anchored to, so
|
||||
// Layer-shell centers a surface on whichever axis it is not anchored to, so
|
||||
// anchoring only `top` is what puts it in the middle.
|
||||
|
||||
import QtQuick
|
||||
@@ -87,7 +87,7 @@ PanelWindow {
|
||||
}
|
||||
|
||||
// Grows out of the top edge it is anchored to, rather than out of its
|
||||
// own centre — the panel should look like it came from the bar.
|
||||
// own center — the panel should look like it came from the bar.
|
||||
transform: Scale {
|
||||
id: openScale
|
||||
origin.x: surface.width / 2
|
||||
|
||||
@@ -172,14 +172,14 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// Centred on the hovered item, clamped inside the dock. Reads the item's
|
||||
// Centered on the hovered item, clamped inside the dock. Reads the item's
|
||||
// x directly (rather than mapToItem) so the binding re-evaluates when
|
||||
// the row reflows.
|
||||
x: {
|
||||
if (!root.hoveredItem)
|
||||
return 0;
|
||||
const centre = row.x + root.hoveredItem.x + root.hoveredItem.width / 2;
|
||||
return Math.max(4, Math.min(root.width - width - 4, centre - width / 2));
|
||||
const center = row.x + root.hoveredItem.x + root.hoveredItem.width / 2;
|
||||
return Math.max(4, Math.min(root.width - width - 4, center - width / 2));
|
||||
}
|
||||
y: -height - 8
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// One dock icon: the app, its running-window dots, hover scale and click
|
||||
// behaviour. Reproduces Dash-to-Dock's item: 48px icon, up to four dots
|
||||
// behavior. Reproduces Dash-to-Dock's item: 48px icon, up to four dots
|
||||
// underneath, grow-on-hover, click to focus / cycle / launch.
|
||||
|
||||
import Quickshell
|
||||
@@ -72,7 +72,7 @@ Item {
|
||||
}
|
||||
|
||||
// Last resort for an app with no resolvable icon: an initial, which is
|
||||
// still recognisable, unlike the theme's broken-icon placeholder.
|
||||
// still recognizable, unlike the theme's broken-icon placeholder.
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
visible: root.iconSource === ""
|
||||
@@ -155,7 +155,7 @@ Item {
|
||||
return;
|
||||
|
||||
// Quickshell reports the address without the 0x prefix Hyprland's
|
||||
// window selector expects; normalise so either form works.
|
||||
// window selector expects; normalize so either form works.
|
||||
if (next.address) {
|
||||
const addr = next.address.startsWith("0x") ? next.address : "0x" + next.address;
|
||||
Hyprland.dispatch(`hl.dsp.focus({ window = "address:${addr}" })`);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// One notification, rendered GNOME-style: app icon, app name, summary, body,
|
||||
// optional image, action buttons and an inline reply box.
|
||||
//
|
||||
// Shared by the toasts and the notification centre so a notification looks the
|
||||
// Shared by the toasts and the notification center so a notification looks the
|
||||
// same wherever you meet it.
|
||||
//
|
||||
// IconButton/ThemedIcon come from the quicksettings module — they belong in
|
||||
@@ -21,7 +21,7 @@ Rectangle {
|
||||
|
||||
required property var notification
|
||||
|
||||
// The centre renders a denser card than a toast banner.
|
||||
// The center renders a denser card than a toast banner.
|
||||
property bool compact: false
|
||||
|
||||
signal dismissed
|
||||
@@ -43,7 +43,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// Critical notifications get a red edge rather than a colour wash, so the
|
||||
// Critical notifications get a red edge rather than a color wash, so the
|
||||
// text contrast never changes.
|
||||
Rectangle {
|
||||
anchors.left: parent.left
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// One workspace in the overview: a proportional card holding live thumbnails
|
||||
// of its windows, labelled underneath. The focused workspace is outlined in the
|
||||
// accent colour, as GNOME outlines the current workspace.
|
||||
// of its windows, labeled underneath. The focused workspace is outlined in the
|
||||
// accent color, as GNOME outlines the current workspace.
|
||||
//
|
||||
// A card with a null `workspace` is the trailing "new workspace" affordance
|
||||
// that dynamic-workspace setups (GNOME's, and Hyprland's) always show.
|
||||
|
||||
@@ -114,7 +114,7 @@ Item {
|
||||
|
||||
width: parent.width
|
||||
// BlueZ reports a plain freedesktop name ("audio-headphones");
|
||||
// the symbolic variant is the one that can be recoloured.
|
||||
// the symbolic variant is the one that can be recolored.
|
||||
icon: deviceRow.modelData.icon !== "" ? deviceRow.modelData.icon + "-symbolic" : "bluetooth-symbolic"
|
||||
iconFallback: "bluetooth-symbolic"
|
||||
label: deviceRow.modelData.name || deviceRow.modelData.address
|
||||
|
||||
@@ -29,7 +29,7 @@ Item {
|
||||
property real backlightValue: 0
|
||||
|
||||
readonly property int rowCount: (root.backlightAvailable ? 1 : 0) + Brightness.displays.length
|
||||
readonly property bool labelled: root.rowCount > 1
|
||||
readonly property bool labeled: root.rowCount > 1
|
||||
|
||||
visible: root.rowCount > 0
|
||||
implicitHeight: rows.implicitHeight
|
||||
@@ -89,7 +89,7 @@ Item {
|
||||
// Hyprland already knows what each output is called, so the
|
||||
// name comes from there rather than from a second source that
|
||||
// could disagree with the Displays page. The connector is the
|
||||
// fallback, so a display is never an unlabelled slider.
|
||||
// fallback, so a display is never an unlabeled slider.
|
||||
label: Displays.monitorNamed(modelData.connector)?.description || modelData.connector
|
||||
value: modelData.value / 100
|
||||
onMoved: v => Brightness.set(modelData.bus, Math.round(v * 100))
|
||||
@@ -113,7 +113,7 @@ Item {
|
||||
anchors.leftMargin: 6
|
||||
anchors.rightMargin: 6
|
||||
anchors.top: parent.top
|
||||
visible: root.labelled
|
||||
visible: root.labeled
|
||||
height: visible ? implicitHeight + 2 : 0
|
||||
text: row.label
|
||||
color: Theme.fgDim
|
||||
@@ -124,7 +124,7 @@ Item {
|
||||
|
||||
// The slider and its glyph share one strip so the two stay aligned
|
||||
// whether or not a caption sits above them. Anchoring the glyph to
|
||||
// both a caption and a centre line instead would conflict, and an
|
||||
// both a caption and a center line instead would conflict, and an
|
||||
// anchor set to undefined is not released.
|
||||
Item {
|
||||
id: control
|
||||
@@ -134,7 +134,7 @@ Item {
|
||||
height: 32
|
||||
|
||||
// ValueSlider draws its own leading icon, but symbolic icons need
|
||||
// recolouring to be visible — see ThemedIcon.
|
||||
// recoloring to be visible — see ThemedIcon.
|
||||
ThemedIcon {
|
||||
id: glyph
|
||||
anchors.left: parent.left
|
||||
|
||||
@@ -95,7 +95,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
// Full-height rather than vertically centred so slot contents can anchor
|
||||
// Full-height rather than vertically centered so slot contents can anchor
|
||||
// their own verticalCenter to it without a size loop.
|
||||
Row {
|
||||
id: trailingRow
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
//
|
||||
// Each swatch is drawn as the GRADIENT it will actually produce, not a flat
|
||||
// dot, because the gradient is the thing being chosen -- the focused window
|
||||
// border, the bar hairline and every active state are the two colours meeting.
|
||||
// border, the bar hairline and every active state are the two colors meeting.
|
||||
// A row of flat circles would misrepresent all of them.
|
||||
//
|
||||
// Named accents rather than a colour wheel: each name carries a curated pair
|
||||
// Named accents rather than a color wheel: each name carries a curated pair
|
||||
// per scheme, so every choice stays legible in both light and dark. See
|
||||
// config/Theme.qml for the palette and the reasoning.
|
||||
|
||||
@@ -46,7 +46,7 @@ Flow {
|
||||
|
||||
// The hit target is the whole swatch+label unit, not just the
|
||||
// 46px circle: the label exists specifically so someone with a
|
||||
// colour vision deficiency can identify an accent without it, and
|
||||
// color vision deficiency can identify an accent without it, and
|
||||
// a label that cannot itself be tapped defeats that.
|
||||
HoverHandler {
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
@@ -66,7 +66,7 @@ Flow {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "transparent"
|
||||
// The ring sits outside the gradient rather than over it, so a
|
||||
// selected swatch still shows its true colours.
|
||||
// selected swatch still shows its true colors.
|
||||
border.width: entry.selected ? 2 : 1
|
||||
border.color: entry.selected ? Theme.fg : Theme.alpha(Theme.fg, 0.14)
|
||||
|
||||
@@ -83,8 +83,8 @@ Flow {
|
||||
}
|
||||
}
|
||||
|
||||
// Always shown, not a tooltip. Telling swatches apart by colour is
|
||||
// exactly what someone with a colour vision deficiency cannot do,
|
||||
// Always shown, not a tooltip. Telling swatches apart by color is
|
||||
// exactly what someone with a color vision deficiency cannot do,
|
||||
// and it is the reason the palette is named rather than freeform --
|
||||
// hiding the names behind a hover would waste that.
|
||||
Text {
|
||||
|
||||
@@ -101,7 +101,7 @@ SettingsPage {
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
title: "Colour scheme"
|
||||
title: "Color scheme"
|
||||
subtitle: ColorScheme.lastError !== ""
|
||||
? ColorScheme.lastError
|
||||
: "Light is Tokyo Night Day, the official light variant — the same hues at a different lightness, so the blue-into-orchid signature survives the switch. Applications and window borders follow."
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// because that genuinely is a Panama preference.
|
||||
//
|
||||
// Changing the timezone or network time needs privilege. timedatectl asks
|
||||
// polkit, and a cancelled dialog surfaces as an error rather than as a value
|
||||
// polkit, and a canceled dialog surfaces as an error rather than as a value
|
||||
// that appears to have been accepted.
|
||||
|
||||
import QtQuick
|
||||
@@ -33,7 +33,7 @@ SettingsPage {
|
||||
SettingRow {
|
||||
label: "Set automatically"
|
||||
detail: DateTime.ntpEnabled
|
||||
? (DateTime.ntpSynchronised ? "Synchronised with a time server" : "Waiting to synchronise")
|
||||
? (DateTime.ntpSynchronized ? "Synchronized with a time server" : "Waiting to synchronize")
|
||||
: "The clock is set by hand"
|
||||
controlWidth: 48
|
||||
divider: false
|
||||
|
||||
@@ -50,7 +50,7 @@ Rectangle {
|
||||
|
||||
// Stands in for the wallpaper. Static: an animated gradient here would
|
||||
// repaint forever behind a settings page.
|
||||
// Follows the colour scheme. A preview that stays dark while the shell
|
||||
// Follows the color scheme. A preview that stays dark while the shell
|
||||
// around it is light does not read as "your desktop" -- it reads as a
|
||||
// screenshot of someone else's.
|
||||
gradient: Gradient {
|
||||
@@ -129,7 +129,7 @@ Rectangle {
|
||||
required property bool focused
|
||||
|
||||
// The gradient border is drawn as a filled rounded rect with the window
|
||||
// body inset on top of it: QML's Rectangle border takes a colour, not a
|
||||
// body inset on top of it: QML's Rectangle border takes a color, not a
|
||||
// gradient, and the prism border is the whole signature here.
|
||||
Rectangle {
|
||||
id: frame
|
||||
|
||||
@@ -440,9 +440,9 @@ SettingsPage {
|
||||
|
||||
ActionRow {
|
||||
objectName: "health-fedora-handoff:color"
|
||||
label: "Colour profiles"
|
||||
label: "Color profiles"
|
||||
detail: "Assigning an ICC profile here has no visible effect in this session: the colord daemon that loads it onto a display isn't running under Hyprland"
|
||||
action: "Open colour"
|
||||
action: "Open color"
|
||||
onTriggered: SystemSettings.openGnomePanel("color")
|
||||
}
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ SettingsPage {
|
||||
|
||||
title: "Mouse & Touchpad"
|
||||
lede: InputDevices.hasTouchpad
|
||||
? "Pointer behaviour for your mouse and touchpad."
|
||||
: "Pointer behaviour. Touchpad settings appear when a touchpad is attached."
|
||||
? "Pointer behavior for your mouse and touchpad."
|
||||
: "Pointer behavior. Touchpad settings appear when a touchpad is attached."
|
||||
|
||||
SettingsCard {
|
||||
title: "Mouse"
|
||||
|
||||
@@ -52,7 +52,7 @@ SettingsPage {
|
||||
}
|
||||
|
||||
SettingsCard {
|
||||
title: "Idle behaviour"
|
||||
title: "Idle behavior"
|
||||
subtitle: IdleLock.managed
|
||||
? "Idle timings are managed here. Changes take effect immediately."
|
||||
: "hypridle is running its shipped configuration. Turn on management below to make these adjustable."
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# Settings
|
||||
|
||||
The control centre for everything Panama owns. Anything the system owns —
|
||||
hardware, accounts, printers — is delegated to GNOME Settings and labelled as
|
||||
The control center for everything Panama owns. Anything the system owns —
|
||||
hardware, accounts, printers — is delegated to GNOME Settings and labeled as
|
||||
such rather than half-reimplemented.
|
||||
|
||||
## System Health
|
||||
@@ -28,7 +28,7 @@ package, runs `sudo`, deletes user data, or repairs a service Panama does not
|
||||
own. A repair remains degraded until a fresh scan observes recovery.
|
||||
|
||||
The final card is the ownership boundary. Network configuration and the exact
|
||||
Users, Sharing, Colour profiles, and Digital wellbeing handoffs open GNOME
|
||||
Users, Sharing, Color profiles, and Digital wellbeing handoffs open GNOME
|
||||
Settings because Fedora's system services own those areas.
|
||||
|
||||
## Adding a setting
|
||||
@@ -64,7 +64,7 @@ file.
|
||||
Every preference has **one primary page**, derived from its schema `group` and
|
||||
the route in `services/SettingsSearch.qml`. Search results always open that
|
||||
owner. A control may appear on a second page only when the same adaptation is
|
||||
part of another established mental model; otherwise use a labelled handoff to
|
||||
part of another established mental model; otherwise use a labeled handoff to
|
||||
the owner instead of duplicating it.
|
||||
|
||||
### Intentional mirrors
|
||||
@@ -72,7 +72,7 @@ the owner instead of duplicating it.
|
||||
| Setting | Primary page | Mirror | Why the mirror earns its place |
|
||||
|---|---|---|---|
|
||||
| `animationsEnabled` | Appearance | Accessibility | Reduced motion belongs both to visual polish and motion accessibility. |
|
||||
| `cursorInactiveTimeout` | Mouse | Accessibility | Pointer visibility is configured with pointer behaviour but affects motor and visual access. |
|
||||
| `cursorInactiveTimeout` | Mouse | Accessibility | Pointer visibility is configured with pointer behavior but affects motor and visual access. |
|
||||
| `cursorSize` | Accessibility | Mouse | Large cursors are an accessibility adaptation that users also look for beside pointer controls. |
|
||||
| `inactiveOpacity` | Appearance | Accessibility | Window translucency is an appearance choice with a direct readability impact. |
|
||||
| `lockMinutes` | Power | Privacy | Idle timing owns the mechanism; privacy owns the expectation that the unattended desktop locks. |
|
||||
@@ -93,7 +93,7 @@ Mirrors must remain the same schema-backed control, never a second preference
|
||||
or a copied default. Additions to this table require a concrete discoverability
|
||||
reason and an update to `tests/quickshell/settings-ownership-contract.sh`.
|
||||
|
||||
Window border colour follows the same ownership rule. The inactive border is a
|
||||
Window border color follows the same ownership rule. The inactive border is a
|
||||
**scheme-relative role** owned by `ColorScheme.qml`: it changes only to retain
|
||||
neutral contrast in light and dark modes. The focused Prism border is the
|
||||
**accent role**, driven by the chosen `accentName` and also owned by
|
||||
@@ -165,7 +165,7 @@ file with `qs -p`, and discover its PID from the exact Config path in
|
||||
| File | Holds |
|
||||
|---|---|
|
||||
| `~/.config/panama/settings.json` | Everything in the schema. Read by the shell *and* by `hypr/prefs.lua` |
|
||||
| `$XDG_STATE_HOME/panama/panama-home.json` | Home accessory favourites and aliases |
|
||||
| `$XDG_STATE_HOME/panama/panama-home.json` | Home accessory favorites and aliases |
|
||||
| `$XDG_STATE_HOME/panama/backups/` | Settings snapshots |
|
||||
| `$XDG_STATE_HOME/panama/hypridle.conf` | Generated idle config |
|
||||
| `$XDG_STATE_HOME/panama/hyprlock.conf` | Generated lock-screen appearance |
|
||||
|
||||
@@ -19,7 +19,7 @@ FocusScope {
|
||||
id: root
|
||||
|
||||
signal captured(string chord)
|
||||
signal cancelled
|
||||
signal canceled
|
||||
|
||||
property string message: ""
|
||||
|
||||
@@ -97,7 +97,7 @@ FocusScope {
|
||||
event.accepted = true;
|
||||
|
||||
if (event.key === 0x01000000) { // Escape
|
||||
root.cancelled();
|
||||
root.canceled();
|
||||
return;
|
||||
}
|
||||
if (root.isModifierOnly(event.key))
|
||||
@@ -127,6 +127,6 @@ FocusScope {
|
||||
|
||||
onActiveFocusChanged: {
|
||||
if (!activeFocus)
|
||||
root.cancelled();
|
||||
root.canceled();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
// description in hypr/keybinds.lua, and this page just groups and renders them.
|
||||
//
|
||||
// The hardware settings above the list are real controls. Keyboard layout,
|
||||
// repeat behaviour, and pointer response are Hyprland's, so Panama owns them;
|
||||
// repeat behavior, and pointer response are Hyprland's, so Panama owns them;
|
||||
// device-specific configuration stays with GNOME.
|
||||
|
||||
import QtQuick
|
||||
@@ -174,7 +174,7 @@ SettingsPage {
|
||||
Keybinds.rebind(bindRow.modelData.luaChord, chord);
|
||||
root.capturingChord = "";
|
||||
}
|
||||
onCancelled: root.capturingChord = ""
|
||||
onCanceled: root.capturingChord = ""
|
||||
}
|
||||
|
||||
Row {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
//
|
||||
// Range, step, label, explanation, and unit all come from PreferenceSchema.
|
||||
//
|
||||
// Three behaviours worth knowing:
|
||||
// Three behaviors worth knowing:
|
||||
//
|
||||
// * The row is responsive. The Settings window is a normal tiled window, so
|
||||
// its width is whatever the layout gives it -- anywhere from a half-screen
|
||||
@@ -63,7 +63,7 @@ Item {
|
||||
|
||||
// A fixed trailing width rather than a share of the row. A proportional
|
||||
// control looks reasonable at 900px and absurd at 4500px, where the slider
|
||||
// would be a metre long next to a two-word label -- and this window is
|
||||
// would be a meter long next to a two-word label -- and this window is
|
||||
// tiled, so it really can be that wide.
|
||||
readonly property int controlSpan: 300
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
// setting it edits.
|
||||
//
|
||||
// Rejected input is shown as rejected rather than silently dropped or quietly
|
||||
// sanitised. Several of these strings are serialised into an hl.config payload,
|
||||
// sanitised. Several of these strings are serialized into an hl.config payload,
|
||||
// where stripping an unexpected character would turn a typo into a different
|
||||
// working setting -- so the schema's pattern decides, the field turns red when
|
||||
// it fails, and nothing is committed until it passes.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// clock. This is the same control with the readout formatted as a time, so the
|
||||
// night light schedule says "5:30 PM" rather than a number you have to convert.
|
||||
//
|
||||
// Honours the 24-hour clock preference, because a user who has asked for 18:30
|
||||
// Honors the 24-hour clock preference, because a user who has asked for 18:30
|
||||
// everywhere else should not be shown 6:30 PM here.
|
||||
|
||||
import QtQuick
|
||||
|
||||
@@ -135,7 +135,7 @@ def valid_home(value: Any) -> bool:
|
||||
|
||||
def validate_home(value: Any, label: str) -> dict[str, Any]:
|
||||
if not valid_home(value):
|
||||
fail(f"{label} does not contain valid Home favourites.")
|
||||
fail(f"{label} does not contain valid Home favorites.")
|
||||
return value
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Propagates the colour scheme to applications that do not read the desktop
|
||||
# Propagates the color scheme to applications that do not read the desktop
|
||||
# portal.
|
||||
#
|
||||
# Most modern applications DO follow org.freedesktop.portal.Settings and need
|
||||
@@ -47,7 +47,7 @@ esac
|
||||
|
||||
# Same 8 named accents as config/Theme.qml's `accents` map (kept in sync by
|
||||
# hand -- there is no shared source between QML and a shell script), primary
|
||||
# hue per scheme only: both consumers below draw a flat colour, not the
|
||||
# hue per scheme only: both consumers below draw a flat color, not the
|
||||
# two-stop gradient the window border does.
|
||||
accent_hex() {
|
||||
local name="$1" scheme="$2"
|
||||
@@ -108,7 +108,7 @@ status_hyprlock="skipped"
|
||||
if [[ -r "$lock_template" ]]; then
|
||||
# Written atomically: a lock triggered mid-write would otherwise read a
|
||||
# truncated config and fall back to hyprlock's own defaults, which is a
|
||||
# bright grey screen with none of this desktop's identity.
|
||||
# bright gray screen with none of this desktop's identity.
|
||||
if sed -e "s/@FG@/$lock_fg/g" \
|
||||
-e "s/@MUTED@/$lock_muted/g" \
|
||||
-e "s/@ACCENT@/$lock_accent/g" \
|
||||
@@ -159,7 +159,7 @@ fi
|
||||
# it on the next write.
|
||||
#
|
||||
# btop reads its theme once at startup, so a running instance keeps the old
|
||||
# colours until it is restarted. That is acceptable for a monitor you open when
|
||||
# colors until it is restarted. That is acceptable for a monitor you open when
|
||||
# you want it, and forcing a restart would kill a process the user is watching.
|
||||
btop_conf="${XDG_CONFIG_HOME:-$HOME/.config}/btop/btop.conf"
|
||||
btop_theme="tokyonight-moon"
|
||||
|
||||
@@ -220,7 +220,7 @@ Singleton {
|
||||
}
|
||||
|
||||
try {
|
||||
root.entries = JSON.parse(text).map(row => root._normalise(row));
|
||||
root.entries = JSON.parse(text).map(row => root._normalize(row));
|
||||
} catch (e) {
|
||||
console.warn("Clipboard: could not parse history —", e);
|
||||
root.entries = [];
|
||||
@@ -231,7 +231,7 @@ Singleton {
|
||||
|
||||
// Turn a raw row into what the UI actually asks questions of, so no
|
||||
// delegate has to know about column names or Vicinae's integer kinds.
|
||||
function _normalise(row: var): var {
|
||||
function _normalize(row: var): var {
|
||||
const encrypted = row.enc !== 0;
|
||||
const textual = row.kind === root.kindText || row.kind === root.kindLink;
|
||||
const raw = row.preview || "";
|
||||
|
||||
@@ -6,7 +6,7 @@ pragma Singleton
|
||||
// because every token there is a binding. Two other things draw on this desktop
|
||||
// and do not read Panama's store:
|
||||
//
|
||||
// GTK applications read gsettings colour-scheme and gtk-theme
|
||||
// GTK applications read gsettings color-scheme and gtk-theme
|
||||
// the compositor draws window borders and shadows
|
||||
//
|
||||
// A toolbar or a window border still wearing the other scheme is more jarring
|
||||
@@ -31,10 +31,10 @@ Singleton {
|
||||
readonly property string inactiveBorder: root.dark ? root.inactiveBorderDark : root.inactiveBorderLight
|
||||
|
||||
// The focused border follows the chosen accent. `ee` is the shipped alpha
|
||||
// for the Prism gradient; Theme owns which colours, this owns the form the
|
||||
// for the Prism gradient; Theme owns which colors, this owns the form the
|
||||
// compositor wants them in.
|
||||
function hyprColor(value: var): string {
|
||||
// Qt gives "#rrggbb" -- or "#aarrggbb" if the colour ever carries an
|
||||
// Qt gives "#rrggbb" -- or "#aarrggbb" if the color ever carries an
|
||||
// alpha channel. slice(-6) keeps the trailing rrggbb either way;
|
||||
// slice(0, 6) would instead grab "aarrgg" out of an 8-digit string and
|
||||
// call it RGB. Hyprland wants rgba(rrggbbaa).
|
||||
@@ -59,7 +59,7 @@ Singleton {
|
||||
id: runner
|
||||
onExited: (exitCode, exitStatus) => {
|
||||
if (exitCode !== 0)
|
||||
root.lastError = "The colour scheme could not be applied everywhere.";
|
||||
root.lastError = "The color scheme could not be applied everywhere.";
|
||||
root.drain();
|
||||
}
|
||||
}
|
||||
@@ -153,16 +153,16 @@ Singleton {
|
||||
// Each accent carries a separate pair for light and dark, so this
|
||||
// runs on either kind of change: a scheme flip restates the same
|
||||
// accent's other pair, and an accent change restates the same
|
||||
// scheme's other colours.
|
||||
// scheme's other colors.
|
||||
//
|
||||
// A two-stop gradient at the shipped angle. Written as a Lua TABLE:
|
||||
// the string form of a gradient carries only one stop, and passing
|
||||
// "rgba(a) rgba(b) 115deg" as a string is accepted and silently
|
||||
// keeps the previous value. Multi-stop must be the table form --
|
||||
// built by the same serialiseValue() SystemSettings uses for every
|
||||
// built by the same serializeValue() SystemSettings uses for every
|
||||
// other gradient, rather than a second hand-rolled copy of that
|
||||
// escaping here.
|
||||
const activeBorder = SystemSettings.serialiseValue({
|
||||
const activeBorder = SystemSettings.serializeValue({
|
||||
colors: [root.accentBorderStart, root.accentBorderEnd],
|
||||
angle: 115
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@ Singleton {
|
||||
|
||||
property string timezone: ""
|
||||
property bool ntpEnabled: false
|
||||
property bool ntpSynchronised: false
|
||||
property bool ntpSynchronized: false
|
||||
property string localTime: ""
|
||||
property string universalTime: ""
|
||||
property string rtcTime: ""
|
||||
@@ -79,7 +79,7 @@ Singleton {
|
||||
// status is re-read either way.
|
||||
root.lastError = exitCode === 0
|
||||
? ""
|
||||
: "The system rejected that change, or authentication was cancelled.";
|
||||
: "The system rejected that change, or authentication was canceled.";
|
||||
root.refresh();
|
||||
}
|
||||
}
|
||||
@@ -101,7 +101,7 @@ Singleton {
|
||||
else if (key === "NTP")
|
||||
root.ntpEnabled = value === "yes";
|
||||
else if (key === "NTPSynchronized")
|
||||
root.ntpSynchronised = value === "yes";
|
||||
root.ntpSynchronized = value === "yes";
|
||||
}
|
||||
root.lastError = "";
|
||||
}
|
||||
@@ -115,7 +115,7 @@ Singleton {
|
||||
// caller-supplied text reaches the command.
|
||||
function setTimezone(zone: string): bool {
|
||||
if (root.zones.indexOf(zone) < 0) {
|
||||
root.lastError = "That is not a timezone this system recognises.";
|
||||
root.lastError = "That is not a timezone this system recognizes.";
|
||||
return false;
|
||||
}
|
||||
if (writeRun.running)
|
||||
|
||||
@@ -141,7 +141,7 @@ Singleton {
|
||||
? persistedPrimaries[0].name
|
||||
: (origin?.name ?? raw[0]?.name ?? "");
|
||||
root.monitors = raw.map(monitor => {
|
||||
const modes = root.normaliseModes(monitor.availableModes ?? []);
|
||||
const modes = root.normalizeModes(monitor.availableModes ?? []);
|
||||
const width = monitor.width ?? 0;
|
||||
const height = monitor.height ?? 0;
|
||||
const refreshRate = monitor.refreshRate ?? 0;
|
||||
@@ -200,7 +200,7 @@ Singleton {
|
||||
// resolution at distinct rates such as 60.00 and 59.94. Those identities
|
||||
// remain separate because confirmation and recovery must read back the
|
||||
// exact mode the user chose, even when their rounded labels look similar.
|
||||
function normaliseModes(raw: var): var {
|
||||
function normalizeModes(raw: var): var {
|
||||
const seen = {};
|
||||
const out = [];
|
||||
for (const entry of raw) {
|
||||
|
||||
@@ -114,7 +114,7 @@ Singleton {
|
||||
}
|
||||
|
||||
// Stores a chosen place. Coordinates are rounded to four decimals -- roughly
|
||||
// ten metres, far finer than a weather reading resolves, and it keeps a
|
||||
// ten meters, far finer than a weather reading resolves, and it keeps a
|
||||
// precise home location out of the settings file.
|
||||
function choose(place: var): bool {
|
||||
const latitude = Math.round(place.latitude * 10000) / 10000;
|
||||
|
||||
@@ -81,7 +81,7 @@ Singleton {
|
||||
}
|
||||
|
||||
// "AMD ... [Radeon RX 7700 XT / 7800 XT] (rev c8)" is what lspci gives; the
|
||||
// bracketed marketing name is the part anyone recognises.
|
||||
// bracketed marketing name is the part anyone recognizes.
|
||||
function shortName(name: string): string {
|
||||
const bracketed = String(name).match(/\[([^\]]+)\]\s*(?:\(rev[^)]*\))?\s*$/);
|
||||
return bracketed ? bracketed[1] : String(name).replace(/\s*\(rev[^)]*\)\s*$/, "");
|
||||
|
||||
@@ -43,7 +43,7 @@ Singleton {
|
||||
readonly property bool scheduled: root.inWindow(clock.hours + clock.minutes / 60)
|
||||
|
||||
// A manual toggle always wins: it drops out of the schedule rather than
|
||||
// being silently reverted a minute later. Same as GNOME's behaviour when
|
||||
// being silently reverted a minute later. Same as GNOME's behavior when
|
||||
// you flip night light off during a scheduled evening.
|
||||
function toggle(): void {
|
||||
if (root.automatic) {
|
||||
|
||||
@@ -10,7 +10,7 @@ pragma Singleton
|
||||
// the *live* objects rather than copies: that keeps actions and inline replies
|
||||
// working from the tray, which is what GNOME does. The cost is that a
|
||||
// notification an app closes itself (progress bars, "download finished"
|
||||
// replacing "downloading") disappears from history too — correct behaviour,
|
||||
// replacing "downloading") disappears from history too — correct behavior,
|
||||
// but the reason history is not append-only.
|
||||
// ─────────────────────────────────────────────────────────────────────────────
|
||||
|
||||
@@ -34,7 +34,7 @@ Singleton {
|
||||
// Suppresses toasts entirely. Notifications still reach history.
|
||||
property bool doNotDisturb: false
|
||||
|
||||
// Cleared when the notification centre is opened. The bar binds to this.
|
||||
// Cleared when the notification center is opened. The bar binds to this.
|
||||
property int unreadCount: 0
|
||||
|
||||
// Kept separate from the persisted map so this version can safely run
|
||||
|
||||
@@ -33,7 +33,7 @@ Singleton {
|
||||
|
||||
// Non-empty when the machine cannot actually deliver the profile it is set
|
||||
// to -- thermal throttling, or a laptop running on battery. Worth showing,
|
||||
// because otherwise "performance" is a claim the hardware is not honouring.
|
||||
// because otherwise "performance" is a claim the hardware is not honoring.
|
||||
property string degraded: ""
|
||||
|
||||
readonly property bool available: root.profiles.length > 0
|
||||
@@ -52,7 +52,7 @@ Singleton {
|
||||
function detail(profile: string): string {
|
||||
switch (profile) {
|
||||
case "power-saver": return "Reduces performance to save energy and run quieter";
|
||||
case "balanced": return "Standard behaviour, scaling up only when needed";
|
||||
case "balanced": return "Standard behavior, scaling up only when needed";
|
||||
case "performance": return "Holds higher clocks, using more power and making more noise";
|
||||
default: return "";
|
||||
}
|
||||
|
||||
@@ -107,7 +107,7 @@ Singleton {
|
||||
if (restoreAccepted)
|
||||
root.lastError = "";
|
||||
else if (root.lastError === "")
|
||||
root.lastError = "Desktop settings were restored, but Home favourites could not be reloaded.";
|
||||
root.lastError = "Desktop settings were restored, but Home favorites could not be reloaded.";
|
||||
if (!restoreAccepted) {
|
||||
root.setDisplayBlocked(false);
|
||||
root.protectedDisplays = ({});
|
||||
@@ -192,10 +192,10 @@ Singleton {
|
||||
if (actionRun.running)
|
||||
return;
|
||||
actionRun.restoring = false;
|
||||
actionRun.exec([root.helperPath, "save", root.serialiseHomeState()]);
|
||||
actionRun.exec([root.helperPath, "save", root.serializeHomeState()]);
|
||||
}
|
||||
|
||||
function serialiseHomeState(): string {
|
||||
function serializeHomeState(): string {
|
||||
const current = root.readHomeState();
|
||||
const favorites = [];
|
||||
for (const favorite of current.favorites ?? []) {
|
||||
|
||||
@@ -59,7 +59,7 @@ Singleton {
|
||||
// on a settings app that plainly has one.
|
||||
readonly property var extraEntries: [
|
||||
{ label: "Timezone", detail: "Set the system timezone", page: "datetime" },
|
||||
{ label: "Network time", detail: "Synchronise the clock with a time server", page: "datetime" },
|
||||
{ label: "Network time", detail: "Synchronize the clock with a time server", page: "datetime" },
|
||||
{ label: "Wi-Fi", detail: "Managed by GNOME Settings", page: "connectivity" },
|
||||
{ label: "Bluetooth", detail: "Managed by GNOME Settings", page: "connectivity" },
|
||||
{ label: "Printers", detail: "Managed by GNOME Settings", page: "connectivity" },
|
||||
@@ -68,7 +68,7 @@ Singleton {
|
||||
{ label: "Keyboard shortcuts", detail: "Every shortcut the compositor has bound", page: "shortcuts" },
|
||||
{ label: "System Health", detail: "Check Panama services, integrations, tools, and recovery actions", page: "services" },
|
||||
{ label: "Copy health report", detail: "Copy a redacted Panama doctor report", page: "services" },
|
||||
{ label: "Lock screen background", detail: "Choose a blurred desktop, wallpaper, or solid colour", page: "appearance" },
|
||||
{ label: "Lock screen background", detail: "Choose a blurred desktop, wallpaper, or solid color", page: "appearance" },
|
||||
{ label: "Password field", detail: "Choose whether the empty lock-screen field stays visible", page: "appearance" },
|
||||
{ label: "Per-display wallpaper", detail: "Assign a different image to each connected display", page: "appearance" },
|
||||
{ label: "Arrange displays", detail: "Drag connected displays into their physical positions", page: "displays" },
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
pragma Singleton
|
||||
|
||||
// GNOME and GTK applications already honour these desktop sound preferences.
|
||||
// GNOME and GTK applications already honor these desktop sound preferences.
|
||||
// Panama controls the same durable keys so moving between sessions does not
|
||||
// create two competing notions of whether event feedback is enabled.
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ Singleton {
|
||||
function hyprValue(entry: var, value: var): var {
|
||||
// Some options are phrased as a negative by the compositor -- the four
|
||||
// Hyprland notices are all `disable_x` -- while the setting reads as
|
||||
// "show x", because a switch labelled "Disable splash text" that must
|
||||
// "show x", because a switch labeled "Disable splash text" that must
|
||||
// be ON to hide something is a small cruelty. `invert` bridges the two,
|
||||
// in exactly one place, so nothing downstream has to remember which
|
||||
// options are backwards.
|
||||
@@ -289,7 +289,7 @@ Singleton {
|
||||
return value;
|
||||
}
|
||||
|
||||
// Serialises validated values into a nested hl.config{} call. Table paths
|
||||
// Serializes validated values into a nested hl.config{} call. Table paths
|
||||
// come from the schema and values have already passed coerce(), including
|
||||
// the pattern check on constrained strings, so nothing caller-supplied
|
||||
// reaches the payload unchecked.
|
||||
@@ -301,12 +301,12 @@ Singleton {
|
||||
let node = tree;
|
||||
for (let i = 0; i < path.length - 1; i++)
|
||||
node = node[path[i]] = node[path[i]] ?? {};
|
||||
node[path[path.length - 1]] = root.serialiseValue(root.hyprValue(entry, requested[key]));
|
||||
node[path[path.length - 1]] = root.serializeValue(root.hyprValue(entry, requested[key]));
|
||||
}
|
||||
return `hl.config(${root.serialiseTable(tree)})`;
|
||||
return `hl.config(${root.serializeTable(tree)})`;
|
||||
}
|
||||
|
||||
function serialiseValue(value: var): string {
|
||||
function serializeValue(value: var): string {
|
||||
if (typeof value === "boolean")
|
||||
return value ? "true" : "false";
|
||||
if (typeof value === "number")
|
||||
@@ -330,22 +330,22 @@ Singleton {
|
||||
if (Array.isArray(value) && value.length === 2)
|
||||
return `{ ${Number(value[0])}, ${Number(value[1])} }`;
|
||||
// Strings only reach here after the schema's pattern check; quoting is
|
||||
// belt-and-braces rather than the primary defence.
|
||||
// belt-and-braces rather than the primary defense.
|
||||
return `"${String(value).replace(/["\\]/g, "")}"`;
|
||||
}
|
||||
|
||||
function serialiseTable(node: var): string {
|
||||
function serializeTable(node: var): string {
|
||||
const parts = [];
|
||||
for (const name in node) {
|
||||
const child = node[name];
|
||||
// A leaf arrives pre-serialised as a string; anything else is
|
||||
// A leaf arrives pre-serialized as a string; anything else is
|
||||
// either a nested section or a structured value (gradient, vec2)
|
||||
// that serialiseValue knows how to render.
|
||||
// that serializeValue knows how to render.
|
||||
const rendered = typeof child === "string"
|
||||
? child
|
||||
: (Array.isArray(child) || (child && child.colors !== undefined)
|
||||
? root.serialiseValue(child)
|
||||
: root.serialiseTable(child));
|
||||
? root.serializeValue(child)
|
||||
: root.serializeTable(child));
|
||||
parts.push(`${name} = ${rendered}`);
|
||||
}
|
||||
return `{ ${parts.join(", ")} }`;
|
||||
@@ -403,11 +403,11 @@ Singleton {
|
||||
function gradientMatches(expected: var, observed: string): bool {
|
||||
if (typeof observed !== "string")
|
||||
return false;
|
||||
return root.normaliseGradient(expected) === root.normaliseGradient(observed);
|
||||
return root.normalizeGradient(expected) === root.normalizeGradient(observed);
|
||||
}
|
||||
|
||||
// Both notations reduced to "aarrggbb aarrggbb Ndeg".
|
||||
function normaliseGradient(value: var): string {
|
||||
function normalizeGradient(value: var): string {
|
||||
const stops = [];
|
||||
let angle = 0;
|
||||
|
||||
@@ -518,8 +518,8 @@ Singleton {
|
||||
// Panama's shipped DP-2 placement and automatic placement elsewhere.
|
||||
|
||||
// Home accessories keep their own store (panama-home.json), so a reset
|
||||
// that only cleared the schema store would silently leave a customised
|
||||
// favourites list behind while claiming to restore Panama's defaults.
|
||||
// that only cleared the schema store would silently leave a customized
|
||||
// favorites list behind while claiming to restore Panama's defaults.
|
||||
//
|
||||
// HomePreferences owns the write-through boundary so the state file is
|
||||
// rewritten before this reset can be considered complete.
|
||||
@@ -593,7 +593,7 @@ Singleton {
|
||||
|
||||
// `subpage` reaches the panels GNOME 50 nests under System -- users,
|
||||
// about, datetime, region -- which its own desktop entries open as
|
||||
// `gnome-control-center system users`. Without it, a row labelled "Users"
|
||||
// `gnome-control-center system users`. Without it, a row labeled "Users"
|
||||
// lands on System's front page and leaves the user to navigate, which is
|
||||
// most of the way to a broken button.
|
||||
function openGnomePanel(panel: string, subpage: string): bool {
|
||||
|
||||
@@ -187,7 +187,7 @@ Singleton {
|
||||
};
|
||||
}
|
||||
|
||||
function normalisePolicy(policy: var): var {
|
||||
function normalizePolicy(policy: var): var {
|
||||
if (!policy || typeof policy !== "object")
|
||||
return null;
|
||||
const mode = ["single", "slideshow", "per-monitor"].includes(policy.mode)
|
||||
@@ -220,8 +220,8 @@ Singleton {
|
||||
function applyPolicy(policy: var, persist: bool, automatic: bool): bool {
|
||||
if (root.busy)
|
||||
return false;
|
||||
const normalised = root.normalisePolicy(policy);
|
||||
if (normalised === null) {
|
||||
const normalized = root.normalizePolicy(policy);
|
||||
if (normalized === null) {
|
||||
root.lastError = "That wallpaper policy is not valid.";
|
||||
return false;
|
||||
}
|
||||
@@ -231,8 +231,8 @@ Singleton {
|
||||
return false;
|
||||
}
|
||||
const expected = WallpaperPolicy.effectiveMap(
|
||||
normalised.mode, normalised.globalPath, normalised.slideshowPath,
|
||||
normalised.assignments, outputs, normalised.candidates);
|
||||
normalized.mode, normalized.globalPath, normalized.slideshowPath,
|
||||
normalized.assignments, outputs, normalized.candidates);
|
||||
if (Object.keys(expected).length !== outputs.length
|
||||
|| Object.values(expected).some(path => path === "")) {
|
||||
root.lastError = "That wallpaper policy is not valid.";
|
||||
@@ -242,7 +242,7 @@ Singleton {
|
||||
root.transaction = {
|
||||
expected,
|
||||
remaining: outputs.slice(),
|
||||
policy: normalised,
|
||||
policy: normalized,
|
||||
persist: persist === true,
|
||||
automatic: automatic === true
|
||||
};
|
||||
|
||||
@@ -24,7 +24,7 @@ Rectangle {
|
||||
id: root
|
||||
|
||||
// Horizontal inset, normally the parent's corner radius. Below that the
|
||||
// line runs out onto the curve and looks like a rendering artefact.
|
||||
// line runs out onto the curve and looks like a rendering artifact.
|
||||
property real inset: Theme.popoverRadius
|
||||
|
||||
anchors.leftMargin: root.inset
|
||||
@@ -33,7 +33,7 @@ Rectangle {
|
||||
implicitHeight: 1
|
||||
height: 1
|
||||
|
||||
// The colour stops are the only place the two accents touch.
|
||||
// The color stops are the only place the two accents touch.
|
||||
gradient: Gradient {
|
||||
orientation: Gradient.Horizontal
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// A freedesktop symbolic icon, recoloured to a Theme token.
|
||||
// A freedesktop symbolic icon, recolored to a Theme token.
|
||||
//
|
||||
// Adwaita's symbolic SVGs carry a hardcoded near-black fill (#2e3436) and Qt
|
||||
// does not do GTK's runtime recolouring, so drawn as-is they are invisible on
|
||||
// does not do GTK's runtime recoloring, so drawn as-is they are invisible on
|
||||
// a Tokyo Night background — verified on this machine. The fix is to paint a
|
||||
// themed rectangle through the icon's alpha channel.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// A GNOME-style quick-settings tile: big rounded button with an icon and a
|
||||
// label, filled with the accent colour when active.
|
||||
// label, filled with the accent color when active.
|
||||
|
||||
import QtQuick
|
||||
import Quickshell
|
||||
@@ -52,7 +52,7 @@ Rectangle {
|
||||
spacing: 10
|
||||
|
||||
// ThemedIcon, not a bare IconImage: Adwaita's symbolic SVGs carry a
|
||||
// hardcoded #2e3436 fill and Qt does not recolour them the way GTK
|
||||
// hardcoded #2e3436 fill and Qt does not recolor them the way GTK
|
||||
// does, so drawn directly they are all but invisible on this palette.
|
||||
ThemedIcon {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
||||
@@ -25,7 +25,7 @@ Item {
|
||||
opacity: enabled ? 1.0 : 0.45
|
||||
|
||||
// ThemedIcon, not a bare IconImage — see the note in Toggle.qml: Adwaita
|
||||
// symbolic icons have a hardcoded near-black fill that Qt will not recolour.
|
||||
// symbolic icons have a hardcoded near-black fill that Qt will not recolor.
|
||||
ThemedIcon {
|
||||
id: leadingIcon
|
||||
anchors.left: parent.left
|
||||
@@ -57,7 +57,7 @@ Item {
|
||||
border.width: 0
|
||||
|
||||
// The gradient is anchored to the full track, not to the fill, so
|
||||
// the colour at a given position never moves as the value changes —
|
||||
// the color at a given position never moves as the value changes —
|
||||
// dragging reveals the prism rather than squashing it.
|
||||
gradient: Gradient {
|
||||
orientation: Gradient.Horizontal
|
||||
|
||||
Reference in New Issue
Block a user