mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-04-30 09:32:05 -04:00
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.
This commit is contained in:
15
quickshell/Services/LabwcService.qml
Normal file
15
quickshell/Services/LabwcService.qml
Normal file
@@ -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"]);
|
||||
}
|
||||
}
|
||||
@@ -320,6 +320,11 @@ Singleton {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CompositorService.isLabwc) {
|
||||
LabwcService.quit();
|
||||
return;
|
||||
}
|
||||
|
||||
if (CompositorService.isSway || CompositorService.isScroll || CompositorService.isMiracle) {
|
||||
try {
|
||||
I3.dispatch("exit");
|
||||
|
||||
Reference in New Issue
Block a user