2023-08-05 19:29:17 +00:00
|
|
|
# vim: set filetype=zsh:
|
2023-07-17 04:50:01 +00:00
|
|
|
# Put this on bottom of ~/.zshrc
|
2023-07-07 17:25:25 +00:00
|
|
|
|
2023-10-06 08:03:33 +00:00
|
|
|
# https://www.topbug.net/blog/2016/09/27/make-gnu-less-more-powerful/
|
|
|
|
export LESS="-RF -i -K -s -x2 --wordwrap"
|
|
|
|
|
2022-12-01 03:42:39 +00:00
|
|
|
# nvim
|
2023-03-16 08:43:03 +00:00
|
|
|
if command -v nvim &>/dev/null; then
|
2023-08-05 19:29:17 +00:00
|
|
|
export EDITOR=nvim
|
|
|
|
export VISUAL=nvim
|
|
|
|
export GIT_EDITOR=nvim
|
|
|
|
alias vi="nvim"
|
|
|
|
alias vim="nvim"
|
2023-03-04 17:25:40 +00:00
|
|
|
fi
|
2022-12-01 03:42:39 +00:00
|
|
|
|
|
|
|
# go
|
|
|
|
export GOPATH=$HOME/go
|
|
|
|
export PATH=$PATH:$GOPATH/bin
|
|
|
|
# Depend on your company
|
|
|
|
# Please copy this manually to ~/.zshrc
|
2023-08-05 19:29:17 +00:00
|
|
|
# export GOPRIVATE=example.company.com
|
2022-12-01 03:42:39 +00:00
|
|
|
|
|
|
|
# fzf
|
2023-08-06 07:26:21 +00:00
|
|
|
# https://github.com/junegunn/fzf
|
2023-04-19 09:58:24 +00:00
|
|
|
if command -v fzf &>/dev/null; then
|
2023-08-05 19:29:17 +00:00
|
|
|
if command -v fd &>/dev/null; then
|
|
|
|
export FZF_DEFAULT_COMMAND="fd --type file"
|
|
|
|
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
|
|
|
export FZF_ALT_C_COMMAND="fd --type directory"
|
|
|
|
fi
|
2022-12-01 03:42:39 +00:00
|
|
|
|
2023-10-28 20:00:03 +00:00
|
|
|
# https://github.com/catppuccin/fzf
|
2023-09-11 16:36:18 +00:00
|
|
|
export FZF_DEFAULT_OPTS="\
|
2023-08-05 19:29:17 +00:00
|
|
|
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
|
|
|
|
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
|
|
|
|
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8"
|
2023-10-29 15:40:07 +00:00
|
|
|
|
|
|
|
if command -v bat &>/dev/null; then
|
|
|
|
export FZF_CTRL_T_OPTS="--preview 'bat --color=always --line-range=:500 {}'"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if command -v eza &>/dev/null; then
|
|
|
|
export FZF_ALT_C_OPTS="--preview 'eza --tree --level 1 {}'"
|
|
|
|
fi
|
2023-04-19 09:58:24 +00:00
|
|
|
fi
|
2022-12-01 03:42:39 +00:00
|
|
|
|
|
|
|
# Alias
|
|
|
|
alias g="git"
|
|
|
|
alias moe="make"
|
2023-06-29 07:43:56 +00:00
|
|
|
alias meo="make"
|
2022-12-01 03:42:39 +00:00
|
|
|
|
2024-01-16 14:50:48 +00:00
|
|
|
# https://github.com/BurntSushi/ripgrep
|
|
|
|
if command -v rg &>/dev/null; then
|
|
|
|
export RIPGREP_CONFIG_PATH="$HOME/.config/ripgrep/ripgreprc"
|
|
|
|
fi
|
|
|
|
|
2023-10-29 15:40:07 +00:00
|
|
|
# https://github.com/eza-community/eza
|
|
|
|
if command -v eza &>/dev/null; then
|
|
|
|
alias ls="eza"
|
|
|
|
alias la="eza -la"
|
2024-01-06 07:05:52 +00:00
|
|
|
alias lt="eza --tree"
|
2023-10-29 15:40:07 +00:00
|
|
|
fi
|
|
|
|
|
2023-12-25 05:59:00 +00:00
|
|
|
# https://github.com/wilfred/difftastic
|
|
|
|
if command -v difft &>/dev/null; then
|
|
|
|
export DFT_DISPLAY=inline
|
2024-01-16 07:09:24 +00:00
|
|
|
export DFT_CONTEXT=5
|
|
|
|
export DFT_TAB_WIDTH=2
|
2023-12-25 05:59:00 +00:00
|
|
|
fi
|
|
|
|
|
2023-07-29 17:18:59 +00:00
|
|
|
# https://github.com/charmbracelet/glow
|
2023-08-05 19:29:17 +00:00
|
|
|
if command -v glow &>/dev/null; then
|
|
|
|
alias gl="glow"
|
2023-08-04 19:05:13 +00:00
|
|
|
fi
|
|
|
|
|
2023-01-22 14:06:31 +00:00
|
|
|
# https://restic.readthedocs.io/en/latest/manual_rest.html
|
2023-04-19 09:58:24 +00:00
|
|
|
if command -v restic &>/dev/null; then
|
2023-08-05 19:29:17 +00:00
|
|
|
export RESTIC_PASSWORD_FILE=$HOME/.restic_password_file
|
2023-04-19 09:58:24 +00:00
|
|
|
fi
|
2023-01-22 14:06:31 +00:00
|
|
|
|
2023-03-04 17:25:40 +00:00
|
|
|
# https://github.com/sharkdp/vivid
|
2023-03-16 08:43:03 +00:00
|
|
|
if command -v vivid &>/dev/null; then
|
2023-08-06 07:26:21 +00:00
|
|
|
export LS_COLORS="$(vivid generate catppuccin-mocha)"
|
2023-03-04 17:25:40 +00:00
|
|
|
fi
|
2023-03-16 08:27:23 +00:00
|
|
|
|
2023-04-19 09:58:24 +00:00
|
|
|
# https://github.com/jarun/nnn
|
|
|
|
if command -v nnn &>/dev/null; then
|
2023-08-05 19:29:17 +00:00
|
|
|
export NNN_FIFO=/tmp/nnn.fifo
|
|
|
|
export NNN_PLUG="p:-preview-tui"
|
2023-04-19 09:58:24 +00:00
|
|
|
fi
|
2023-08-19 10:19:53 +00:00
|
|
|
|
2023-08-21 17:19:18 +00:00
|
|
|
# https://github.com/talwat/pokeget-rs
|
2023-10-28 20:08:04 +00:00
|
|
|
rand_poke=$((RANDOM % 6))
|
2023-08-19 11:25:12 +00:00
|
|
|
if [[ $rand_poke -eq 0 ]]; then
|
|
|
|
cat ~/.config/pokeget/pikachu.txt
|
|
|
|
elif [[ $rand_poke -eq 1 ]]; then
|
|
|
|
cat ~/.config/pokeget/clefairy.txt
|
|
|
|
elif [[ $rand_poke -eq 2 ]]; then
|
|
|
|
cat ~/.config/pokeget/ditto.txt
|
|
|
|
elif [[ $rand_poke -eq 3 ]]; then
|
|
|
|
cat ~/.config/pokeget/chikorita.txt
|
2023-10-28 20:08:04 +00:00
|
|
|
elif [[ $rand_poke -eq 4 ]]; then
|
|
|
|
cat ~/.config/pokeget/eevee.txt
|
|
|
|
elif [[ $rand_poke -eq 5 ]]; then
|
|
|
|
cat ~/.config/pokeget/squirtle.txt
|
2023-08-19 11:25:12 +00:00
|
|
|
fi
|
2023-10-28 19:35:20 +00:00
|
|
|
|
|
|
|
# Depend on your company
|
|
|
|
# https://github.com/ankitpokhrel/jira-cli
|
2023-10-28 19:46:18 +00:00
|
|
|
# Remember to jira init local not cloud
|
2023-10-28 19:35:20 +00:00
|
|
|
export JIRA_AUTH_TYPE=bearer
|