From 65d4f8707b82585261b037e5e36bb56f98ad7b2c Mon Sep 17 00:00:00 2001 From: srdusr Date: Thu, 20 Jun 2024 13:07:17 +0200 Subject: Testing --- .profile | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/.profile b/.profile index 471759d..874b6be 100644 --- a/.profile +++ b/.profile @@ -7,12 +7,16 @@ #fi # Default session to be executed +unset DISPLAY XAUTHORITY session="" +#pgrep bspwm || startx "$HOME"/.config/X11/.xinitrc +#startx "$HOME"/.config/X11/.xinitrc + # Function to display and start the selected session display() { # Default list of sessions in priority order - default_sessions=("Hyprland" "bspwm" "sway" "i3") + default_sessions=("Hyprland" "bspwm" "sway") # Check conditions and set session command if [ "$DISPLAY" = "" ] && [ "$XDG_VTNR" -eq 1 ]; then @@ -23,8 +27,13 @@ display() { if [ "$session" != "" ]; then case "$session" in - bspwm | i3) - session="startx /usr/bin/$session" + bspwm ) + export XDG_SESSION_TYPE="x11" + session="startx /usr/bin/bspwm" + #session="pgrep bspwm || startx $HOME/.config/X11/.xinitrc" + #session="pgrep bspwm || (unset DISPLAY XAUTHORITY; startx $HOME/.config/X11/.xinitrc)" + #session="startx /home/srdusr/.config/X11/.xinitrc" + #session="exec bspwm -name login" ;; Hyprland | sway) session="exec $session" @@ -39,8 +48,13 @@ display() { for wm in "${default_sessions[@]}"; do if command -v "$wm" >/dev/null 2>&1; then case "$wm" in - bspwm | i3) + bspwm ) + export XDG_SESSION_TYPE="x11" session="startx /usr/bin/$wm" + #session="pgrep bspwm || startx $HOME/.config/X11/.xinitrc" + #session="pgrep bspwm || (unset DISPLAY XAUTHORITY; startx $HOME/.config/X11/.xinitrc)" + #session="startx /home/srdusr/.config/X11/.xinitrc" + #session="exec bspwm -name login" break ;; Hyprland | sway) -- cgit v1.2.3