From 9f8f17a78311b70f013808c14dfae544402a526b Mon Sep 17 00:00:00 2001 From: Ashley Wulber Date: Tue, 21 Jan 2025 13:18:03 -0500 Subject: [PATCH] feat: confirm enter BIOS with cosmic-osd --- scripts/session/session-bios.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/session/session-bios.sh b/scripts/session/session-bios.sh index 0be96b8..271154b 100644 --- a/scripts/session/session-bios.sh +++ b/scripts/session/session-bios.sh @@ -13,7 +13,13 @@ is_gnome() { 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 +is_cosmic() { + command -v cosmic-osd >/dev/null && [ "$XDG_SESSION_DESKTOP" = "COSMIC" ] +} + +if is_cosmic; then + cosmic-osd enter-bios +elif is_gnome; then systemctl reboot --firmware-setup elif command -v systemctl >/dev/null; then systemctl reboot --firmware-setup