From 8142d4bd4dfa896795e14ff8cc9b15fae048c471 Mon Sep 17 00:00:00 2001 From: shockrahwow Date: Tue, 13 Aug 2019 02:58:56 -0700 Subject: [PATCH] power command to replace the systemctl thing --- power | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 power diff --git a/power b/power new file mode 100755 index 0000000..9512bcb --- /dev/null +++ b/power @@ -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