diff --git a/.config/i3/lock.sh b/.config/i3/lock.sh index dc90f91..de863e3 100755 --- a/.config/i3/lock.sh +++ b/.config/i3/lock.sh @@ -47,7 +47,11 @@ case "$1" in systemctl poweroff ;; pick) - $0 "$(echo -e 'lock\nlogout\nsuspend\nhibernate\nreboot\nreboot to Windows\nshutdown' | rofi -dmenu -i)" + if jc efibootmgr | jq -e '.boot_options|any(.display_name == "Windows Boot Manager")' + then + extra_reboot_options="reboot to Windows\n" + fi + $0 "$(echo -e 'lock\nlogout\nsuspend\nhibernate\nreboot\n'"${extra_reboot_options}shutdown" | rofi -dmenu -i)" ;; *) echo "Usage: $0 {lock|logout|suspend|hibernate|reboot|reboot to Windows|shutdown|pick}"