aboutsummaryrefslogtreecommitdiff
path: root/stow/rcs/.bashrc
blob: 241f2614067fa920cffe7d8a0de9843a319d892c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# $HOME/.bashrc: executed by bash(1) for non-login shells.

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

# [[ -z "$TMUX" ]] && exec tmux # Doesn't allow to automatically start X.

# Activate vi mode with <Escape>.
set -o vi

# Don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options.
HISTCONTROL=ignoreboth

# Append to the history file, don't overwrite it.
shopt -s histappend

# For setting history length see HISTSIZE and HISTFILESIZE in bash(1).
HISTSIZE=-1
HISTFILESIZE=-1

# Check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
[[ $DISPLAY ]] && shopt -s checkwinsize

# Disable ctrl-s and ctrl-q (Enables XON/XOFF flow control).
stty -ixon

# If set, the pattern "**" used in a pathname expansion context will
# match all files and zero or more directories and subdirectories.
#shopt -s globstar

if [ -r "/usr/share/bash-completion/bash_completion" ]; then
	. "/usr/share/bash-completion/bash_completion"
fi

# Set custom PS1 (prompt text variable)
def="\[\e[0;00m\]"
#red="\[\e[1;31m\]"
#green="\[\e[1;32m\]"
#yel="\[\e[1;33m\]"
blue="\[\e[1;34m\]"
pur="\[\e[1;35m\]"
#cyan="\[\e[1;36m\]"
#white="\[\e[1;37m\]"
keys="$blue"
wd="$pur"
umode="$blue"
PS1="${keys}[${wd}\u${keys}@${wd}\h${keys}]${wd}\w${umode}\$${def} "

# Source general and device specific aliases
[ -f "$XDG_CONFIG_HOME/rcs/bash_aliases" ] && . "$XDG_CONFIG_HOME/rcs/bash_aliases"
[ -f "$XDG_CONFIG_HOME/rcs/device_aliases" ] && . "$XDG_CONFIG_HOME/rcs/device_aliases"

# fzf goodies
[ -f "/usr/share/fzf/key-bindings.bash" ] && . "/usr/share/fzf/key-bindings.bash"
[ -f "/usr/share/fzf/completion.bash" ] && . "/usr/share/fzf/completion.bash"