Leave this to the themes

This commit is contained in:
David Heinemeier Hansson
2026-05-19 21:01:51 +02:00
parent abf0a68b54
commit 0f4490c9fc
10 changed files with 18 additions and 90 deletions
+6 -18
View File
@@ -9,12 +9,9 @@ import Quickshell.Io
// dimensions — so panels and qs.Ui components have a single source of
// truth.
//
// `cornerRadius` mirrors Hyprland's `decoration:rounding`. Themes ship
// their own rounding via theme/hyprland.lua; the user toggle via
// `omarchy style corners <round|sharp>` flips Hyprland's flag file
// and Hyprland's auto-reload pushes the new value out. The shell picks
// up the change here by re-running `hyprctl getoption` when theme IPC
// manually reloads the theme and whenever user toggle files change.
// `cornerRadius` mirrors Hyprland's `decoration:rounding`. Themes and user
// Hyprland config own that value; the shell picks it up by re-running
// `hyprctl getoption` on startup and after theme IPC applies a theme.
//
// Typography, spacing, and bar size come from `theme/shell.toml`.
// `[font] base-size` is the rem root; every `Style.font.<token>` derives
@@ -490,18 +487,9 @@ QtObject {
onTriggered: root.refresh()
}
// `omarchy style corners <round|sharp>` and `omarchy toggle window-gaps`
// create/remove these flag files. Hyprland reloads its config when sourced
// files change, then hyprctl reflects the new effective values.
property FileView roundedCornersToggle: FileView {
path: Quickshell.env("HOME") + "/.local/state/omarchy/toggles/hypr/rounded-corners.lua"
watchChanges: true
printErrors: false
onFileChanged: refreshTimer.restart()
onLoaded: refreshTimer.restart()
onLoadFailed: refreshTimer.restart()
}
// `omarchy toggle window-gaps` creates/removes this flag file. Hyprland
// reloads its config when sourced files change, then hyprctl reflects the
// new effective value.
property FileView windowNoGapsToggle: FileView {
path: Quickshell.env("HOME") + "/.local/state/omarchy/toggles/hypr/window-no-gaps.lua"
watchChanges: true
+1 -1
View File
@@ -85,7 +85,7 @@ Session-lock surface using Quickshell's native `WlSessionLock` and two
separate PAM services: `omarchy-lock-password` for password auth and,
only when fingerprints are enrolled, `omarchy-lock-fingerprint` for
fingerprint auth. It mirrors the previous lock screen field dimensions,
colors, blurred wallpaper, placeholder, and corner toggle.
colors, blurred wallpaper, placeholder, and Hyprland-driven corners.
## Polkit agent
+2 -3
View File
@@ -30,9 +30,8 @@ Item {
// ~/.cache where regeneratable artifacts belong.
readonly property string cacheDir: home + "/.cache/omarchy/"
readonly property string imageCacheDir: cacheDir + "notification-images/"
// Corner radius is shared with omarchy-shell menu and bar settings panel
// `omarchy style corners <sharp|round>` writes this file once and every
// surface reads it. Default 0 for sharp corners.
// Corner radius is shared with omarchy-shell menu and bar settings panel.
// It mirrors Hyprland's current decoration:rounding value.
readonly property int cornerRadius: Style.cornerRadius
// Surfaces anchor relative to the omarchy bar so popups and history land
// alongside the other shell panels rather than on top of the bar itself.
+2 -2
View File
@@ -47,8 +47,8 @@ Item {
property color urgent: Color.urgent
property string fontFamily: "monospace"
// Structural style tokens live on the shared Style singleton so toggling
// `omarchy style corners` and theme swaps update every consumer at once.
// Structural style tokens live on the shared Style singleton so theme swaps
// and Hyprland-derived values update every consumer at once.
// Aliasing them as readonly properties keeps the existing inline component
// bindings (`root.cornerRadius`, `root.focusBorderColor`, ...) working
// without sprinkling Style.* across the file.