Detect Windows boot option for lock.sh pick
menu
This commit is contained in:
parent
44846433f1
commit
6dcca8d94f
@ -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}"
|
||||
|
Loading…
Reference in New Issue
Block a user