Skip to content

Commit

Permalink
Add zshenv, move vars to it, and move other zsh files to .config
Browse files Browse the repository at this point in the history
  • Loading branch information
vicnett committed Nov 1, 2024
1 parent 2cbffad commit 01546d0
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 36 deletions.
7 changes: 4 additions & 3 deletions install.conf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@

- create:
- ~/.config/
- ~/.config/zsh

- link:
~/.zshrc:
force: true
path: zsh/zshrc
~/.zshenv: zsh/zshenv
~/.config/zsh/.zshrc: zsh/zshrc
~/.config/zsh/.zprofile: zsh/zprofile
~/.gitignore: git/gitignore
~/.config/nvim: vim
~/.byobu: byobu
Expand Down
1 change: 1 addition & 0 deletions zsh/zprofile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_byobu_sourced=1 . /usr/bin/byobu-launch 2>/dev/null || true
34 changes: 34 additions & 0 deletions zsh/zshenv
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# XDG dirs
export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_STATE_HOME="$HOME/.local/state"
export XDG_CACHE_HOME="$HOME/.cache"

# ZSH
export ZDOTDIR="$XDG_CONFIG_HOME/zsh"
export HISTFILE="$ZDOTDIR/.zhistory"
export HISTSIZE=10000
export SAVEHIST=10000

# Neovim
export EDITOR="nvim"
export VISUAL="nvim"
export DIFFPROG='nvim -d'

# Ripgrep
export RIPGREP_CONFIG_PATH="$DOTFILES_DIR/ripgreprc"

# FZF
export FZF_DEFAULT_COMMAND='fd --type f'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"

# Docker Rootless
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock

# Ruby gems
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
export PATH="$PATH:$GEM_HOME/bin"

# oh-my-zsh
export ZSH="$HOME/.oh-my-zsh"
export ZSH_CUSTOM="$DOTFILES_DIR/zsh/oh-my-zsh-custom-dir"
33 changes: 0 additions & 33 deletions zsh/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,10 @@ RCFILES_DIR="$HOME/.zshrc.d"
# Path stuff
PATH="$HOME/.local/bin:$PATH"

# Ruby gems
export GEM_HOME="$(ruby -e 'puts Gem.user_dir')"
export PATH="$PATH:$GEM_HOME/bin"

# ===========================
# == Begin oh-my-zsh stuff ==
# ===========================

export ZSH="$HOME/.oh-my-zsh"
export ZSH_CUSTOM="$DOTFILES_DIR/zsh/oh-my-zsh-custom-dir"

# Theme
ZSH_THEME="agnoster"

Expand Down Expand Up @@ -66,29 +59,6 @@ source /usr/bin/virtualenvwrapper.sh
# == End Python stuff ==
# ======================

# =====================
# == Begin variables ==
# =====================

# Preferred editor
export EDITOR='nvim'
export VISUAL='nvim'
export DIFFPROG='nvim -d'

# ripgrep config
export RIPGREP_CONFIG_PATH="$DOTFILES_DIR/ripgreprc"

# Use fd as default for fzf
export FZF_DEFAULT_COMMAND='fd --type f'
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"

# Docker rootless
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock

# ===================
# == End variables ==
# ===================

# ===================
# == Begin options ==
# ===================
Expand All @@ -108,9 +78,6 @@ zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' rehash true
# Speed up completions
zstyle ':completion:*' accept-exact '*(N)'
HISTFILE=~/.zhistory
HISTSIZE=10000
SAVEHIST=10000
# Don't consider certain characters part of the word
WORDCHARS=${WORDCHARS//\/[&.;]}

Expand Down

0 comments on commit 01546d0

Please sign in to comment.