-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_bashrc
More file actions
62 lines (48 loc) · 2.14 KB
/
Copy pathdot_bashrc
File metadata and controls
62 lines (48 loc) · 2.14 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
50
51
52
53
54
55
56
57
58
59
60
61
62
# Omarchy environment (OMARCHY_PATH + PATH), needed even for non-interactive shells
[[ -r /usr/share/omarchy/default/bash/env-bootstrap ]] && source /usr/share/omarchy/default/bash/env-bootstrap
# Exit if not running interactively
[[ $- != *i* ]] && return
# Disable terminal flow control
stty -ixon
# Omarchy aliases and functions
source "$OMARCHY_PATH/default/bash/rc"
# Local bin, again
[[ -d "$HOME/.local/bin" ]] && export PATH="$HOME/.local/bin:$PATH"
# Binding fzf
bind '"\C-a": "\C-r"' # Ctrl + A: History widget
bind '"\C-s": "\C-t"' # Ctrl + S: File widget
bind '"\C-x": "\ec"' # Ctrl + X: CD widget
# Clear and exit bindings
bind '"\C-q": "exit\n"'
bind '"\C-w": "clear\n"'
# Sourcing from a single directory
if [[ -d "${HOME}/.bashrc.d" ]]; then
for default in "${HOME}/.bashrc.d/"*.bashrc; do
[[ -f "${default}" ]] && source "${default}"
done
fi
# Fzf default style: Partial Catppuccin
export FZF_DEFAULT_OPTS='--style full --input-label " Search " --preview "fzf-preview.sh {}" --pointer="◆" --color="fg:#cdd6f4,fg+:#d0d9f5,list-fg:#cdd6f4,selected-fg:#d0d9f5 \
bg:-1,bg+:#2A2B3C,list-bg:-1,selected-bg:#222444,preview-bg:-1 \
input-bg:-1,header-bg:-1,footer-bg:-1,gutter:#1b1b29 \
hl:#89B4FA,hl+:#f38ba8,selected-hl:#f38ba8 \
info:#A6E3A1,prompt:#94E2D5,pointer:#CBA6F7,marker:#a76af2,spinner:#CBA6F7 \
header:#89b4fa,footer:#89b4fa,ghost:#6c7086,disabled:#6c7086 \
list-border:#A6E3A1,preview-border:#A6E3A1 \
input-border:#A6E3A1,header-border:#A6E3A1,footer-border:#A6E3A1 \
label:#94E2D5,list-label:#94E2D5,preview-label:#94E2D5 \
input-label:#94E2D5,header-label:#94E2D5,footer-label:#94E2D5 \
scrollbar:#b895e3,preview-scrollbar:#b895e3,separator:#585b70,gap-line:#585b70 \
alt-bg:-1,query:-1,nth:italic,nomatch:-1"'
# Fzf command history style (without preview)
export FZF_CTRL_R_OPTS='--no-preview --wrap'
# Nvim man mode for man
export MANPAGER='nvim +Man!'
# Go lang
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
# Manage history better across terminals and with higher limits
shopt -s histappend
PROMPT_COMMAND="history -a; history -c; history -r${PROMPT_COMMAND:+; $PROMPT_COMMAND}"
export HISTSIZE=10000
export HISTFILESIZE=20000