.dotfiles/bash/bash_login

50 lines
1.3 KiB
Bash

#!/bin/bash
systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP
# Load aliases
source ${HOME}/.dotfiles/bash/bash_aliases
# Configure static SSH Agent
export SSH_AUTH_SOCK=$HOME/.spool/ssh-agent.sock
if [ -e $SSH_AUTH_SOCK ]; then
rm $SSH_AUTH_SOCK
fi
if [ -e $HOME/.spool/ssh-agent.env ]; then
rm $HOME/.spool/ssh-agent.env
fi
if [[ "`pgrep ssh-agent`" ]]; then
pkill ssh-agent
fi
. $HOME/scripts/ssh-agent.sh
# Static/predictable Sway socket
export SWAYSOCK=`sway --get-socketpath`
export LANG="C"
export LC_ALL="C"
export LC_CTYPE="C"
export LANGUAGE="en_US:en"
# Dirty config dir
export XDG_DATA_HOME="${HOME}/.config"
# GUI themes
export GTK_THEME="Gruvbox-Dark-BL"
export PROFILE_NAME="Oled"
export QT_QPA_PLATFORMTHEME="qt5ct"
export QT_QPA_PLATFORM="wayland-egl;wayland;xcb"
export GDK_BACKEND="wayland"
export DCONF=".config/dconf/user"
# Suggest session start command if last session is not known
if [ ! -e ${HOME}/.spool/last_login_gui ]; then
echo "Use 'startsway' or 'starti3' to launch a GUI"
fi
if [ -f "/run/.containerenv" ] && grep -oP "(?<=name=\")[^\";]+" /run/.containerenv; then
source $HOME/.dotfiles/bash/bash_login.distrobox
else
source $HOME/.dotfiles/bash/bash_login.host
fi