-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_zshrc
99 lines (81 loc) · 4 KB
/
dot_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
95
96
97
98
99
# My zshrc config for starship prompt and zinit plugin manager
# Environment Variables
export ZSH="$HOME/.oh-my-zsh"
export PATH="$HOME/.local/bin:$PATH"
export PATH="$PATH:/mnt/c/Users/lucas/AppData/Local/Microsoft/WindowsApps"
export PATH="$PATH:/mnt/c/Users/lucas/AppData/Local/Programs/Microsoft VS Code/bin"
export PATH="$PATH:/mnt/c/Program Files/Docker/Docker/resources/bin"
export PATH="$PATH:/mnt/c/ProgramData/DockerDesktop/version-bin"
export PATH="$PATH:/mnt/c/WINDOWS"
export PATH="$PATH:/mnt/c/Program Files (x86)/Microsoft/Edge/Application/120.0.2210.133"
export EDITOR=code
export FZF_DEFAULT_COMMAND="fd --type f --strip-cwd-prefix --hidden --follow --exclude .git"
export FZF_DEFAULT_OPTS="$FZF_DEFAULT_OPTS \
--color='hl:#5f87af,hl+:#5fd7ff,info:#afaf87,marker:#87ff00' \
--color='prompt:#d7005f,spinner:#af5fff,pointer:#af5fff,header:#87afaf' \
--color='border:#262626,label:#aeaeae,query:#d9d9d9' \
--border=rounded --border-label=ZED --border-label-pos=0 --preview-window=border-rounded \
--prompt='> ' --marker='>' --pointer='◆' --separator='─' \
--scrollbar='│' --info=right \
--height 60% --multi --preview='bat --color=always {}'"
source /usr/share/fzf
# Theme and Plugins
ZSH_THEME="robbyrussell"
plugins=(aliases tmux colored-man-pages gh vscode git docker golang archlinux ansible)
# auto-update behavior
# zstyle ':omz:update' mode disabled # disable automatic updates
zstyle ':omz:update' mode auto # update automatically without asking
# zstyle ':omz:update' mode reminder # just remind me to update when it's time
source $ZSH/oh-my-zsh.sh
# Rust zsh-alternativs install with yay
# yay -S exa fd procs sd dust ripgrep tokei hyperfine bottom tealdeer bandwhich grex
# Custom Aliases
alias zshrc="code .zshrc"
alias ssc="cd .config && code starship.toml"
alias ls="exa --icons" # Improved ls command with icons using 'exa'
alias cls="clear" # Clear screen command
alias find="fd" # Improved 'find' command using 'fd'
alias pd="procs" # Display running processes with 'procs'
alias sed="sd" # Improved 'sed' command using 'sd'
alias du="dust" # Improved 'du' command using 'dust'
alias ssha="ssh-add ~/.ssh/id_ed25519" # Add SSH key to agent
alias ghc="gh copilot" # Shortcut for GitHub Copilot command
alias v="nvim" # Use Neovim instead of Vim
alias chez="chezmoi" # Uuse chez instead of chezmoi
# Fuzzy Finder Aliases
#alias fzf="fzf --height 40%" # Fuzzy finder with 40% height
#alias fzfm="fzf --height 40% --multi" # Fuzzy finder with 40% height and multi select
#alias nfzf="fzf | xargs nvim" # Fuzzy finder with Neovim
alias cfzf="fzf | xargs code" # Fuzzy finder with VSCode
alias cdf='cd $(find ${1:-.} --type directory | fzf)' # Fuzzy finder for directories
# Zinit Installation Check
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git" && \
print -P "%F{33} %F{34}Installation successful.%f%b" || \
print -P "%F{160} The clone has failed.%f%b"
fi
# Zinit Initialization
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
zdharma-continuum/zinit-annex-as-monitor \
zdharma-continuum/zinit-annex-bin-gem-node \
zdharma-continuum/zinit-annex-patch-dl \
zdharma-continuum/zinit-annex-rust
### End of Zinit's installer chunk
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light zdharma-continuum/fast-syntax-highlighting
# asdf
. /opt/asdf-vm/asdf.sh
# starship
eval "$(starship init zsh)"
# ssh agent
eval "$(ssh-agent -s)"
# zoxide
eval "$(zoxide init zsh)"