From e7834c981a1f79d813ce765ec1b91ee5acdc883c Mon Sep 17 00:00:00 2001 From: Jos Dehaes Date: Mon, 20 Apr 2026 15:22:20 +0200 Subject: [PATCH] Labwc service (#2248) * services: add LabwcService with quit labwc has a minimal IPC surface (no socket, no queries) but it does expose `labwc --exit` as a clean shutdown path. Wrap that in a small Singleton service following the same shape as DwlService/NiriService so the compositor-specific dispatch in callers can stay uniform. * session: dispatch labwc logout via LabwcService CompositorService.isLabwc was detected but never dispatched in _logout(); labwc sessions therefore fell through to the Hyprland exit call, which silently no-ops under labwc. Users had to set customPowerActionLogout to 'labwc --exit' as a workaround. Add a labwc branch alongside the existing niri/dwl/sway branches so the power menu logout works out of the box. --- quickshell/Services/LabwcService.qml | 15 +++++++++++++++ quickshell/Services/SessionService.qml | 5 +++++ 2 files changed, 20 insertions(+) create mode 100644 quickshell/Services/LabwcService.qml diff --git a/quickshell/Services/LabwcService.qml b/quickshell/Services/LabwcService.qml new file mode 100644 index 00000000..d6c8e77b --- /dev/null +++ b/quickshell/Services/LabwcService.qml @@ -0,0 +1,15 @@ +pragma Singleton +pragma ComponentBehavior: Bound + +import QtQuick +import Quickshell + +Singleton { + id: root + + // Exit the labwc session. Used by SessionService when the user + // triggers logout and no custom logout command is configured. + function quit() { + Quickshell.execDetached(["labwc", "--exit"]); + } +} diff --git a/quickshell/Services/SessionService.qml b/quickshell/Services/SessionService.qml index 7f5a1ede..5c7a4f2d 100644 --- a/quickshell/Services/SessionService.qml +++ b/quickshell/Services/SessionService.qml @@ -320,6 +320,11 @@ Singleton { return; } + if (CompositorService.isLabwc) { + LabwcService.quit(); + return; + } + if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) { try { I3.dispatch("exit");