-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bashrc
More file actions
49 lines (36 loc) · 1.6 KB
/
dot_bashrc
File metadata and controls
49 lines (36 loc) · 1.6 KB
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
#!/usr/bin/env bash
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# fish as interactive shell
if [[ $(ps --no-header --pid="$PPID" --format=comm) != "fish" && -z ${BASH_EXECUTION_STRING} && ${SHLVL} == 1 ]]; then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=''
# shellcheck disable=SC2086
exec fish $LOGIN_OPTION
fi
# ----------------------------Prompt--------------------------- #
eval "$(oh-my-posh init bash --config="$XDG_CONFIG_HOME/oh-my-posh/themes/bubblesline.omp.toml")"
# ------------------Completions & Initializations-------------- #
[ -r /usr/share/bash-completion/bash_completion ] &&
. /usr/share/bash-completion/bash_completion
eval "$(zoxide init bash)"
eval "$(atuin init bash)"
eval "$(fzf --bash)"
eval "$(SHELL=/usr/bin/bash batpipe)"
eval "$(direnv hook bash)"
# ---------------------------Options--------------------------- #
# shellcheck disable=SC2155
[ "$(command -v vivid)" != "" ] &&
export LS_COLORS="$(vivid generate gruvbox-dark)"
# History
export HISTSIZE=50000
export SAVEHIST=10000
export HISTCONTROL=ignoredups:erasedups
export HISTFILE="$XDG_STATE_HOME/bash/history"
shopt -s histappend # Append to history, don't overwrite it
# Vi mode
set -o vi
# ----------------------------Binds---------------------------- #
# ---------------------------Imports--------------------------- #
[ -f "$XDG_CONFIG_HOME/bash/functions.sh" ] && . "$XDG_CONFIG_HOME/bash/functions.sh"
[ -f "$XDG_CONFIG_HOME/bash/aliases.sh" ] && . "$XDG_CONFIG_HOME/bash/aliases.sh"
[ -f "$XDG_CONFIG_HOME/sh/aliases.sh" ] && . "$XDG_CONFIG_HOME/sh/aliases.sh"