Skip to content

Commit

Permalink
fix: invert predicate on matching os release to gnome-session version
Browse files Browse the repository at this point in the history
  • Loading branch information
Regolith Linux committed Aug 2, 2024
1 parent 2ef63e6 commit cc0020e
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions usr/bin/regolith-session
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ if [[ "$SESSION_TYPE" == "regolith-x11" ]]; then
if [ -z "$XDG_CURRENT_DESKTOP" ]; then
export XDG_CURRENT_DESKTOP="Regolith:GNOME-Flashback:GNOME"
fi

elif [[ "$SESSION_TYPE" == "regolith-wayland" ]]; then
echo "Starting Wayland Session..."

else
echo "Session type must be specified by caller: regolith-wayland, regolith-x11. Unrecognized: '$SESSION_TYPE'"
exit 1
Expand All @@ -23,16 +21,13 @@ fi
if [ -f /etc/os-release ]; then
source /etc/os-release

if [[ "$ID" == "arch" ]]; then
exec gnome-session --session=$SESSION_TYPE --disable-acceleration-check "$@"
elif [[ "$VERSION_CODENAME" == "bionic" || "$VERSION_CODENAME" == "buster" || "$VERSION_CODENAME" == "noble" || "$VERSION_CODENAME" == "trixie" ]]; then
exec gnome-session --session=$SESSION_TYPE --disable-acceleration-check "$@"
else
exec gnome-session --builtin --session=$SESSION_TYPE --disable-acceleration-check "$@"
if [[ "$VERSION_CODENAME" == "jammy" ]]; then
echo "Using gnome-session built-in session"
exec gnome-session --builtin --session=$SESSION_TYPE --disable-acceleration-check "$@"
else
exec gnome-session --session=$SESSION_TYPE --disable-acceleration-check "$@"
fi
else
echo "No /etc/os-release, guessing gnome-session cli api..."
exec gnome-session --builtin --session=$SESSION_TYPE --disable-acceleration-check "$@"
echo "Using gnome-session built-in session"
exec gnome-session --session=$SESSION_TYPE --disable-acceleration-check "$@"
fi

0 comments on commit cc0020e

Please sign in to comment.