18 lines
209 B
Plaintext
18 lines
209 B
Plaintext
|
#!/bin/sh
|
||
|
|
||
|
off() {
|
||
|
systemctl poweroff
|
||
|
}
|
||
|
reboot() {
|
||
|
systemctl reboot
|
||
|
}
|
||
|
|
||
|
opt=`printf 'Off\nReboot' | dmenu -i -p 'Power option'`
|
||
|
if [ -z "$opt"]; then exit 0;fi
|
||
|
if [ "$opt" = "Off" ]
|
||
|
then
|
||
|
off
|
||
|
else
|
||
|
reboot
|
||
|
fi
|