dotfiles/scripts/.local/share/scripts/power-manager

17 lines
263 B
Bash
Executable File

#!/bin/sh
usage() {
echo "Usage: power-manager <operation>"
echo "operation: poweroff|reboot"
}
if [ $# -lt 1 ]; then
usage
exit 1
fi
operation=$1
emacsclient --eval '(doom/save-session "~/.emacs.d/.local/etc/workspaces/autosave")'
systemctl "$operation"