-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
.bash_profile
125 lines (98 loc) · 3.79 KB
/
.bash_profile
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/env bash
# vim: ft=bash
function is-debug() {
[[ $((DEBUG + BASHMATIC_DEBUG + BASHMATIC_PATH_DEBUG)) -gt 0 ]]
}
[[ -z ${BASHMATIC_HOME} ]] && {
[[ -d ~/.bashmatic ]] && export BASHMATIC_HOME="${HOME}/.bashmatic"
}
[[ -d ${BASHMATIC_HOME} ]] || bash -c "$(curl -fsSL https://bashmatic.re1.re); bashmatic-install -q"
[[ -d ${BASHMATIC_HOME} ]] || {
echo "Can't find Bashmatic, even after attempting an installation."
echo "Please install Bashmatic with the following command line:"
echo 'bash -c "$(curl -fsSL https://bashmatic.re1.re); bashmatic-install"'
} >&2
[[ -s "${BASHMATIC_HOME}/.bash_safe_source" ]] &&
source "${BASHMATIC_HOME}/.bash_safe_source"
# shellcheck source="./bash_safe_source"
if [[ ! -f "${BASHMATIC_HOME}/.bash_safe_source" ]]; then
function source_if_exists() {
for file in "$@"; do
if [[ -s "${file}" ]]; then
source "${file}"
local code=$?
is-debug && printf "[debug] loading file: [${bldgrn}%40.40s${clr}]"
if ((code)); then
if is-debug; then
printf " (exit code: ${code} [ 💣 ])\n"
else
echo "WARNING: sourced file ${file} returned non-zero code ${code}" >&2
fi
fi
else
echo "WARNING: sourced file ${file} does not exist" >&2
fi
done
}
fi
source_if_exists /usr/local/etc/bash_completion
# Path to the bash it configuration
export BASH_IT="/Users/kig/.bash_it"
# Lock and Load a custom theme file.
# Leave empty to disable theming.
# location /.bash_it/themes/
export BASH_IT_THEME="powerline-multiline"
# (Advanced): Change this to the name of your remote repo if you
# cloned bash-it with a remote other than origin such as `bash-it`.
#export BASH_IT_REMOTE='bash-it'
export BASH_IT_REMOTE='kigster/bash-it'
# Your place for hosting Git repos. I use this for private repos.
export GIT_HOSTING='[email protected]'
# Don't check mail when opening terminal.
unset MAILCHECK
# Change this to your console based IRC client of choice.
export IRC_CLIENT='irssi'
# Set this to the command you use for todo.txt-cli
export TODO="t"
# Set Xterm/screen/Tmux title with only a short hostname.
# Uncomment this (or set SHORT_HOSTNAME to something else),
# Will otherwise fall back on $HOSTNAME.
export SHORT_HOSTNAME=$(hostname -s)
# Set Xterm/screen/Tmux title with only a short username.
# Uncomment this (or set SHORT_USER to something else),
# Will otherwise fall back on $USER.
#export SHORT_USER=${USER:0:8}
# Set Xterm/screen/Tmux title with shortened command and directory.
# Uncomment this to set.
export SHORT_TERM_LINE=true
# Set vcprompt executable path for scm advance info in prompt (demula theme)
# https://github.com/djl/vcprompt
#export VCPROMPT_EXECUTABLE=~/.vcprompt/bin/vcprompt
# (Advanced): Uncomment this to make Bash-it reload itself automatically
# after enabling or disabling aliases, plugins, and completions.
# export BASH_IT_AUTOMATIC_RELOAD_AFTER_CONFIG_CHANGE=1
# Uncomment this to make Bash-it create alias reload.
# export BASH_IT_RELOAD_LEGACY=1
# source ~/.powerline
# Load Bash It
export BASH_IT_P4_DISABLED=true
#export SCM_GIT_SHOW_MINIMAL_INFO=false
if [[ "${ITERM_PROFILE}" =~ "Light" || "${ITERM_PROFILE}" =~ "light" ]]; then
export BASH_IT_COLORSCHEME=light
elif [[ "${ITERM_PROFILE}" =~ "Dark" || "${ITERM_PROFILE}" =~ "dark" ]]; then
export BASH_IT_COLORSCHEME=dark
else
export BASH_IT_COLORSCHEME=tango
fi
export SCM=git
export SCM_CHECK=true
export SCM_GIT_SHOW_CURRENT_USER=true
export SCM_GIT_SHOW_DETAILS=true
export SCM_GIT_SHOW_COMMIT_COUNT=false
export SCM_GIT_SHOW_REMOTE_INFO=true
export SCM_GIT_SHOW_STASH_INFO=true
source_if_exists "${BASH_IT}"/bash_it.sh
export POWERLINE_LEFT_PROMPT="scm cwd"
export POWERLINE_RIGHT_PROMPT="clock node"
source_if_exists ~/.bash_it/colorschemes/tango*
source_if_exists "${HOME}"/.bashrc