-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bash_profile
More file actions
52 lines (45 loc) · 1.23 KB
/
dot_bash_profile
File metadata and controls
52 lines (45 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#
# ~/.bash_profile
#
# =============================
# ==== Choose Wayland/X11 =====
# =============================
# Only run on TTY1 and with no display
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
echo "=== Session Selector ==="
echo "1) Wayland (uwsm menu) [default]"
echo "2) X11 (i3)"
echo "3) Stay in terminal"
echo ""
read -p "Enter your choice (1-3) [default: 1]: " choice
# Default to option 1 if no input
if [ -z "$choice" ]; then
choice=1
fi
case $choice in
1)
echo "Starting Wayland session via uwsm..."
if uwsm check may-start && uwsm select; then
exec uwsm start default
else
echo "uwsm failed to start. Press Enter to return to login."
read
fi
;;
2)
echo "Starting X11 session (i3)..."
exec startx
;;
3)
echo "Staying in terminal session."
# Do nothing, continue to shell
;;
*)
echo "Invalid choice. Staying in terminal."
sleep 2
;;
esac
fi
[[ -f ~/.bashrc ]] && . ~/.bashrc
. "$HOME/.cargo/env"
. "$HOME/.local/bin/env"