fix(display): docked idle wake + dump without SSH (#127)
All checks were successful
Check / eval (push) Successful in 3m44s
All checks were successful
Check / eval (push) Successful in 3m44s
Recover from DPMS/lock blackout without a second machine: undock/enable always issue dpms on; hypridle on-resume and after_sleep run nomarchy-display-wake (zero-output undock rescue + auto-dump). nomarchy-display-dump writes ~/nomarchy-display-dump-*.txt (SUPER+SHIFT+D or Ctrl+Alt+F3 TTY). HARDWARE-QUEUE #127 no longer requires SSH. V1: nix flake check --no-build. V3: docked idle on AMD box still open.
This commit is contained in:
@@ -124,6 +124,10 @@ let
|
||||
profileWorkspaceRules =
|
||||
lib.mapAttrsToList monitorLib.workspaceRule activeProfile.workspaces;
|
||||
|
||||
# #127 dump tool first (no transition dep); wake is wired after transition.
|
||||
displayDumpTool =
|
||||
(import ./display-tools.nix { inherit pkgs; }).displayDumpTool;
|
||||
|
||||
# One transition primitive for the interactive Dock mode, abrupt undock,
|
||||
# and named profiles that disable the internal panel. Dock is one Hyprland
|
||||
# batch: enable the target, move every internal workspace, focus it, then
|
||||
@@ -233,8 +237,13 @@ let
|
||||
if ! output_enabled "$internal" 5; then
|
||||
log "transition=undock internal=$internal keyword=inert escalate=reload"
|
||||
hyprctl reload >/dev/null 2>&1
|
||||
output_enabled "$internal" 25 \
|
||||
|| { log "transition=undock internal=$internal result=enable-failed"; exit 1; }
|
||||
if ! output_enabled "$internal" 25; then
|
||||
log "transition=undock internal=$internal result=enable-failed"
|
||||
# #127: leave evidence on disk without SSH (TTY or next login).
|
||||
${displayDumpTool}/bin/nomarchy-display-dump undock-enable-failed \
|
||||
>/dev/null 2>&1 || true
|
||||
exit 1
|
||||
fi
|
||||
# The config's monitor rules own the panel now. Re-assert the
|
||||
# runtime rule — which flushes normally, an output being enabled
|
||||
# again — so a config that parks the panel off cannot undo the
|
||||
@@ -246,6 +255,9 @@ let
|
||||
moves=$(all_workspaces | batch_moves "$internal")
|
||||
hyprctl --batch "$moves dispatch focusmonitor $internal" >/dev/null 2>&1 \
|
||||
|| { log "transition=undock internal=$internal result=move-failed"; exit 1; }
|
||||
# #127: undock after idle DPMS left the seat black even when the
|
||||
# panel was re-enabled — always light the chain after enable.
|
||||
hyprctl dispatch dpms on >/dev/null 2>&1 || true
|
||||
log "transition=undock internal=$internal result=ok" ;;
|
||||
enable)
|
||||
internal="''${2:-}"
|
||||
@@ -255,13 +267,24 @@ let
|
||||
# `monitors` the proof, or the menu's "back on" notification cheers
|
||||
# for a keyword hyprctl merely said "ok" to.
|
||||
hyprctl keyword monitor "$internal,preferred,auto,1" >/dev/null 2>&1
|
||||
output_enabled "$internal" 10 ;;
|
||||
if output_enabled "$internal" 10; then
|
||||
hyprctl dispatch dpms on >/dev/null 2>&1 || true
|
||||
true
|
||||
else
|
||||
false
|
||||
fi ;;
|
||||
*)
|
||||
echo "usage: nomarchy-display-transition [dock <internal> <external> [external-rule]|undock <internal>|enable <internal>]" >&2
|
||||
exit 64 ;;
|
||||
esac
|
||||
'';
|
||||
|
||||
displayWakeTool =
|
||||
(import ./display-tools.nix {
|
||||
inherit pkgs;
|
||||
displayTransition = displayTransitionTool;
|
||||
}).displayWakeTool;
|
||||
|
||||
# Profile applier — on PATH only when profiles are declared (the menu
|
||||
# row self-gates on it). apply: the profile's rules live via hyprctl +
|
||||
# the in-flake state write; base: clear the state, then hyprctl reload
|
||||
@@ -1127,6 +1150,7 @@ in
|
||||
# debugging. The display-profile switcher itself remains gated so the
|
||||
# menu does not advertise an empty Profiles submenu.
|
||||
++ lib.optionals config.nomarchy.hyprland.enable
|
||||
([ keyboardTool keyboardWatch displayTransitionTool displayProfileWatch ]
|
||||
([ keyboardTool keyboardWatch displayTransitionTool displayProfileWatch
|
||||
displayDumpTool displayWakeTool ]
|
||||
++ lib.optional (profiles != { }) displayProfileTool);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user