diff options
| author | 2026-05-29 11:18:15 +0100 | |
|---|---|---|
| committer | 2026-05-29 11:18:15 +0100 | |
| commit | 45ce3902227fdfe4380d7b956ed89274e04b6ba5 (patch) | |
| tree | 2f9cb32e0d37019dc0538c74f38264712440200f | |
| parent | ec3734c5ef9fcfe97c21cd19f198ec779ab5f052 (diff) | |
| download | dotfiles-45ce3902227fdfe4380d7b956ed89274e04b6ba5.tar.gz dotfiles-45ce3902227fdfe4380d7b956ed89274e04b6ba5.tar.bz2 dotfiles-45ce3902227fdfe4380d7b956ed89274e04b6ba5.zip | |
refactor(suspend): drop SSH session inhibit; AC rule handles it
Same rationale as the previous commit: the new policy is "if you don't
want the machine to sleep, plug it in." An SSH-only inhibit in zprofile
is redundant on AC (logind already ignores the lid) and inconsistent on
battery (it would hold the lock for an SSH-attached idle session,
defeating the schedule).
Also removes a stale doc reference to zellij-inhibit-suspend.path which
no longer exists.
| -rw-r--r-- | dot_config/zsh/dot_zprofile | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/dot_config/zsh/dot_zprofile b/dot_config/zsh/dot_zprofile index a26209b..7b79af0 100644 --- a/dot_config/zsh/dot_zprofile +++ b/dot_config/zsh/dot_zprofile @@ -150,26 +150,6 @@ case $(uname -n) in ;; esac -# ── SSH: inhibit suspend/idle while connected ──────────────────────────────── -# Backstop for SSH sessions that don't use zellij. (The dedicated -# zellij-inhibit-suspend.path user unit already covers any host that has -# at least one live zellij session — that one survives detach/disconnect, -# which this in-shell inhibitor does not.) -# -# Wrap the login shell in `systemd-inhibit` so a lock is held for the -# entire SSH session lifetime; the lock is released the instant the -# shell exits. -if [[ -n $SSH_CONNECTION && -z $__SSH_SUSPEND_INHIBITED ]] \ - && command -v systemd-inhibit >/dev/null 2>&1; then - export __SSH_SUSPEND_INHIBITED=1 - exec systemd-inhibit \ - --what=sleep:idle:handle-lid-switch \ - --who="ssh:${USER}@${HOST}" \ - --why="active SSH session from ${SSH_CONNECTION%% *}" \ - --mode=block \ - "$SHELL" -l -fi - # ── Auto-start sway on VT1 ──────────────────────────────────────────────────── if [[ -z $WAYLAND_DISPLAY && $XDG_VTNR == 1 ]]; then export XDG_SESSION_TYPE=wayland |
