Skip to content

Instantly share code, notes, and snippets.

@trev-dev
Last active Jun 17, 2021
Embed
What would you like to do?
Super Simple "Display Manager" for X11
eval $(/usr/bin/gnome-keyring-daemon --start --components=pkcs11,secrets,ssh)
export SSH_AUTH_SOCK
CHOICE="${SESSION_CHOICE:-i3}";
exec $CHOICE
if [[ "$(tty)" == "/dev/tty1" ]]
then
$HOME/.dotfiles/scripts/sessions.sh
fi
#! /usr/bin/bash
clear;
PS3="Choose a session: ";
choices="i3 Gnome";
echo "Choose a session to start:"
echo
select session in $choices Exit
do
case $session in
i3)
export SESSION_CHOICE="i3";
break;
;;
Gnome)
export XDG_SESSION_TYPE=x11
export GDK_BACKEND=x11
export SESSION_CHOICE="gnome-session";
break;
;;
Exit)
echo "Bye";
break;
;;
*)
echo "Invalid selection";
;;
esac
done
if [[ "$choices" == *"$session"* ]]; then
startx
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment