Add stuff from workstation to .bashrc

This commit is contained in:
The Magician 2023-12-10 15:51:45 +00:00
parent 75f917e709
commit 1edcc573a7
1 changed files with 16 additions and 2 deletions

View File

@ -15,6 +15,10 @@ export PATH="$PATH:$HOME/.local/bin/:$HOME/go/bin/"
export CDPATH=".:$HOME" export CDPATH=".:$HOME"
export XDG_CONFIG_HOME="$HOME/.config/"
export XDG_DATA_HOME="$HOME/.local/share/"
export XDG_STATE_HOME="$HOME/.local/state/"
# The Prompt # The Prompt
export PS1='\[\e[38;2;161;161;0m\]\u\[\e[0m\]@\[\e[34m\]\h\[\e[0m\]:\[\e[32m\]\W\[\e[0m\]\$ ' export PS1='\[\e[38;2;161;161;0m\]\u\[\e[0m\]@\[\e[34m\]\h\[\e[0m\]:\[\e[32m\]\W\[\e[0m\]\$ '
@ -27,8 +31,10 @@ HISTFILESIZE=-1 # Don't truncate the history when reading the history fil
# Pager settings # Pager settings
# Use lesspipe if it exists # Use lesspipe if it exists
if command -v lesspipe >/dev/null; then if command -v lesspipe >/dev/null; then
export LESSOPEN="| $(command -v lesspipe) %s"; declare lesspath
export LESSCLOSE="$(command -v lesspipe) %s %s"; lesspath="$(command -v lesspipe)"
export LESSOPEN="| $lesspath %s";
export LESSCLOSE="$lesspath %s %s";
fi fi
# Enable colors in less # Enable colors in less
@ -63,3 +69,11 @@ source ~/.config/shell/aliasrc
md() { md() {
mkdir -p "$1" && cd "$1" mkdir -p "$1" && cd "$1"
} }
# Automatically run tmux if we aren't already in a session and there's no matching session already running
if [[ -z "$TMUX" && -z "$(tmux list-sessions | grep $HOSTNAME)" ]]; then
tmux new -s "$HOSTNAME"
fi
# AUtomatically run X if this is a login tty
[[ "$(tty)" == "/dev/tty1" ]] && ! pgrep -x Xorg >/dev/null && startx