-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
101 lines (75 loc) · 2.12 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
#
# ~/.bashrc
#
# for some reason my backspace suddenly work
# If not running interactively, don't do anything
# [[ $- != *i* ]] && return
# Make terminal default 258 colors
export TERM=xterm-256color
set LANG="en_US.UTF-8"
# Set to superior editing mode
set -o vi
# Turn on posix to get TAB completion
set +o posix
# keybinds
bind -x '"\C-l":clear'
# PATH
export PATH="$HOME/.local/bin:$PATH"
# Support gpt globally
declare OPENAI_API_KEY
OPENAI_API_KEY="$(head -1 "$HOME/.config/gpt/token")"
export OPENAI_API_KEY
# ~~~~~~~~~~~~~~~ Exports ~~~~~~~~~~~~~~~~~~~~~~~~
## bash
export HISTFILE=~/.config/bash/.histfile
export HISTSIZE=25000
export SAVEHIST=25000
export HISTCONTROL=ignorespace
## Set vim as default editor
EDITOR="/opt/homebrew/bin/vim"
## repos
export REPOS="$HOME/repos"
export GHUSER="$REPOS/martin-tomes"
export ICLOUD="$HOME/Library/Mobile\ Documents/"
export LOGSEQ="$ICLOUD/iCloud~com~logseq~logseq/Documents"
export ZET="$ICLOUD/iCloud~md~obsidian/Documents/zet"
# bat settings
export BAT_THEME="gruvbox-light"
# ~~~~~~~~~~~~~~~ Aliases ~~~~~~~~~~~~~~~~~~~~~~~~
alias cr="cd $REPOS"
alias cgh="cd $GHUSER"
alias cdt="cd $GHUSER/dotfiles"
alias crt="cd $GHUSER/js/react-tutorials"
alias clg="cd $LOGSEQ"
alias cz="cd $ZET"
# alias vi="nvi"
# alias vi="nvim"
#alias vim="nvim"
alias src="source $HOME/.bashrc"
alias raspi="ssh raspibolt"
alias ls="eza -ll --group-directories-first"
# alias cat="bat -p"
alias '?'="duck"
alias '??'="gpt"
alias python="python3"
alias gdiff="git diff --name-only --relative --diff-filter=d | xargs bat --diff --theme=gruvbox-dark"
alias fd="fd --color=always"
alias la="ls -la"
alias vv="nvim $HOME/.vimrc"
alias vb="nvim $HOME/.bashrc"
alias vn="nvim $HOME/.config/nvim/init.lua"
alias src="source $HOME/.bashrc"
# fzf
# [ -f ~/.fzf.bash ] && source ~/.fzf.bash
eval "$(fzf --bash)"
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
# pnpm
export PNPM_HOME="/Users/martin/Library/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
# pnpm end
# if [ -z "$TMUX" ]; then
# tmux attach -t default || tmux new -s default
# fi