summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.zshrc7
1 files changed, 7 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index 1f9144f..7952b35 100644
--- a/.zshrc
+++ b/.zshrc
@@ -143,6 +143,13 @@ function update_dotfiles() {
fi
}
+function suspend_after() {
+ trap 'kill $!' INT TERM EXIT
+ systemd-inhibit --what=handle-lid-switch sleep 1d &
+ eval "$1"
+ systemctl suspend
+}
+
## PATH
export PATH=$PATH:$HOME/bin