chore: add session script for rebooting into BIOS
This commit is contained in:
parent
717fd612e7
commit
f9f0dcc7d7
1 changed files with 20 additions and 0 deletions
20
scripts/session/session-bios.sh
Normal file
20
scripts/session/session-bios.sh
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/sh
|
||||
#
|
||||
# name: Enter BIOS
|
||||
# icon: system-restart
|
||||
# description: Reboot into BIOS
|
||||
# keywords: bios uefi reboot restart
|
||||
|
||||
set -eu
|
||||
|
||||
is_gnome() {
|
||||
command -v dbus-send >/dev/null && \
|
||||
command -v gnome-session-quit >/dev/null && \
|
||||
dbus-send --print-reply --dest=org.gnome.Shell /org/gnome/Shell org.freedesktop.DBus.Properties.Get string:org.gnome.Shell string:ShellVersion >/dev/null 2>&1
|
||||
}
|
||||
|
||||
if is_gnome; then
|
||||
systemctl reboot --firmware-setup
|
||||
elif command -v systemctl >/dev/null; then
|
||||
systemctl reboot --firmware-setup
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue