27 lines
311 B
Bash
27 lines
311 B
Bash
|
#!/usr/bin/env bash
|
||
|
if [ "$@" ]
|
||
|
then
|
||
|
case "$@" in
|
||
|
"Shutdown")
|
||
|
shutdown now
|
||
|
;;
|
||
|
"Reboot")
|
||
|
reboot
|
||
|
;;
|
||
|
"Logout")
|
||
|
i3-msg exit
|
||
|
;;
|
||
|
"Hibernate")
|
||
|
systemctl hibernate
|
||
|
;;
|
||
|
|
||
|
esac
|
||
|
exit 0
|
||
|
else
|
||
|
echo -en "Shutdown\n"
|
||
|
echo -en "Reboot\n"
|
||
|
echo -en "Logout\n"
|
||
|
echo -en "Hibernate\n"
|
||
|
fi
|
||
|
|