2023-09-26 17:12:28 +02:00
|
|
|
|
# SSH Agent
|
2024-02-21 13:59:55 +01:00
|
|
|
|
if ! pgrep -u "$USER" ssh-agent > /dev/null || [[ ! -f "$XDG_RUNTIME_DIR/ssh-agent.env" ]]; then
|
2023-09-26 17:12:28 +02:00
|
|
|
|
pkill -u "$USER" -9 ssh-agent
|
|
|
|
|
ssh-agent > "$XDG_RUNTIME_DIR/ssh-agent.env"
|
|
|
|
|
fi
|
|
|
|
|
source "$XDG_RUNTIME_DIR/ssh-agent.env" > /dev/null
|
|
|
|
|
|
|
|
|
|
# If NVIDIA, set env vars
|
2023-10-08 09:44:35 +02:00
|
|
|
|
#if ! printenv SSH_TTY &> /dev/null && lspci | grep -q 'VGA.*NVIDIA'; then
|
|
|
|
|
# export GBM_BACKEND=nvidia-drm
|
|
|
|
|
# export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
|
|
|
|
# export LIBVA_DRIVER_NAME=nvidia
|
|
|
|
|
# export __GL_GSYNC_ALLOWED=1
|
|
|
|
|
# export __GL_VRR_ALLOWED=0
|
|
|
|
|
# export WLR_NO_HARDWARE_CURSORS=1
|
|
|
|
|
#fi
|
2023-09-26 17:12:28 +02:00
|
|
|
|
|
|
|
|
|
# Restore Wal colors if not SSH session
|
|
|
|
|
printenv SSH_TTY &> /dev/null || wal -R
|
|
|
|
|
|
2023-10-08 09:44:35 +02:00
|
|
|
|
# Autostart on TTY1:
|
|
|
|
|
# Hyprland on laptop
|
2024-02-21 07:59:34 +01:00
|
|
|
|
[[ "$XDG_VTNR" -eq 1 ]] && [[ "$HOST" = 'vrz-lt' ]] && exec dbus-run-session Hyprland
|
2023-10-08 09:44:35 +02:00
|
|
|
|
|
|
|
|
|
# Plasma on desktop
|
|
|
|
|
[[ "$XDG_VTNR" -eq 1 ]] && [[ "$HOST" = 'vrz-dt' ]] && startx
|