mirror of
https://github.com/arthur-pbty/arthur-os.git
synced 2026-08-01 20:28:16 +02:00
Leave this to the themes
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# omarchy:summary=Set Hyprland corners to sharp or round (the shell mirrors Hyprland)
|
||||
# omarchy:args=<sharp|round>
|
||||
# omarchy:examples=omarchy style corners round | omarchy style corners sharp
|
||||
|
||||
if [[ $1 != "sharp" && $1 != "round" ]]; then
|
||||
echo "Usage: omarchy-style-corners <sharp|round>"
|
||||
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
|
||||
@@ -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"
|
||||
@@ -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
|
||||
@@ -1,7 +0,0 @@
|
||||
-- Use rounded window corners.
|
||||
hl.config({
|
||||
decoration = {
|
||||
rounding = 6,
|
||||
rounding_power = 3,
|
||||
},
|
||||
})
|
||||
@@ -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"},
|
||||
|
||||
@@ -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
|
||||
+6
-18
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user