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:
@@ -6,9 +6,9 @@ declare -A entries
|
|||||||
entries=(
|
entries=(
|
||||||
[lock]="xset s activate"
|
[lock]="xset s activate"
|
||||||
[logout]="i3-msg exit"
|
[logout]="i3-msg exit"
|
||||||
[reboot]="systemctl reboot"
|
[reboot]="loginctl reboot"
|
||||||
[shutdown]="systemctl poweroff"
|
[shutdown]="loginctl poweroff"
|
||||||
[suspend]="systemctl suspend"
|
[suspend]="loginctl suspend"
|
||||||
[suspend (scheduled)]="scheduled_suspend"
|
[suspend (scheduled)]="scheduled_suspend"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ scheduled_suspend() {
|
|||||||
[[ "$min" -ne 0 ]] || exit 1
|
[[ "$min" -ne 0 ]] || exit 1
|
||||||
|
|
||||||
notify-send "suspend in" "$min minutes"
|
notify-send "suspend in" "$min minutes"
|
||||||
sleep $((min*60)) && systemctl suspend
|
sleep $((min*60)) && ${entries[suspend]}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Choose option over rofi
|
# Choose option over rofi
|
||||||
|
|||||||
Reference in New Issue
Block a user