Configurazione per ikaros

This commit is contained in:
Fabio Scotto di Santolo
2022-07-06 10:37:37 +02:00
parent 3f9e3afb01
commit e9733a8e6e
6 changed files with 62 additions and 64 deletions

View File

@@ -1,7 +1,3 @@
# 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 # Load profiles from /etc/profile.d
if test -d $HOME/.profile.d/; then if test -d $HOME/.profile.d/; then
for profile in $HOME/.profile.d/*.sh; do for profile in $HOME/.profile.d/*.sh; do
@@ -9,10 +5,3 @@ if test -d $HOME/.profile.d/; then
done done
unset profile unset profile
fi 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"

View File

@@ -1,6 +1,9 @@
#!/bin/bash #!/usr/bin/env bash
GOPATH=$HOME/Go if [[ "$HOST" == 'nymph.localhost' ]]; then
GOBIN=$GOPATH/bin export GOPATH=$HOME/Go
export GOPATH elif [[ "$HOST" == 'ikaros.fritz.box' ]]; then
export GOBIN export GOPATH=$HOME/Library/Go
fi
export GOBIN=$GOPATH/bin

View File

@@ -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

View File

@@ -1,3 +1,9 @@
#!/usr/bin/env bash #!/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

37
.zshenv
View File

@@ -7,24 +7,25 @@ function appendpath() {
esac esac
} }
appendpath $GOPATH/bin if [[ "$HOST" == 'nymph.localhost' ]]; then
appendpath $HOME/.local/bin appendpath $GOPATH/bin
appendpath $HOME/.pyenv/bin appendpath $HOME/.local/bin
appendpath $HOME/.cargo/bin appendpath $HOME/.pyenv/bin
appendpath /usr/local/opt/libarchive/bin appendpath $HOME/.cargo/bin
appendpath $HOME/.local/opt/kafka/bin appendpath /usr/local/opt/libarchive/bin
appendpath $HOME/.crc/bin appendpath $HOME/.local/opt/kafka/bin
appendpath $HOME/.crc/bin/oc 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 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!!! #THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="/Users/plague/.sdkman" export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "/Users/plague/.sdkman/bin/sdkman-init.sh" ]] && source "/Users/plague/.sdkman/bin/sdkman-init.sh" [[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
. "$HOME/.cargo/env"

47
.zshrc
View File

@@ -1,11 +1,5 @@
# Fig pre block. Keep at the top of this file. # Fig pre block. Keep at the top of this file.
[[ -f "$HOME/.fig/shell/zshrc.pre.zsh" ]] && . "$HOME/.fig/shell/zshrc.pre.zsh" [[ -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. # If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$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 # Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load # 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. # If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" ) # ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )
@@ -32,17 +26,16 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
# Case-sensitive completion must be off. _ and - will be interchangeable. # Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true" # HYPHEN_INSENSITIVE="true"
# Uncomment the following line to disable bi-weekly auto-update checks. # Uncomment one of the following lines to change the auto-update behavior
# DISABLE_AUTO_UPDATE="true" # zstyle ':omz:update' mode disabled # disable automatic updates
# zstyle ':omz:update' mode auto # update automatically without asking
# Uncomment the following line to automatically update without prompting. # zstyle ':omz:update' mode reminder # just remind me to update when it's time
# DISABLE_UPDATE_PROMPT="true"
# Uncomment the following line to change how often to auto-update (in days). # 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. # 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. # Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true" # DISABLE_LS_COLORS="true"
@@ -54,6 +47,9 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
# ENABLE_CORRECTION="true" # ENABLE_CORRECTION="true"
# Uncomment the following line to display red dots whilst waiting for completion. # 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" # COMPLETION_WAITING_DOTS="true"
# Uncomment the following line if you want to disable marking untracked files # Uncomment the following line if you want to disable marking untracked files
@@ -73,8 +69,8 @@ ZSH_THEME="powerlevel10k/powerlevel10k"
ZSH_CUSTOM=$ZSH/custom ZSH_CUSTOM=$ZSH/custom
# Which plugins would you like to load? # Which plugins would you like to load?
# Standard plugins can be found in ~/.oh-my-zsh/plugins/* # Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse) # Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup. # Add wisely, as too many plugins slow down shell startup.
plugins=( plugins=(
@@ -115,14 +111,6 @@ plugins=(
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
# User configuration # 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" # export MANPATH="/usr/local/man:$MANPATH"
@@ -153,12 +141,17 @@ bindkey -e
autoload -U compinit && compinit autoload -U compinit && compinit
# pyenv configuration source "$ZSH_HIGHLIGHT_DIR/zsh-syntax-highlighting.zsh"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.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. # Fig post block. Keep at the bottom of this file.
[[ -f "$HOME/.fig/shell/zshrc.post.zsh" ]] && . "$HOME/.fig/shell/zshrc.post.zsh" [[ -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"