Add stuff from workstation to .bashrc
This commit is contained in:
parent
75f917e709
commit
1edcc573a7
18
bash/.bashrc
18
bash/.bashrc
|
@ -15,6 +15,10 @@ export PATH="$PATH:$HOME/.local/bin/:$HOME/go/bin/"
|
|||
|
||||
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
|
||||
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
|
||||
# Use lesspipe if it exists
|
||||
if command -v lesspipe >/dev/null; then
|
||||
export LESSOPEN="| $(command -v lesspipe) %s";
|
||||
export LESSCLOSE="$(command -v lesspipe) %s %s";
|
||||
declare lesspath
|
||||
lesspath="$(command -v lesspipe)"
|
||||
export LESSOPEN="| $lesspath %s";
|
||||
export LESSCLOSE="$lesspath %s %s";
|
||||
fi
|
||||
|
||||
# Enable colors in less
|
||||
|
@ -63,3 +69,11 @@ source ~/.config/shell/aliasrc
|
|||
md() {
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue