-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profile
46 lines (42 loc) · 1.11 KB
/
.bash_profile
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
# General settings
export CLICOLOR=1
export CDPATH=.
# use ripgrep for fzf
# https://github.com/BurntSushi/ripgrep
export FZF_DEFAULT_COMMAND="rg --files --smart-case"
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
# Preferred editor for local and remote sessions
export EDITOR='nvim'
set -o vi
# Aliases
alias zshrc="vim ~/.zshrc"
alias vimrc="vim ~/.vimrc"
alias chrome="open -a 'Google Chrome'"
alias fp="fzf --preview 'bat --style=numbers --color=always --line-range :500 {}'"
alias ls="colorls -larth"
alias colorls="arch -x86_64 colorls"
alias .1="cd .."
alias .2="cd ../.."
alias .3="cd ../../.."
alias mux="tmuxinator"
alias agrep="alias | grep"
alias code=~/bin/code
alias python=python3
alias vim=nvim
alias b='buku --suggest'
alias bs="b --oa --np -s"
function mkdircd () { mkdir -p "$@" && eval cd "\"\$$#\""; }
function stopwatch {
start=$(date +%s)
while true; do
time="$(( $(date +%s) - $start))"
printf '%s\r' "$(date)"
sleep 0.1
done
}
function myquote {
quote_file=$DOTFILES/quotes.txt
# Retrieve a random quote
sed -n $(awk "END{ print $RANDOM%NR+1}" $quote_file)p $quote_file
}
myquote