about summary refs log tree commit diff stats
path: root/hm/soispha/pkgs/scripts/wrappers/hibernate
diff options
context:
space:
mode:
authorSoispha <soispha@vhack.eu>2023-12-29 21:37:01 +0100
committerSoispha <soispha@vhack.eu>2023-12-29 21:37:01 +0100
commite852be16f009d91bff53277a90b75687c9fff8c9 (patch)
tree1ca76e810adc3644d66d60e9ee49674dec57e04f /hm/soispha/pkgs/scripts/wrappers/hibernate
parentrefactor(hm/pkgs/): Rename all 'src' to 'scr' to improve consistency (diff)
downloadnixos-config-e852be16f009d91bff53277a90b75687c9fff8c9.zip
feat(hm/pkgs/hibernate): Init
Diffstat (limited to 'hm/soispha/pkgs/scripts/wrappers/hibernate')
-rwxr-xr-xhm/soispha/pkgs/scripts/wrappers/hibernate15
1 files changed, 15 insertions, 0 deletions
diff --git a/hm/soispha/pkgs/scripts/wrappers/hibernate b/hm/soispha/pkgs/scripts/wrappers/hibernate
new file mode 100755
index 00000000..e239cacd
--- /dev/null
+++ b/hm/soispha/pkgs/scripts/wrappers/hibernate
@@ -0,0 +1,15 @@
+#!/usr/bin/env dash
+
+# shellcheck source=/dev/null
+SHELL_LIBRARY_VERSION="1.10.0" . %SHELL_LIBRARY_PATH
+
+task context none
+
+# We have ensured that only one task is active
+active="$(task +ACTIVE _ids)";
+task stop "$active"
+
+systemctl hibernate "$@"
+
+
+# vim: ft=sh