-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
94 lines (78 loc) · 2.3 KB
/
.zshrc
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
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
path+=/usr/local/bin/ghc
path+=$HOME/.cargo/bin
eval "$(/opt/homebrew/bin/brew shellenv)"
export PATH;
source <(fzf --zsh)
# Path to your oh-my-zsh installation.
export ZSH="$HOME/.oh-my-zsh"
export TIMING=0
export NVM_DIR=~/.nvm
export FZF_BASE="/opt/homebrew/opt/fzf"
export EDITOR="nvim"
export NVM_DIR="$HOME/.nvm"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
ZSH_THEME="powerlevel10k/powerlevel10k"
ZSH_DISABLE_COMPFIX=true
GIT_AUTO_FETCH_INTERVAL=4140
GIT_PROMPT_EXECUTABLE="haskell"
plugins=(
git
gitignore
git-auto-fetch
git-prompt
last-working-dir
history
vscode
npm
nvm
sudo
themes
encode64
jira
zsh-autosuggestions
zsh-syntax-highlighting
Stack
tmux
tmuxinator
z
zsh-eza
)
source $ZSH/oh-my-zsh.sh
eza_params=('--git' '--icons' '--classify' '--group-directories-first' '--time-style=long-iso' '--group' '--color-scale')
# own aliases
alias vi="nvim"
alias cl="clear"
alias y="yarn"
alias ggf='gpf'
alias ls='eza $eza_params'
alias l='eza --git-ignore $eza_params'
alias ll='eza --all --header --long $eza_params'
alias llm='eza --all --header --long --sort=modified $eza_params'
alias la='eza -lbhHigUmuSa'
alias lx='eza -lbhHigUmuSa@'
alias lt='eza --tree $eza_params'
alias tree='eza --tree $eza_params'
[ -f "/Users/rejuv/.ghcup/env" ] && source "/Users/rejuv/.ghcup/env" # ghcup-env
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
if command -v zoxide > /dev/null; then
eval "$(zoxide init zsh)"
fi
# yazi-cwd
function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
fi
rm -f -- "$tmp"
}