-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
executable file
·129 lines (105 loc) · 3.57 KB
/
.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
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
126
127
128
129
#!/bin/bash
##############################################################################
## ble.sh
BLESH=$( guix package -I blesh | awk '{print $4}')
BLESH="$BLESH/share/blesh/ble.sh"
# Add this lines at the top of .bashrc:
[[ $- == *i* ]] && source "$BLESH" --noattach
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
##########
# history
export HISTSIZE=10000
export HISTFILESIZE=10000
## Racket
export PATH="$HOME/racket/bin:$PATH"
## Kitty
source <(kitty + complete setup bash)
export TERM=xterm-256color # otherwise ssh has keyboard problems
## Common Lisp
# SBCL
# export SBCL_HOME="/home/nabeel/.guix-profile/lib/sbcl/"
# Roswell
#export PATH="$PATH:/home/nabeel/.roswell/bin"
alias python='python3'
alias em='emacsclient --alternate-editor="" --create-frame --no-wait'
# lazy
alias ld='lazydocker'
alias lg='lazygit'
alias ls='ls -alh'
alias cat='bat'
alias l='eza --color=auto --icons -l'
alias rgi='rg --no-ignore --hidden -i'
# Set up fzf key bindings and fuzzy completion
# fuzzy completion using **<TAB>
# CTRL-T - Paste the selected files and directories onto the command-line
# CTRL-R - Paste the selected command from history onto the command-line
if command -v "fzf" >/dev/null 2>&1 ; then
eval "$(fzf --bash)"
# Print tree structure in the preview window
export FZF_ALT_C_OPTS="
--walker-skip .git,node_modules,target
--preview 'tree -C {}'"
# Preview file content using bat (https://github.com/sharkdp/bat)
export FZF_CTRL_T_OPTS="
--walker-skip .git,node_modules,target
--preview 'bat -n --color=always {}'
--bind 'ctrl-/:change-preview-window(down|hidden|)'"
# Options to fzf command
export FZF_COMPLETION_OPTS='--border --info=inline'
# Options for path completion (e.g. vim **<TAB>)
export FZF_COMPLETION_PATH_OPTS='--walker file,dir,follow,hidden'
# Options for directory completion (e.g. cd **<TAB>)
export FZF_COMPLETION_DIR_OPTS='--walker dir,follow'
fi
#safety
alias rm='echo "Use trash-cli instead of: rm"'
# Golang
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:"$HOME/go/bin"
# Automatically added by the Guix install script.
if [ -n "$GUIX_ENVIRONMENT" ]; then
if [[ $PS1 =~ (.*)"\\$" ]]; then
PS1="${BASH_REMATCH[1]} [env]\\\$ "
fi
fi
## Guix
if command -v "guix" >/dev/null 2>&1; then
export GUIX_LOCPATH="$HOME/.guix-profile/lib/locale"
export GUIX_PROFILE="$HOME/.guix-profile"
source "$GUIX_PROFILE/etc/profile"
export GUIX_CHECKOUT="$HOME/src/guix"
#
export PKG_CONFIG_PATH=$GUIX_PROFILE/lib/pkgconfig
# SSL certificate
export SSL_CERT_DIR="$HOME/.guix-profile/etc/ssl/certs"
export SSL_CERT_FILE="$HOME/.guix-profile/etc/ssl/certs/ca-certificates.crt"
export GIT_SSL_CAINFO="$SSL_CERT_FILE"
fi
# zoxide
eval "$(zoxide init --cmd cd bash)"
# Direnv
eval "$(direnv hook bash)"
# starship
eval "$(starship init bash)"
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='emacs'
else
export EDITOR='emacs'
fi
. "$HOME/.cargo/env"
# nvm
export NVM_DIR="$HOME/.config/nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
##############################################################################
## ble.sh
# Add this line at the end of .bashrc:
[[ ${BLE_VERSION-} ]] && ble-attach
# uv
source $HOME/.cargo/env
# when facing gdk_pixbuf_errors
# unset GDK_PIXBUF_MODULE_FILE
# vscode
# code --verbose --vmodule="*/components/os_crypt/*=1" --password-store="gnome-libsecret"