diff --git a/settings/quickshell.nix b/settings/quickshell.nix index 2cd4120..9353bd3 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -214,16 +214,14 @@ in visible = false; } - // Lock/reboot/shutdown spawn via Quickshell.execDetached — fully - // detached, so a quickshell restart can never kill a running - // hyprlock. Logout (empty cmd) goes through Hyprland IPC; with a - // Lua config the dispatch body is evaluated as a Lua dispatcher - // expression, so it must use hl.dsp.* syntax, not hyprlang's. + // Power actions go through Hyprland's exec dispatcher so they + // are NOT children of quickshell — a quickshell restart must + // never kill a running hyprlock. readonly property var powerActions: [ - { name: "Lock", glyph: "", cmd: [Commands.hyprlock] }, - { name: "Logout", glyph: "", cmd: [] }, - { name: "Reboot", glyph: "", cmd: [Commands.systemctl, "reboot"] }, - { name: "Shutdown", glyph: "", cmd: [Commands.systemctl, "poweroff"] } + { name: "Lock", glyph: "", dispatch: "exec " + Commands.hyprlock }, + { name: "Logout", glyph: "", dispatch: "exit" }, + { name: "Reboot", glyph: "", dispatch: "exec " + Commands.systemctl + " reboot" }, + { name: "Shutdown", glyph: "", dispatch: "exec " + Commands.systemctl + " poweroff" } ] function score(name, extra, q) { @@ -257,8 +255,7 @@ in function activate(item) { if (!item) return; if (mode === "power") { - if (item.cmd.length === 0) Hyprland.dispatch("hl.dsp.exit()"); - else Quickshell.execDetached(item.cmd); + Hyprland.dispatch(item.dispatch); } else { item.execute(); } @@ -472,11 +469,8 @@ in // Bar bottom border — left segment (up to gap) Rectangle { id: barBorderLeft - // Inset (inside the bar) so it lines up with the inset ear - // and dropdown borders; overlaps 8px into the gap to meet - // the ear curve's tapered start. - x: 0; y: 30 - Theme.borderWidth - width: bar.hasGap ? bar.gapLeft + 8 : bar.width + x: 0; y: 30 + width: bar.hasGap ? bar.gapLeft : bar.width height: Theme.borderWidth color: Theme.base03 } @@ -485,8 +479,8 @@ in Rectangle { id: barBorderRight visible: bar.hasGap && !bar.gapAlignRight - x: bar.gapRight - 8 - y: 30 - Theme.borderWidth + x: bar.gapRight + y: 30 width: bar.width - x height: Theme.borderWidth color: Theme.base03 @@ -1141,9 +1135,8 @@ in ctx.strokeStyle = Theme.base03; ctx.lineWidth = b; ctx.beginPath(); - // Start just under the bar — the ear band tapers - // through the first few px and this fills behind it - ctx.moveTo(o, b); + // Start below the top ear, go down left side + ctx.moveTo(o, r); ctx.lineTo(o, h - r); // Bottom-left curve — arc centered on the corner circle so // the stroke's outer edge matches the bg corner exactly @@ -1156,8 +1149,8 @@ in ctx.lineTo(w - r - o, h - o); // Bottom-right curve ctx.arc(w - r, h - r, r - o, Math.PI / 2, 0, true); - // Right side up to just under the bar - ctx.lineTo(w - o, b); + // Right side up (stop at ear height) + ctx.lineTo(w - o, r); } ctx.stroke(); } @@ -2442,12 +2435,12 @@ in ctx.strokeStyle = Theme.base03; ctx.lineWidth = b; ctx.beginPath(); - ctx.moveTo(o, b); + ctx.moveTo(o, r); ctx.lineTo(o, h - r); ctx.arc(r, h - r, r - o, Math.PI, Math.PI / 2, true); ctx.lineTo(w - r - o, h - o); ctx.arc(w - r, h - r, r - o, Math.PI / 2, 0, true); - ctx.lineTo(w - o, b); + ctx.lineTo(w - o, r); ctx.stroke(); } onWidthChanged: requestPaint()