power command to replace the systemctl thing

This commit is contained in:
shockrahwow committed 2019-08-13 02:58:56 -07:00
1 parent fa2706769e
commit 8142d4bd4d
1 file changed
+17
Executable
+17
View File
@@ -0,0 +1,17 @@
#!/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