2023-01-30 14:28:59 +01:00
|
|
|
if [ -z $DISPLAY ] && [ "$(tty)" = "/dev/tty1" ]; then
|
2023-05-31 19:30:44 +02:00
|
|
|
# Lade die Bootparameter in den Variablen
|
|
|
|
for wort in $(cat /proc/cmdline)
|
|
|
|
do
|
|
|
|
echo "Parameter ${wort%=*} = ${wort#*=}"
|
|
|
|
if ! export ${wort%=*}=${wort#*=}; then echo "cannot export ${wort}!!!"; fi
|
|
|
|
done
|
|
|
|
|
2023-06-05 23:31:57 +02:00
|
|
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
|
|
|
|
|
|
|
export PATH="$PATH:/home/${USER}/.local/bin/"
|
|
|
|
export PATH="$PATH:/home/${USER}/go/bin/"
|
|
|
|
export PATH="$PATH:/home/${USER}/.local/share/flatpak/exports/bin/"
|
|
|
|
|
|
|
|
export XDG_DATA_DIRS="/usr/share/:/usr/local/share/:/var/lib/flatpak/exports/share/:/home/${USER}/.local/share/flatpak/exports/share/"
|
|
|
|
|
|
|
|
# Added by Toolbox App
|
|
|
|
export PATH="$PATH:/home/${USER}/.local/share/JetBrains/Toolbox/scripts"
|
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
# Falls autostartdesktop auf i3 gesetzt wird, wird i3 statt sway gestartet
|
2023-05-31 19:51:41 +02:00
|
|
|
if [ "${autostartdesktop}" = "i3" ]; then
|
2023-05-31 19:30:44 +02:00
|
|
|
echo "exec i3" > ~/.xinitrc
|
|
|
|
startx
|
|
|
|
else
|
|
|
|
# First make sure dbus is started
|
|
|
|
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
|
|
|
export DBUS_SESSION_BUS_ADDRESS="$(dbus-daemon --session --fork --print-address)"
|
2023-01-30 14:28:59 +01:00
|
|
|
fi
|
2023-05-31 19:30:44 +02:00
|
|
|
echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"
|
2023-01-30 14:28:59 +01:00
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
# Set XDG_RUNTIME_DIR
|
|
|
|
# Paragraph modified from https://wiki.gentoo.org/wiki/Sway
|
|
|
|
if test -z "${XDG_RUNTIME_DIR}"; then
|
|
|
|
UID="$(id -u)"
|
|
|
|
export XDG_RUNTIME_DIR=/tmp/"${UID}"-runtime-dir
|
|
|
|
if ! test -d "${XDG_RUNTIME_DIR}"; then
|
|
|
|
mkdir "${XDG_RUNTIME_DIR}"
|
|
|
|
chmod 0700 "${XDG_RUNTIME_DIR}"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Enable SSH agent
|
|
|
|
eval $(keychain --noask --eval --quiet)
|
2023-01-30 14:28:59 +01:00
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
# Various exports
|
2023-01-30 14:28:59 +01:00
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
export SHELL="$(command -v zsh)"
|
2023-01-30 14:28:59 +01:00
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
export QT_QPA_PLATFORMTHEME=qt5ct
|
|
|
|
export QT_QPA_PLATFORM=wayland
|
|
|
|
export QT_WAYLAND_DISABLE_WINDOWDECORATION="1"
|
|
|
|
export GDK_BACKEND=wayland
|
|
|
|
export XDG_SESSION_TYPE=wayland
|
|
|
|
export XDG_CURRENT_DESKTOP=sway
|
|
|
|
export WLR_NO_HARDWARE_CURSORS=1
|
|
|
|
export CLUTTER_BACKEND=wayland
|
|
|
|
export SDL_VIDEODRIVER=wayland
|
2023-06-06 09:23:57 +02:00
|
|
|
export BEMENU_BACKEND=wayland
|
2023-01-30 14:28:59 +01:00
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
export _JAVA_AWT_WM_NONREPARENTING=1 #Make java programs work somewhat
|
|
|
|
export ECORE_EVAS_ENGINE=wayland_egl
|
|
|
|
export ELM_ENGINE=wayland_egl
|
2023-01-30 14:28:59 +01:00
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
export PAN_MESA_DEBUG=gl3 #Fix alacritty not starting
|
|
|
|
export MOZ_ENABLE_WAYLAND=1 # Fix firefox not starting
|
2023-01-30 14:28:59 +01:00
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
export TERMINAL=wezterm
|
|
|
|
export EDITOR=vim
|
2023-05-05 13:35:43 +02:00
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
#export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:~/.local/lib/
|
2023-01-30 14:28:59 +01:00
|
|
|
|
2023-05-31 19:30:44 +02:00
|
|
|
#XDG_CURRENT_DESKTOP=sway dbus-run-session sway
|
|
|
|
exec sway
|
|
|
|
fi
|
2023-01-30 14:28:59 +01:00
|
|
|
fi
|