[Unit] Description=monitor-lets-go -- restore portable layout before suspend Documentation=https://github.com/mat/monitor-lets-go # Run before the system enters sleep. The ExecStop action writes a portable # monitor config so that on resume the compositor never loads a stale docked # config that would leave the built-in display disabled. Before=sleep.target [Service] # RemainAfterExit: ExecStop runs when the service is stopped (before sleep). # This is the standard pattern for systemd suspend hooks. Type=oneshot RemainAfterExit=yes ExecStart=/bin/true ExecStop=%h/.local/bin/monitor-lets-go -config %h/.config/monitor-lets-go/config.yaml -apply portable -no-reload [Install] WantedBy=sleep.target