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.
This commit is contained in:
2020-10-31 22:34:04 +01:00
parent fa7c06a572
commit 26e9e42610

View File

@@ -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