-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_zshrc
More file actions
151 lines (127 loc) · 4.21 KB
/
Copy pathdot_zshrc
File metadata and controls
151 lines (127 loc) · 4.21 KB
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
source_if_exists() {
if [[ -r "$1" ]]; then
source "$1"
fi
}
path_prepend() {
[[ -d "$1" ]] && path=("$1" $path)
}
fpath_prepend() {
[[ -d "$1" ]] && fpath=("$1" $fpath)
}
load_nvm() {
unset -f nvm node npm npx corepack
source_if_exists "$NVM_DIR/nvm.sh"
source_if_exists "$NVM_DIR/bash_completion"
}
for cmd in nvm node npm npx corepack; do
eval "${cmd}() { load_nvm; ${cmd} \"\$@\"; }"
done
typeset -U path fpath
setopt prompt_subst
setopt auto_cd
export EDITOR="nvim"
export REPOS="$HOME/Repos"
export GITUSER="MovieMaker93"
export GHREPOS="$REPOS/github.com/$GITUSER"
export WORKSPACE="$HOME/workspace"
export DOTFILES="$HOME/.local/share/chezmoi"
export VAULT="$WORKSPACE/note-taking/zettelkasten-vault/PKM system"
export SCRIPTS="$WORKSPACE/scripts"
export HOMELAB="$GHREPOS/homelab"
export TERM="screen-256color"
export XDG_CONFIG_HOME="$HOME/.config"
export TMUXIFIER_LAYOUT_PATH="$HOME/tmux_layouts/layout/"
export GOROOT="/usr/local/go"
export GOPATH="$HOME/go"
export LOCAL_BIN="$HOME/.local"
export STARSHIP_CONFIG="$HOME/.config/starship/starship.toml"
export NVM_DIR="$HOME/.config/nvm"
export PNPM_HOME="$HOME/.local/share/pnpm"
export BUN_INSTALL="$HOME/.bun"
path_prepend "$HOME/bin"
path_prepend "$SCRIPTS"
path_prepend "$GOPATH/bin"
path_prepend "$GOROOT/bin"
path_prepend "$LOCAL_BIN/bin"
path_prepend "$HOME/.opencode/bin"
path_prepend "$PNPM_HOME"
path_prepend "$BUN_INSTALL/bin"
path_prepend "/snap/bin"
fpath_prepend "$HOME/.zsh/completions"
fpath_prepend "$HOME/.zsh/zsh-completions/src"
fpath_prepend "$HOME/.zfunc"
fpath=(${fpath:#/usr/share/zsh/vendor-completions})
HISTFILE="$HOME/.zsh_history"
HISTSIZE=10000
SAVEHIST=10000
setopt EXTENDED_HISTORY
setopt HIST_VERIFY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_FIND_NO_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_SAVE_NO_DUPS
setopt SHARE_HISTORY
setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY
if command -v kubectl >/dev/null 2>&1; then
source <(kubectl completion zsh)
fi
source_if_exists "$HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
source_if_exists "$HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
source_if_exists "$HOME/zsh-alias/aliases.zsh"
source_if_exists "$HOME/zsh-alias/git.zsh"
source_if_exists "$HOME/.aliases.local"
source_if_exists "$HOME/.fzf.zsh"
source_if_exists "$HOME/.deno/env"
source_if_exists "$HOME/.zshrc.local"
autoload -Uz compinit
if [[ -f "$HOME/.zcompdump" ]]; then
compinit -C
else
compinit
fi
zstyle ':completion:*' menu select
if command -v starship >/dev/null 2>&1; then
eval "$(starship init zsh)"
fi
if command -v direnv >/dev/null 2>&1; then
eval "$(direnv hook zsh)"
fi
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
alias pai='bun /home/moviemaker/.claude/PAI/Tools/pai.ts'
alias sum='fabric --pattern summarize'
alias wis='fabric --pattern extract_wisdom'
alias ysum='fabric --pattern summarize --yt-dlp-args="--sleep-requests 5" -y'
alias ywis='fabric --pattern extract_wisdom --yt-dlp-args="--sleep-requests 5" -y'
alias inbox-add='cp /mnt/c/Users/$(cmd.exe /c "echo %USERNAME%" 2>/dev/null | tr -d "\r")/Downloads/*.{m4a,mp3,wav,ogg} ~/recordings/inbox/ 2>/dev/null && echo "Moved to inbox" || echo "No audio files found in Downloads"'
alias lifelog='bun ~/.claude/tools/lifelog-pipeline/index.ts'
alias lifelog-review='bun ~/.claude/tools/lifelog-pipeline/review.ts'
alias lifelog-run='lifelog && lifelog-review'
alias claude-mem='bun "/home/moviemaker/.claude/plugins/marketplaces/thedotmack/plugin/scripts/worker-service.cjs"'
fpat() {
if [[ "$#" -lt 1 ]]; then
echo "Usage: fpat <pattern> [args...]"
return 1
fi
local pattern="$1"
shift
fabric --pattern "$pattern" "$@"
}
yt() {
if [[ "$#" -eq 0 || "$#" -gt 2 ]]; then
echo "Usage: yt [-t | --timestamps] youtube-link"
return 1
fi
local transcript_flag="--transcript"
if [[ "$1" == "-t" || "$1" == "--timestamps" ]]; then
transcript_flag="--transcript-with-timestamps"
shift
fi
fabric -y "$1" "$transcript_flag"
}
if command -v tmux >/dev/null 2>&1 && [[ -z "${TMUX:-}" ]] && [[ "${TERM_PROGRAM:-}" != "vscode" ]]; then
tmux attach -t default || tmux new -s default
fi