Various Linux scripts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
613 B

9 years ago
#!/bin/bash
#Создан: Вт 23 фев 2016 14:25:37
#Изменён: Вт 23 фев 2016 15:20:53
action=$(yad --width 300 --height 500 --title "Остановка системы" \
--image=gnome-shutdown \
--button="Выключение:2" \
--button="Перезагрузка:3" \
--button="Спящий режим:4" \
--button="gtk-close:1")
ret=$?
case $? in
1) exit 0;;
2) shutdown -h now;;
3) shutdown -r now;;
4) dbus-send --system \
--print-reply \
--dest="org.freedesktop.UPower" \
/org/freedesktop/UPower org.freedesktop.UPower.Suspend;;
esac
exit 0