Read cornerRadius from Hyprland instead of the quickshell-menu.json toggle

This commit is contained in:
Ryan Hughes
2026-05-17 23:31:47 -04:00
parent b1e3a23088
commit 64115a9cb4
8 changed files with 77 additions and 138 deletions
@@ -22,10 +22,8 @@ Item {
property color background: Color.menu.background
property color foreground: Color.menu.text
property color border: foreground
property int cornerRadius: 0
readonly property int cornerRadius: Style.cornerRadius
property string fontFamily: Quickshell.env("OMARCHY_MENU_FONT") || "monospace"
property string styleFile: Quickshell.env("OMARCHY_MENU_STYLE_FILE") || (Quickshell.env("HOME") + "/.local/state/omarchy/toggles/quickshell-menu.json")
property int contentMargin: 18
property int headerHeight: 34
property int contentSpacing: 6
@@ -143,14 +141,6 @@ Item {
var escEmoji = emoji.replace(/'/g, "'\\''")
Quickshell.execDetached(["bash", "-lc", "wl-copy '" + escEmoji + "'; sleep 0.15; wtype '" + escEmoji + "' 2>/dev/null || true"])
}
function loadStyle(raw) {
try {
var style = JSON.parse(raw || "{}")
root.cornerRadius = Number(style.radius || 0)
} catch (e) {}
}
ListModel { id: displayModel }
IpcHandler {
@@ -165,14 +155,6 @@ Item {
path: root.omarchyPath + "/default/quickshell/omarchy-shell/plugins/emoji-picker/emojis.json"
onLoaded: root.loadEmojis(text())
}
FileView {
path: root.styleFile
watchChanges: true
onLoaded: root.loadStyle(text())
onFileChanged: { reload(); root.loadStyle(text()) }
}
PanelWindow {
id: panel
visible: root.opened