2022-04-16 19:54:07 +00:00
|
|
|
# vim: ft=sh
|
|
|
|
|
2023-09-05 16:45:45 +00:00
|
|
|
# GUI themes
|
|
|
|
export GTK_THEME="Gruvbox"
|
|
|
|
export ICON_THEME="Gruvbox"
|
|
|
|
export CURSOR_THEME="FlatbedCursors-White"
|
|
|
|
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"
|
|
|
|
|
2023-07-20 19:54:00 +00:00
|
|
|
# Setup editor
|
|
|
|
export EDITOR="${HOME}/.dotfiles/nix/bin/nvim"
|
|
|
|
|
2022-04-16 19:54:07 +00:00
|
|
|
# If not running interactively, don't do anything
|
|
|
|
case $- in
|
|
|
|
*i*) ;;
|
2023-09-05 16:45:45 +00:00
|
|
|
*) return;;
|
2022-04-16 19:54:07 +00:00
|
|
|
esac
|
|
|
|
|
|
|
|
# agetty is set to automatically log me in on tty1
|
|
|
|
# Automatically launch GUI on tty1 after login
|
2023-02-24 01:24:59 +00:00
|
|
|
if [ "$(tty)" == '/dev/tty1' ] && [ ! "$SSH_TTY" ]; then
|
|
|
|
. "${HOME}/.dotfiles/bash/bash_login"
|
|
|
|
LAST_GUI=$(cat "${HOME}/.spool/last_login_gui" 2>/dev/null)
|
2022-05-27 04:34:32 +00:00
|
|
|
if [ -f "${HOME}/.spool/last_login_gui" ]; then
|
|
|
|
${HOME}/scripts/${LAST_GUI}/start${LAST_GUI}.sh
|
2022-04-16 19:54:07 +00:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
# don't put duplicate lines or lines starting with space in the history.
|
|
|
|
shopt -s histappend
|
|
|
|
HISTCONTROL=ignoreboth
|
2022-12-13 03:44:24 +00:00
|
|
|
HISTFILE=${HOME}/.spool/bash_history
|
2022-04-16 19:54:07 +00:00
|
|
|
|
|
|
|
# append to the history file, don't overwrite it
|
|
|
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
|
|
|
HISTSIZE=500000
|
|
|
|
HISTFILESIZE=1000000
|
|
|
|
|
|
|
|
# check the window size after each command and, if necessary,
|
|
|
|
# update the values of LINES and COLUMNS.
|
|
|
|
shopt -s checkwinsize
|
|
|
|
|
|
|
|
# enable programmable completion features
|
|
|
|
if ! shopt -oq posix; then
|
2023-09-05 16:45:45 +00:00
|
|
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
|
|
|
. /usr/share/bash-completion/bash_completion
|
|
|
|
elif [ -f /etc/bash_completion ]; then
|
|
|
|
. /etc/bash_completion
|
|
|
|
fi
|
2022-04-16 19:54:07 +00:00
|
|
|
fi
|
|
|
|
|
2022-07-21 05:52:50 +00:00
|
|
|
# Set window title to last command
|
|
|
|
PROMPT_COMMAND='echo -e -n "\033]2;$_\007"'
|
2022-04-16 19:54:07 +00:00
|
|
|
# Reconfigure prompt after each return
|
2022-05-27 04:34:32 +00:00
|
|
|
PROMPT_COMMAND="$PROMPT_COMMAND; source ${HOME}/.dotfiles/bash/prompt.sh"
|
2022-07-21 05:52:50 +00:00
|
|
|
# Bell when prompt is returned to mark as urgent
|
|
|
|
PROMPT_COMMAND="$PROMPT_COMMAND;printf \"\a\"; history -a"
|
2022-04-16 19:54:07 +00:00
|
|
|
|
|
|
|
# Enable color support if possible
|
|
|
|
if [ -x /usr/bin/dircolors ]; then
|
2023-02-24 01:24:59 +00:00
|
|
|
test -r ${HOME}/.dircolors && eval "$(dircolors -b ${HOME}/.dircolors)" || eval "$(dircolors -b)"
|
2022-04-16 19:54:07 +00:00
|
|
|
alias ls='ls --color=auto'
|
|
|
|
alias dir='dir --color=auto'
|
|
|
|
alias vdir='vdir --color=auto'
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
alias egrep='egrep --color=auto'
|
|
|
|
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Load aliases
|
2023-02-24 01:24:59 +00:00
|
|
|
if [ -f ${HOME}/.dotfiles/bash/bash_aliases ]; then
|
|
|
|
. "${HOME}/.dotfiles/bash/bash_aliases"
|
2022-04-16 19:54:07 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# Perl configs
|
2023-10-24 17:13:01 +00:00
|
|
|
PERL5LIB="${HOME}/perl5/lib/perl5/x86_64-linux-gnu-thread-multi:${HOME}/.local/usr/local/lib/perl5/5.38.0:${HOME}/perl5/lib/perl5:${HOME}/perl5/lib/perl5/x86_64-linux-thread-multi:${PERL5LIB}"; export PERL5LIB;
|
|
|
|
PERL_LOCAL_LIB_ROOT="/var/home/jpm/.local/usr/local/lib/perl5/5.38.0:${HOME}/perl5/lib/perl5:${HOME}/perl5/lib/perl5/x86_64-linux-thread-multi:${PERL_LOCAL_LIB_ROOT}"; export PERL_LOCAL_LIB_ROOT;
|
|
|
|
#PERL_LIB="/var/home/jpm/.local/usr/local/lib/perl5/5.38.0"; export PERL_LIB;
|
|
|
|
PERL_LIB="/usr/local/lib/perl"; export PERL_LIB;
|
2022-05-27 04:34:32 +00:00
|
|
|
PERL_MB_OPT="--install_base \"${HOME}/perl5\""; export PERL_MB_OPT;
|
|
|
|
PERL_MM_OPT="INSTALL_BASE=${HOME}/perl5"; export PERL_MM_OPT;
|
2022-04-16 19:54:07 +00:00
|
|
|
|
2022-11-04 15:12:23 +00:00
|
|
|
# Android configs
|
|
|
|
JDK_HOME=/etc/java
|
|
|
|
STUDIO_JDK=/usr/lib/jvm/jre-openjdk
|
|
|
|
|
2022-04-16 19:54:07 +00:00
|
|
|
# Configure PATH
|
2022-04-19 04:43:58 +00:00
|
|
|
source "$HOME/.dotfiles/bash/path"
|
2022-04-16 19:54:07 +00:00
|
|
|
|
2022-11-04 22:35:26 +00:00
|
|
|
export LANG="C.UTF-8"
|
|
|
|
export LC_ALL="C.UTF-8"
|
|
|
|
export LC_CTYPE="C.UTF-8"
|
2022-04-16 19:54:07 +00:00
|
|
|
export LANGUAGE="en_US:en"
|
|
|
|
|
|
|
|
# terminal type
|
|
|
|
export TERM="xterm"
|
|
|
|
|
2022-07-21 05:52:50 +00:00
|
|
|
# Set initial title
|
|
|
|
echo -e -n "\033]2;Welcome to Bash\007"
|
2022-11-04 15:12:23 +00:00
|
|
|
|
2022-12-13 03:44:24 +00:00
|
|
|
if [ -f "/run/.containerenv" ]; then
|
2023-02-24 01:24:59 +00:00
|
|
|
source "$HOME/.dotfiles/bash/bashrc.distrobox"
|
2022-11-05 01:52:19 +00:00
|
|
|
else
|
2023-02-24 01:24:59 +00:00
|
|
|
source "$HOME/.dotfiles/bash/bashrc.host"
|
2022-11-05 01:52:19 +00:00
|
|
|
fi
|
2023-01-09 03:52:24 +00:00
|
|
|
|
|
|
|
source "$HOME/.cargo/env"
|
2023-10-24 17:13:01 +00:00
|
|
|
source ~/perl5/perlbrew/etc/bashrc
|
|
|
|
. "$HOME/.cargo/env"
|