-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
119 lines (100 loc) · 2.52 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
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
source ~/.zsh/functions/autoload.zsh
source ~/.zsh/functions/setopts.zsh
source ~/.zsh/functions/core.zsh
source ~/.zsh/default.zsh
zsh-theme "dracula"
zsh-prompt "default"
export EDITOR=nvim
export BROWSER=firefox
export MANPAGE='nvim +Man!'
export NNN_USE_EDITOR=1
export EMACS_ROOT="$HOME/.config/emacs"
export GAMBIT_ROOT="/usr/local/gambit/current"
export GERBIL_GSC="$GAMBIT_ROOT/bin/gsc"
export GERBIL_ROOT="$HOME/.gerbil"
export PYENV_ROOT="$HOME/.pyenv"
add_path "$HOME/bin"
add_path "$HOME/.cargo/bin"
add_path "$HOME/.local/bin"
add_path "$HOME/.git/bin"
add_path "$GAMBIT_ROOT/bin"
add_path "$GERBIL_ROOT/bin"
add_path "$PYENV_ROOT/bin"
add_path "$EMACS_ROOT/bin"
export LS_COLORS="$(vivid generate molokai)"
alias cat="bat"
alias calc="kalker"
alias cd="z"
alias clock="while true; do tty-clock -tcDsbS -C 4; done"
alias cp="cp -i" # Confirm before overwriting something
alias df="df -h"
alias find="fd"
alias free='free -m'
alias ls="eza --color=never"
alias ll="eza -l"
alias math="numbat"
alias poweroff="ask sudo poweroff"
alias repl="evcxr"
alias reload="source $HOME/.zshrc"
alias reset="reset -Q"
alias ssh="TERM=xterm-256color /usr/bin/ssh"
alias zed="zeditor"
alias zmux="zellij"
# posting
# bagels
alias copy="xclip -selection clipboard"
alias paste="xclip -selection clipboard -o"
chat() {
ollama run llama3.2
ollama stop llama3.2
}
crates() {
local crate_name="$1"
local api="https://crates.io/api/v1/crates/$crate_name"
local url="https://crates.io/crates/$crate_name"
local _status=$(http_status "$api")
if [ "$_status" = "200" ]; then
$BROWSER --new-tab $url
else
echo "$crate_name does not exist"
fi
}
docs() {
local crate_name="$1"
local url="https://docs.rs/$crate_name"
local _status=$(http_status "$url")
if [ "$_status" != "404" ]; then
$BROWSER --new-tab $url
else
echo "$crate_name does not exist"
fi
}
find-and-replace() {
rg "$1" --files-with-matches | xargs sed -i "s@$1@$2@g"
}
http_status() {
curl -s -o /dev/null -w "%{http_code}" "$1"
}
http-status() {
curl -s -o /dev/null -w "%{http_code}" $@
}
skk() {
sk --ansi -i -c 'rg --color=always --line-number "{}"'
}
tiny() {
cfonts "$@" -f tiny
}
vimclean() {
rm -rf ~/.cache/nvim
rm -rf ~/.local/share/nvim
}
weather() {
curl "https://v2.wttr.in/$1"
}
vencord() {
sh -c "$(curl -sS https://raw.githubusercontent.com/Vendicated/VencordInstaller/main/install.sh)"
}
eval "$(atuin init zsh)"
source <(fzf --zsh)
#eval "$(pyenv init -)"
eval "$(zoxide init zsh)"