dotfiles/.config/zsh/.zprofile
2023-10-27 13:03:05 +02:00

26 lines
795 B
Bash
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# SSH Agent
if [[ ! -f "$XDG_RUNTIME_DIR/ssh-agent.env" ]]; then
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
#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
# Restore Wal colors if not SSH session
printenv SSH_TTY &> /dev/null || wal -R
# Autostart on TTY1:
# Hyprland on laptop
[[ "$XDG_VTNR" -eq 1 ]] && [[ "$HOST" = 'vrz-lt' ]] && dbus-run-session Hyprland
# Plasma on desktop
[[ "$XDG_VTNR" -eq 1 ]] && [[ "$HOST" = 'vrz-dt' ]] && startx