diff --git a/.chezmoiignore b/.chezmoiignore new file mode 100644 index 0000000..732173a --- /dev/null +++ b/.chezmoiignore @@ -0,0 +1,14 @@ +# if the os is darwin +{{ if ne .chezmoi.os "darwin" }} +.zshrc_darwin +.zshenv_darwin +{{ end }} +# if the os is linux +{{ if ne .chezmoi.os "linux"}} +.zshrc_linux +.zshenv_linux +.config/kitty +.config/rofi +.config/sway +.config/waybar +{{ end }} diff --git a/dot_zshenv_darwin b/dot_zshenv_darwin new file mode 100644 index 0000000..5223a95 --- /dev/null +++ b/dot_zshenv_darwin @@ -0,0 +1,3 @@ +. "$HOME/.cargo/env" + +ssh-add --apple-use-keychain ~/.ssh/id\_ed25519 2>/dev/null diff --git a/dot_zshenv b/dot_zshenv_linux similarity index 100% rename from dot_zshenv rename to dot_zshenv_linux diff --git a/dot_zshrc_darwin b/dot_zshrc_darwin new file mode 100644 index 0000000..4ed7f8e --- /dev/null +++ b/dot_zshrc_darwin @@ -0,0 +1,82 @@ +zstyle ':znap:*' repos-dir ~/znap +source ~/repos/zsh-snap/znap.zsh +typeset -g POWERLEVEL9K_INSTANT_PROMPT=off +# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc. +# Initialization code that may require console input (password prompts, [y/n] +# confirmations, etc.) must go above this block; everything else may go below. +if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" +fi + +# If you come from bash you might have to change your $PATH. +# export PATH=$HOME/bin:/usr/local/bin:$PATH + +# Path to your oh-my-zsh installation. +export ZSH="$HOME/.oh-my-zsh" + +ZSH_THEME="powerlevel10k/powerlevel10k" + +# plugins + +znap source marlonrichert/zsh-autocomplete + +zstyle ':autocomplete:*' min-input 1 + +znap source zsh-users/zsh-autosuggestions +znap source zsh-users/zsh-completions + +plugins=(git) + +source $ZSH/oh-my-zsh.sh + +# User configuration + +# export MANPATH="/usr/local/man:$MANPATH" + +# You may need to manually set your language environment +# export LANG=en_US.UTF-8 + +# Preferred editor for local and remote sessions +if [[ -n $SSH_CONNECTION ]]; then + export EDITOR='vim' +else + export EDITOR='mvim' +fi + +# Compilation flags +# export ARCHFLAGS="-arch x86_64" + +# Aliases +alias ls="exa" +alias tree="exa --tree" + +# change cat to bat +alias cat="bat" + +# vim to nvim +alias vim="nvim" +alias vi="nvim" + +# codium to code +alias code="codium" + +# cd to z +alias cd="z" +# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. +[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +export VOLTA_HOME="$HOME/.volta" +export PATH="$VOLTA_HOME/bin:$PATH" + +# tabtab source for packages +# uninstall by removing these lines +[[ -f ~/.config/tabtab/zsh/__tabtab.zsh ]] && . ~/.config/tabtab/zsh/__tabtab.zsh || true + +# bun completions +[ -s "/Users/rileysmith/.bun/_bun" ] && source "/Users/rileysmith/.bun/_bun" + +# bun +export BUN_INSTALL="/Users/rileysmith/.bun" +export PATH="$BUN_INSTALL/bin:$PATH" + +# zoxide +eval "$(zoxide init zsh)" diff --git a/dot_zshrc b/dot_zshrc_linux similarity index 100% rename from dot_zshrc rename to dot_zshrc_linux diff --git a/symlink_dot_zshenv.tmpl b/symlink_dot_zshenv.tmpl new file mode 100644 index 0000000..84fcecb --- /dev/null +++ b/symlink_dot_zshenv.tmpl @@ -0,0 +1 @@ +.zshenv_{{ .chezmoi.os }} diff --git a/symlink_dot_zshrc.tmpl b/symlink_dot_zshrc.tmpl new file mode 100644 index 0000000..3640924 --- /dev/null +++ b/symlink_dot_zshrc.tmpl @@ -0,0 +1 @@ +.zshrc_{{ .chezmoi.os }}