From 26e9e42610645b3566bd34f01f95a642437b8e86 Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Sat, 31 Oct 2020 22:34:04 +0100 Subject: [PATCH] rofi:powermenu: Use loginctl instead of systemctl By that the script can be used together with elogind when systemd is not fully installed as in artix. --- .config/rofi/powermenu.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.config/rofi/powermenu.sh b/.config/rofi/powermenu.sh index ae577bb..23def8b 100755 --- a/.config/rofi/powermenu.sh +++ b/.config/rofi/powermenu.sh @@ -6,9 +6,9 @@ declare -A entries entries=( [lock]="xset s activate" [logout]="i3-msg exit" - [reboot]="systemctl reboot" - [shutdown]="systemctl poweroff" - [suspend]="systemctl suspend" + [reboot]="loginctl reboot" + [shutdown]="loginctl poweroff" + [suspend]="loginctl suspend" [suspend (scheduled)]="scheduled_suspend" ) @@ -34,7 +34,7 @@ scheduled_suspend() { [[ "$min" -ne 0 ]] || exit 1 notify-send "suspend in" "$min minutes" - sleep $((min*60)) && systemctl suspend + sleep $((min*60)) && ${entries[suspend]} } # Choose option over rofi