#!/usr/bin/env dash # nixos-config - My current NixOS configuration # # Copyright (C) 2025 Benedikt Peetz # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of my nixos-config. # # You should have received a copy of the License along with this program. # If not, see . # TODO(@bpeetz): The task context reset functionality could be moved to `tskm`. <2025-04-14> # TODO: This whole script should be a systemd service with Before=hibernate.target <2026-06-26> context="$(task _get rc.context)" [ "$context" ] && task context none # We have ensured that only one task is active active="$(task +ACTIVE _ids)" [ "$active" ] && task stop "$active" # Make sure that the swayidle service is actually running. Otherwise we don't get a # screenlock upon hibernate-resume. systemctl --user start swayidle.service systemctl hibernate "$@" # vim: ft=sh