From 0f4490c9fc6e5d03a4968d062932b616e89942a3 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 19 May 2026 21:01:51 +0200 Subject: [PATCH] Leave this to the themes --- bin/omarchy-style-corners | 20 -------------------- bin/omarchy-style-corners-hyprland | 17 ----------------- bin/omarchy-style-corners-quickshell | 19 ------------------- default/hypr/toggles/rounded-corners.lua | 7 ------- default/omarchy/omarchy-menu.jsonc | 3 --- migrations/1779216860.sh | 7 +++++++ shell/Commons/Style.qml | 24 ++++++------------------ shell/plugins/README.md | 2 +- shell/plugins/notifications/Service.qml | 5 ++--- shell/plugins/settings/SettingsPanel.qml | 4 ++-- 10 files changed, 18 insertions(+), 90 deletions(-) delete mode 100755 bin/omarchy-style-corners delete mode 100755 bin/omarchy-style-corners-hyprland delete mode 100755 bin/omarchy-style-corners-quickshell delete mode 100644 default/hypr/toggles/rounded-corners.lua create mode 100644 migrations/1779216860.sh diff --git a/bin/omarchy-style-corners b/bin/omarchy-style-corners deleted file mode 100755 index f7e20afb..00000000 --- a/bin/omarchy-style-corners +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Set Hyprland corners to sharp or round (the shell mirrors Hyprland) -# omarchy:args= -# omarchy:examples=omarchy style corners round | omarchy style corners sharp - -if [[ $1 != "sharp" && $1 != "round" ]]; then - echo "Usage: omarchy-style-corners " - exit 1 -fi - -# The shell tracks Hyprland's `decoration:rounding` directly via -# Quickshell's qs.Commons.Style singleton; no separate shell state file is -# written. -omarchy-style-corners-hyprland "$1" - -case $1 in - sharp) omarchy-notification-send "Sharp corners enabled" -g 󰝣 ;; - round) omarchy-notification-send "Round corners enabled" -g 󰘇 ;; -esac diff --git a/bin/omarchy-style-corners-hyprland b/bin/omarchy-style-corners-hyprland deleted file mode 100755 index a99e7570..00000000 --- a/bin/omarchy-style-corners-hyprland +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/bash - -# omarchy:summary=Set or toggle shape of Hyprland window corners -# omarchy:args=[toggle|sharp|round] -# omarchy:examples=omarchy style corners hyprland toggle | omarchy style corners hyprland round | omarchy style corners hyprland sharp - -case "${1:-toggle}" in - round) set -- on ;; - sharp) set -- off ;; - toggle) ;; - *) - echo "Usage: omarchy-style-corners-hyprland [toggle|sharp|round]" - exit 1 - ;; -esac - -omarchy-hyprland-toggle rounded-corners "$1" diff --git a/bin/omarchy-style-corners-quickshell b/bin/omarchy-style-corners-quickshell deleted file mode 100755 index cc2986b3..00000000 --- a/bin/omarchy-style-corners-quickshell +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# omarchy:summary=No-op shim; the shell now mirrors Hyprland's decoration:rounding directly -# omarchy:args=[toggle|sharp|round] -# omarchy:examples=omarchy style corners quickshell toggle | omarchy style corners quickshell round | omarchy style corners quickshell sharp - -# qs.Commons.Style reads decoration:rounding from hyprctl. Theme changes -# refresh it through shell IPC, while user corner toggles still trigger their -# own refresh. There is no separate quickshell-menu.json to write anymore. -# This shim stays around so anyone still calling the old subcommand (or the -# dispatcher in omarchy-style-corners) doesn't error out. - -case "${1:-toggle}" in - round|sharp|toggle) exit 0 ;; - *) - echo "Usage: omarchy-style-corners-quickshell [toggle|sharp|round]" >&2 - exit 1 - ;; -esac diff --git a/default/hypr/toggles/rounded-corners.lua b/default/hypr/toggles/rounded-corners.lua deleted file mode 100644 index 4ec97278..00000000 --- a/default/hypr/toggles/rounded-corners.lua +++ /dev/null @@ -1,7 +0,0 @@ --- Use rounded window corners. -hl.config({ - decoration = { - rounding = 6, - rounding_power = 3, - }, -}) diff --git a/default/omarchy/omarchy-menu.jsonc b/default/omarchy/omarchy-menu.jsonc index d3f365b2..ab598245 100644 --- a/default/omarchy/omarchy-menu.jsonc +++ b/default/omarchy/omarchy-menu.jsonc @@ -90,7 +90,6 @@ "style.font": {"icon":"","label":"Font","keywords":"typeface","provider":"fonts"}, "style.background": {"icon":"","label":"Background","aliases":["background","wallpaper"],"action":"background=$(omarchy-theme-bg-switcher); [[ -n $background ]] && omarchy-theme-bg-set \"$background\""}, "style.bar": {"icon":"󰍜","label":"Bar","keywords":"quickshell top bottom left right settings"}, - "style.corners": {"icon":"󰘇","label":"Corners","keywords":"sharp round rounded"}, "style.hyprland": {"icon":"","label":"Hyprland","keywords":"look feel","action":"omarchy-launch-config-editor \"$HOME/.config/hypr/looknfeel.lua\""}, "style.screensaver": {"icon":"󱄄","label":"Screensaver","keywords":"branding"}, "style.about": {"icon":"","label":"About","keywords":"branding"}, @@ -99,8 +98,6 @@ "style.bar.bottom": {"icon":"󰁅","label":"Bottom","keywords":"position","action":"omarchy-style-bar-position bottom"}, "style.bar.left": {"icon":"󰁍","label":"Left","keywords":"position","action":"omarchy-style-bar-position left"}, "style.bar.right": {"icon":"󰁔","label":"Right","keywords":"position","action":"omarchy-style-bar-position right"}, - "style.corners.sharp": {"icon":"󰝣","label":"Sharp","keywords":"square","action":"omarchy-style-corners sharp"}, - "style.corners.round": {"icon":"󰘇","label":"Round","keywords":"rounded","action":"omarchy-style-corners round"}, "style.about.text": {"icon":"","label":"Edit Text","keywords":"branding","action":"omarchy-branding-about text"}, "style.about.image": {"icon":"","label":"Set From Image","keywords":"branding","action":"omarchy-branding-about image"}, "style.about.default": {"icon":"","label":"Restore Default","keywords":"branding","action":"omarchy-branding-about reset"}, diff --git a/migrations/1779216860.sh b/migrations/1779216860.sh new file mode 100644 index 00000000..b1cd08be --- /dev/null +++ b/migrations/1779216860.sh @@ -0,0 +1,7 @@ +echo "Remove retired rounded-corners Hyprland toggle" + +rm -f "$HOME/.local/state/omarchy/toggles/hypr/rounded-corners.lua" + +if omarchy-cmd-present hyprctl; then + hyprctl reload >/dev/null 2>&1 || true +fi diff --git a/shell/Commons/Style.qml b/shell/Commons/Style.qml index 48f1eb6d..c5b180c6 100644 --- a/shell/Commons/Style.qml +++ b/shell/Commons/Style.qml @@ -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 ` 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.` derives @@ -490,18 +487,9 @@ QtObject { onTriggered: root.refresh() } - // `omarchy style corners ` 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 diff --git a/shell/plugins/README.md b/shell/plugins/README.md index 6206ed08..106355c8 100644 --- a/shell/plugins/README.md +++ b/shell/plugins/README.md @@ -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 diff --git a/shell/plugins/notifications/Service.qml b/shell/plugins/notifications/Service.qml index 9ae3bb65..1e4c471e 100644 --- a/shell/plugins/notifications/Service.qml +++ b/shell/plugins/notifications/Service.qml @@ -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 ` 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. diff --git a/shell/plugins/settings/SettingsPanel.qml b/shell/plugins/settings/SettingsPanel.qml index c123f593..20ba46df 100644 --- a/shell/plugins/settings/SettingsPanel.qml +++ b/shell/plugins/settings/SettingsPanel.qml @@ -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.