diff options
| author | Eugene Triguba <eugene.triguba@paymentworks.com> | 2025-07-07 08:45:05 -0400 |
|---|---|---|
| committer | Eugene Triguba <eugene.triguba@paymentworks.com> | 2025-07-07 08:45:05 -0400 |
| commit | b6f57c53d10e9f0b841c41aadcd0234332ec1438 (patch) | |
| tree | 9d24d92191e36390bae35bad050b3609c12795dc /zsh | |
| parent | tweak nvim config (diff) | |
| parent | adjust hotkey (diff) | |
| download | dotfiles-b6f57c53d10e9f0b841c41aadcd0234332ec1438.zip | |
Merge remote-tracking branch 'upstream'
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/.zsh/aliases.sh | 24 | ||||
| -rw-r--r-- | zsh/.zsh/completion.sh | 4 | ||||
| -rw-r--r-- | zsh/.zsh/env.sh | 10 | ||||
| -rw-r--r-- | zsh/.zsh/history.sh | 5 | ||||
| -rw-r--r-- | zsh/.zsh/languages.sh | 35 | ||||
| -rw-r--r-- | zsh/.zsh/path.sh | 6 | ||||
| -rw-r--r-- | zsh/.zsh/tmux.sh | 5 | ||||
| -rwxr-xr-x | zsh/.zshrc | 79 |
8 files changed, 96 insertions, 72 deletions
diff --git a/zsh/.zsh/aliases.sh b/zsh/.zsh/aliases.sh new file mode 100644 index 0000000..6239f43 --- /dev/null +++ b/zsh/.zsh/aliases.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env zsh + +# Git +alias gs="git status" +alias gc="git commit" +alias ga="git add" +alias gd="git diff" +alias gds="git diff --staged" +alias gp="git push" +alias gpo="git push origin" +alias gpl="git pull" +alias gplrb="git pull --rebase" +alias gl="git log" +alias gv="git log --graph --decorate --oneline" +alias gch="git checkout" +alias gcb="git checkout -b" + +# System +alias h="history 25" +alias j="jobs -l" +alias l="ls -alG" +alias vi="nvim" +alias vim="nvim" +alias tf="terraform" diff --git a/zsh/.zsh/completion.sh b/zsh/.zsh/completion.sh new file mode 100644 index 0000000..981c523 --- /dev/null +++ b/zsh/.zsh/completion.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env zsh + +autoload -Uz compinit +compinit diff --git a/zsh/.zsh/env.sh b/zsh/.zsh/env.sh new file mode 100644 index 0000000..429c8a4 --- /dev/null +++ b/zsh/.zsh/env.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env zsh + +export EDITOR="nvim" +export BROWSER="" +export GPG_TTY=$(tty) +export PAGER="less" +export MANPAGER="less" +export BAT_THEME="tokyonight_night" +export SRC_DIR="$HOME/src" +export BIN_DIR="$HOME/bin" diff --git a/zsh/.zsh/history.sh b/zsh/.zsh/history.sh new file mode 100644 index 0000000..e834b85 --- /dev/null +++ b/zsh/.zsh/history.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env zsh + +export HISTFILE=~/.zhistory +export HISTSIZE=100000 +export SAVEHIST=100000 diff --git a/zsh/.zsh/languages.sh b/zsh/.zsh/languages.sh new file mode 100644 index 0000000..36ade67 --- /dev/null +++ b/zsh/.zsh/languages.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env zsh + +# Go +export GOPATH="$SRC_DIR/go" +export GOBIN="$SRC_DIR/go/bin" +export PATH="$GOPATH/bin:$PATH" +export PATH="$GOROOT/bin:$PATH" +export PATH="$GOBIN:$PATH" + +# Python +export PYENV_ROOT="$HOME/.pyenv" +export PATH="$PYENV_ROOT/bin:$PATH" +command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" + +# Rust +source "$HOME/.cargo/env" + +# Node.js +export NVM_DIR="$HOME/.nvm" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" + +# PNPM +export PNPM_HOME="/Users/eugene/Library/pnpm" +case ":$PATH:" in +*":$PNPM_HOME:"*) ;; +*) export PATH="$PNPM_HOME:$PATH" ;; +esac + +# Homebrew +eval "$(brew shellenv)" +export LDFLAGS="-L/opt/homebrew/lib" +export CPPFLAGS="-I/opt/homebrew/include" +export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib" diff --git a/zsh/.zsh/path.sh b/zsh/.zsh/path.sh new file mode 100644 index 0000000..d000618 --- /dev/null +++ b/zsh/.zsh/path.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env zsh + +export PATH="$BIN_DIR:$PATH" +export PATH="$HOME/.local/bin:$PATH" +export PATH="$HOME/.poetry/bin:$PATH" +export PATH="/opt/homebrew/opt/curl/bin:$PATH" diff --git a/zsh/.zsh/tmux.sh b/zsh/.zsh/tmux.sh new file mode 100644 index 0000000..1c0620d --- /dev/null +++ b/zsh/.zsh/tmux.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env zsh +# +if [[ -z "$TMUX" ]]; then + tmux attach-session -t "$USER" || tmux new-session -s "$USER" +fi @@ -1,75 +1,10 @@ #!/usr/bin/env zsh source ~/.zsh/prompt.sh - -autoload -Uz compinit -compinit - -export HISTFILE=~/.zhistory -export HISTSIZE=100000 -export SAVEHIST=100000 - -export EDITOR="nvim" -export BROWSER="" -export BAT_THEME="tokyonight_night" -export MANPAGER="less" -export PAGER="less" -export TERM="xterm-256color" - -export GPG_TTY=$(tty) - -export SRC_DIR="$HOME/src" -export BIN_DIR="$HOME/bin" - -export PATH="$BIN_DIR:$PATH" -export PATH="$HOME/.poetry/bin:$PATH" -export PATH="$GOPATH/bin:$PATH" -export PATH="$GOROOT/bin:$PATH" -export PATH="$HOME/.local/bin:$PATH" - -export GOPATH="$SRC_DIR/go" -export GOBIN="$SRC_DIR/go/bin" -export PATH="$GOBIN:$PATH" - -export PYENV_ROOT="$HOME/.pyenv" -export PATH="$PYENV_ROOT/bin:$PATH" -command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" -eval "$(pyenv virtualenv-init -)" - -export NVM_DIR="$HOME/.nvm" -[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" - -export PNPM_HOME="/Users/eugene/Library/pnpm" -case ":$PATH:" in -*":$PNPM_HOME:"*) ;; -*) export PATH="$PNPM_HOME:$PATH" ;; -esac - -eval "$(brew shellenv)" -export LDFLAGS="-L/opt/homebrew/lib" -export CPPFLAGS="-I/opt/homebrew/include" -export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib" -export PATH="/opt/homebrew/opt/curl/bin:$PATH" - -alias gs="git status" -alias gc="git commit" -alias ga="git add" -alias gd="git diff" -alias gds="git diff --staged" -alias gp="git push" -alias gpo='git push origin' -alias gplrb='git pull --rebase' -alias gpl="git pull" -alias gl='git log' -alias gch="git checkout" -alias gcb='git checkout -b' -alias gv='git log --graph --decorate --oneline' - -alias h="history 25" -alias j="jobs -l" -alias l="ls -alG" - -alias tf="terraform" -alias vi="nvim" -alias vim="nvim" +source ~/.zsh/tmux.sh +source ~/.zsh/completion.sh +source ~/.zsh/history.sh +source ~/.zsh/env.sh +source ~/.zsh/path.sh +source ~/.zsh/languages.sh +source ~/.zsh/aliases.sh |