-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
110 lines (87 loc) · 2.88 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
# Path
export PATH=$HOME/bin:/usr/local/bin:$PATH:/opt/homebrew/bin:$HOME/.rustup/toolchains/stable-aarch64-apple-darwin/bin/
##### OH MY ZSH config #####
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# 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="gallois"
# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git docker rust)
# Enable autocompletions through homebrew
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
source $ZSH/oh-my-zsh.sh
# User configuration
# Preferred editor for local and remote sessions
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vim'
else
export EDITOR='hx'
fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
alias vim="nvim"
alias ycl="cd ~/code/brooks-builds/ycl"
alias lms="cd ~/code/brooks-builds/lms"
alias db="cd ~/code/brooks-builds/brooks_builds/database/"
alias gp="git pull"
alias gs="git status"
alias ts="trunk serve"
alias lt="erd -I -l -H -s name --no-git -. -y inverted"
alias find="erd -I -l -H -p"
alias finddir="erd -I -l -H -t dir -p"
alias zzshrc="zellij ac new-tab -l zshrc"
alias gd="git config branch.main.description"
alias gsd="git branch --edit-description"
alias zca="zellij ac new-tab -l course_articles"
alias ls="eza"
alias ll="eza -l"
alias la="eza -la"
# NVM (Node Version Manager)
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
# Rust
source $HOME/.cargo/env
##### Update configs #####
# (
# if [[ -v ZSH_REPO && -n "$ZSH_REPO" ]]; then
# cd $ZSH_REPO
# if ! ./install.sh; then
# echo "failed to update zsh config"
# fi
# fi
# )
# (
# if [[ -v ALACRITTY_REPO && -n "$ALACRITTY_REPO" ]]; then
# cd $ALACRITTY_REPO
# if ! ./install.sh; then
# echo "failed to update alacritty config"
# fi
# fi
# )
# (
# if [[ -v ZELLIJ_REPO && -n "$ZELLIJ_REPO" ]]; then
# cd $ZELLIJ_REPO
# if ! ./install.sh; then
# echo "failed to update zsh config"
# fi
# fi
# )
function random_port() {
echo $((1024 + RANDOM % (65535 - 1024 + 1)))
}