-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot-bashrc
91 lines (73 loc) · 1.98 KB
/
dot-bashrc
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
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Source global definitions
if [ -f /etc/bashrc ]; then
source /etc/bashrc
fi
shopt -s checkwinsize
shopt -s expand_aliases
shopt -s histappend
set -o vi
bind 'set completion-ignore-case on'
# Add Local Build Paths to $PATH
export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/.local/man:$PATH
export PATH=$HOME/.local/scripts:$PATH
# Export ENV Vars
export VISUAL=nvim
export EDITOR=nvim
# Setup FZF
if [[ -x "$(command -v fzf)" ]]; then
eval "$(fzf --bash)"
fi
# Setup Mise
if [[ -x "$(command -v mise)" ]]; then
eval "$(mise activate bash)"
fi
# Setup Starship Prompt
if [[ -x "$(command -v starship)" ]]; then
export STARSHIP_CONFIG="$HOME/.config/starship/config.toml"
eval "$(starship init bash)"
fi
# Setup Tmuxifier
if [[ -x "$(command -v tmux)" ]]; then
if [[ -d $HOME/.config/tmux/plugins/tmuxifier ]]; then
export PATH=$HOME/.config/tmux/plugins/tmuxifier/bin:$PATH
export TMUXIFIER_LAYOUT_PATH="$HOME/.config/tmuxifier/"
eval "$(tmuxifier init -)"
fi
fi
# Setup Zoxide
if [[ -x "$(command -v zoxide)" ]]; then
eval "$(zoxide init --cmd cd bash)"
fi
# Aliases
alias br='source $HOME/.bashrc'
if [[ -x "$(command -v bat)" ]]; then
alias cat='bat'
fi
if [[ -f $HOME/.config/dnf/config ]]; then
alias d="sudo dnf -c $HOME/.config/dnf/config"
else
alias d="sudo dnf"
fi
if [[ -x "$(command -v eza)" ]]; then
alias ls="eza --color=auto --icons=auto --group-directories-first"
else
alias ls="ls --color=auto"
fi
alias mup="source $HOME/.local/scripts/arch-mirror-update"
if [[ -f $HOME/.config/pacman/pacman.conf ]]; then
alias p="sudo pacman --config $HOME/.config/pacman/pacman.conf"
if [[ -x "$(command -v yay)" ]]; then
alias p="yay --repo --config $HOME/.config/pacman/pacman.conf"
fi
else
alias p="sudo pacman"
fi
alias v="nvim || nano"
if [[ -f $HOME/.config/pacman/pacman.conf ]]; then
alias y="yay --config $HOME/.config/pacman/pacman.conf"
else
alias y="yay"
fi