diff --git a/.profile b/.profile index 56c0a4a..54c5cc0 100644 --- a/.profile +++ b/.profile @@ -1,18 +1,7 @@ -# Fig pre block. Keep at the top of this file. -[[ -f "$HOME/.fig/shell/zprofile.pre.zsh" ]] && . "$HOME/.fig/shell/zprofile.pre.zsh" -# Fig pre block. Keep at the top of this file. -[[ -f "$HOME/.fig/shell/profile.pre.bash" ]] && . "$HOME/.fig/shell/profile.pre.bash" # Load profiles from /etc/profile.d if test -d $HOME/.profile.d/; then for profile in $HOME/.profile.d/*.sh; do test -r "$profile" && . "$profile" done unset profile -fi -. "$HOME/.cargo/env" - -# Fig post block. Keep at the bottom of this file. -[[ -f "$HOME/.fig/shell/profile.post.bash" ]] && . "$HOME/.fig/shell/profile.post.bash" - -# Fig post block. Keep at the bottom of this file. -[[ -f "$HOME/.fig/shell/zprofile.post.zsh" ]] && . "$HOME/.fig/shell/zprofile.post.zsh" +fi \ No newline at end of file diff --git a/.profile.d/go.sh b/.profile.d/go.sh index 2cf8ebb..9c3d85d 100644 --- a/.profile.d/go.sh +++ b/.profile.d/go.sh @@ -1,6 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash -GOPATH=$HOME/Go -GOBIN=$GOPATH/bin -export GOPATH -export GOBIN +if [[ "$HOST" == 'nymph.localhost' ]]; then + export GOPATH=$HOME/Go +elif [[ "$HOST" == 'ikaros.fritz.box' ]]; then + export GOPATH=$HOME/Library/Go +fi + +export GOBIN=$GOPATH/bin diff --git a/.profile.d/liquibase.sh b/.profile.d/liquibase.sh index dd7ca80..6fd29bb 100644 --- a/.profile.d/liquibase.sh +++ b/.profile.d/liquibase.sh @@ -1 +1,7 @@ -export LIQUIBASE_HOME="/usr/local/opt/liquibase/libexec" +#!/usr/bin/env bash + +if [[ "$HOST" == 'nymph.localhost' ]]; then + export LIQUIBASE_HOME="/usr/local/opt/liquibase/libexec" +elif [[ "$HOST" == 'ikaros.fritz.box' ]]; then + export LIQUIBASE_HOME="/opt/homebrew/Cellar/liquibase/4.12.0/libexec" +fi \ No newline at end of file diff --git a/.profile.d/zsh.sh b/.profile.d/zsh.sh index 7ef4bda..d235efc 100644 --- a/.profile.d/zsh.sh +++ b/.profile.d/zsh.sh @@ -1,3 +1,9 @@ #!/usr/bin/env bash -export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/usr/local/share/zsh-syntax-highlighting/highlighters +if [[ "$HOST" == 'nymph.localhost' ]]; then + export ZSH_HIGHLIGHT_DIR=/usr/local/share/zsh-syntax-highlighting + export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/usr/local/share/zsh-syntax-highlighting/highlighters +elif [[ "$HOST" == 'ikaros.fritz.box' ]]; then + export ZSH_HIGHLIGHT_DIR=/opt/homebrew/share/zsh-syntax-highlighting + export ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR=/opt/homebrew/share/zsh-syntax-highlighting/highlighters +fi \ No newline at end of file diff --git a/.zshenv b/.zshenv index cf55ea1..8c36d90 100644 --- a/.zshenv +++ b/.zshenv @@ -7,24 +7,25 @@ function appendpath() { esac } -appendpath $GOPATH/bin -appendpath $HOME/.local/bin -appendpath $HOME/.pyenv/bin -appendpath $HOME/.cargo/bin -appendpath /usr/local/opt/libarchive/bin -appendpath $HOME/.local/opt/kafka/bin -appendpath $HOME/.crc/bin -appendpath $HOME/.crc/bin/oc +if [[ "$HOST" == 'nymph.localhost' ]]; then + appendpath $GOPATH/bin + appendpath $HOME/.local/bin + appendpath $HOME/.pyenv/bin + appendpath $HOME/.cargo/bin + appendpath /usr/local/opt/libarchive/bin + appendpath $HOME/.local/opt/kafka/bin + appendpath $HOME/.crc/bin + appendpath $HOME/.crc/bin/oc + + source /usr/local/opt/git-extras/share/git-extras/git-extras-completion.zsh +elif [[ "$HOST" == 'ikaros.fritz.box' ]]; then + appendpath /opt/homebrew/bin + appendpath $GOPATH/bin + appendpath $HOME/.local/bin +fi + unset appendpath -source /usr/local/opt/git-extras/share/git-extras/git-extras-completion.zsh - -# Adding PROLOG programming language -export LDFLAGS="-L/usr/local/opt/libarchive/lib" -export CPPFLAGS="-I/usr/local/opt/libarchive/include" -export PKG_CONFIG_PATH="/usr/local/opt/libarchive/lib/pkgconfig" - #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!! -export SDKMAN_DIR="/Users/plague/.sdkman" -[[ -s "/Users/plague/.sdkman/bin/sdkman-init.sh" ]] && source "/Users/plague/.sdkman/bin/sdkman-init.sh" -. "$HOME/.cargo/env" +export SDKMAN_DIR="$HOME/.sdkman" +[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" diff --git a/.zshrc b/.zshrc index 7cd6e80..aa9a7bf 100644 --- a/.zshrc +++ b/.zshrc @@ -1,11 +1,5 @@ # Fig pre block. Keep at the top of this file. [[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && . "$HOME/.fig/shell/zshrc.pre.zsh" -# 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 @@ -21,7 +15,7 @@ ZSH_THEME="powerlevel10k/powerlevel10k" # Set list of themes to pick from when loading at random # Setting this variable when ZSH_THEME=random will cause zsh to load -# a theme from this variable instead of looking in ~/.oh-my-zsh/themes/ +# a theme from this variable instead of looking in $ZSH/themes/ # If set to an empty array, this variable will have no effect. # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) @@ -32,17 +26,16 @@ ZSH_THEME="powerlevel10k/powerlevel10k" # Case-sensitive completion must be off. _ and - will be interchangeable. # HYPHEN_INSENSITIVE="true" -# Uncomment the following line to disable bi-weekly auto-update checks. -# DISABLE_AUTO_UPDATE="true" - -# Uncomment the following line to automatically update without prompting. -# DISABLE_UPDATE_PROMPT="true" +# Uncomment one of the following lines to change the auto-update behavior +# zstyle ':omz:update' mode disabled # disable automatic updates +# zstyle ':omz:update' mode auto # update automatically without asking +# zstyle ':omz:update' mode reminder # just remind me to update when it's time # Uncomment the following line to change how often to auto-update (in days). -# export UPDATE_ZSH_DAYS=13 +# zstyle ':omz:update' frequency 13 # Uncomment the following line if pasting URLs and other text is messed up. -# DISABLE_MAGIC_FUNCTIONS=true +# DISABLE_MAGIC_FUNCTIONS="true" # Uncomment the following line to disable colors in ls. # DISABLE_LS_COLORS="true" @@ -54,6 +47,9 @@ ZSH_THEME="powerlevel10k/powerlevel10k" # ENABLE_CORRECTION="true" # Uncomment the following line to display red dots whilst waiting for completion. +# You can also set it to another string to have that shown instead of the default red dots. +# e.g. COMPLETION_WAITING_DOTS="%F{yellow}waiting...%f" +# Caution: this setting can cause issues with multiline prompts in zsh < 5.7.1 (see #5765) # COMPLETION_WAITING_DOTS="true" # Uncomment the following line if you want to disable marking untracked files @@ -73,8 +69,8 @@ ZSH_THEME="powerlevel10k/powerlevel10k" ZSH_CUSTOM=$ZSH/custom # Which plugins would you like to load? -# Standard plugins can be found in ~/.oh-my-zsh/plugins/* -# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ +# 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=( @@ -115,14 +111,6 @@ plugins=( source $ZSH/oh-my-zsh.sh # User configuration -if type brew &>/dev/null; then - FPATH=$(brew --prefix)/share/zsh-completions:$FPATH - autoload -Uz compinit - compinit -fi - -# source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh -source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # export MANPATH="/usr/local/man:$MANPATH" @@ -153,12 +141,17 @@ bindkey -e autoload -U compinit && compinit -# pyenv configuration -eval "$(pyenv init -)" -eval "$(pyenv virtualenv-init -)" +source "$ZSH_HIGHLIGHT_DIR/zsh-syntax-highlighting.zsh" # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +# pyenv configuration +eval "$(pyenv init -)" +eval "$(pyenv virtualenv-init -)" + # Fig post block. Keep at the bottom of this file. [[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && . "$HOME/.fig/shell/zshrc.post.zsh" + +test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh" +