1
0
Fork 0
dotfiles-server/dot_zsh_systemd

37 lines
No EOL
823 B
Bash

#!/usr/bin/env zsh
alias systemctl-list-running-services="sudo systemctl --type=service"
alias systemctl-list-units='sudo systemctl list-units'
alias systemctl-list-unit-files='sudo systemctl list-unit-files'
alias systemctl-failed='sudo systemctl --failed'
alias systemctl-daemon-reload='sudo systemctl daemon-reload'
alias journalctl-error='sudo journalctl -b --priority 0..3'
alias journalctl-user='journalctl -b'
shutdown-timer() {
bash -c 'echo "System is going to shutdown in $1 minute(s)..."
sleep $1m
systemctl poweroff' -- $1
}
hibernate-timer() {
bash -c 'echo "System is going to hibernate in $1 minute(s)..."
sleep $1m
systemctl hibernate' -- $1
}
shutdown() {
systemctl poweroff
}
hibernate() {
systemctl hibernate
}
standby() {
systemctl suspend
}
restart() {
systemctl reboot
}