Skip to content

Commit f9f0dcc

Browse files
authored
chore: add session script for rebooting into BIOS
1 parent 717fd61 commit f9f0dcc

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

scripts/session/session-bios.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/sh
2+
#
3+
# name: Enter BIOS
4+
# icon: system-restart
5+
# description: Reboot into BIOS
6+
# keywords: bios uefi reboot restart
7+
8+
set -eu
9+
10+
is_gnome() {
11+
command -v dbus-send >/dev/null && \
12+
command -v gnome-session-quit >/dev/null && \
13+
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
14+
}
15+
16+
if is_gnome; then
17+
systemctl reboot --firmware-setup
18+
elif command -v systemctl >/dev/null; then
19+
systemctl reboot --firmware-setup
20+
fi

0 commit comments

Comments
 (0)