feat: restore portable layout on shutdown and before suspend

Add WriteConfig/Prepare backend methods (real for Hyprland, no-op for
Sway), -apply/-prepare/-no-reload CLI flags, ExecStartPre cleanup and
suspend systemd hooks so a stale docked config can never leave the
built-in display disabled after resume.
This commit is contained in:
Maksim Totmin
2026-08-02 12:50:37 +07:00
parent 3fdccadd3c
commit ac82e3e82a
9 changed files with 318 additions and 16 deletions
+5
View File
@@ -16,6 +16,11 @@ Requires=graphical-session.target
Type=notify
WatchdogSec=30
# Remove disabled entries from the monitor config before starting.
# Prevents black screen if a stale docked config disables the built-in
# display (e.g. after undocking while suspended).
ExecStartPre=%h/.local/bin/monitor-lets-go -config %h/.config/monitor-lets-go/config.yaml -prepare
ExecStart=%h/.local/bin/monitor-lets-go -config %h/.config/monitor-lets-go/config.yaml
# Fast restart on failure: if the daemon crashes during docked mode,