Compare commits

...

7 Commits

8 changed files with 59 additions and 53 deletions

View File

@@ -18,9 +18,6 @@ x-have oh-my-posh && {
eval "$(oh-my-posh init bash --config "$DOTFILES/config/omp/own.toml")" eval "$(oh-my-posh init bash --config "$DOTFILES/config/omp/own.toml")"
} }
. "$XDG_BIN_HOME/asdf/asdf.sh"
. "$XDG_BIN_HOME/asdf/completions/asdf.bash"
x-have antidot && { x-have antidot && {
eval "$(antidot init)" eval "$(antidot init)"
} }

View File

@@ -7,10 +7,10 @@ dotenv-linter 3.3.0
editorconfig-checker 2.8.0 editorconfig-checker 2.8.0
eza 0.19.0 eza 0.19.0
fd 10.1.0 fd 10.1.0
github-cli 2.54.0 github-cli 2.55.0
golang 1.22.6 golang 1.23.0
hadolint 2.12.0 hadolint 2.12.0
kubectl 1.30.3 kubectl 1.31.0
lazygit 0.43.1 lazygit 0.43.1
nodejs 22.6.0 nodejs 22.6.0
pipx 1.6.0 pipx 1.6.0
@@ -24,6 +24,6 @@ shfmt 3.8.0
terraform-lsp 0.0.12 terraform-lsp 0.0.12
terragrunt 0.66.3 terragrunt 0.66.3
tf-summarize 0.3.10 tf-summarize 0.3.10
vault 1.17.3 vault 1.17.3+ent
yamllint 1.35.1 yamllint 1.35.1
yq 4.44.3 yq 4.44.3

View File

@@ -5,23 +5,14 @@
# export DEBUG=1 # export DEBUG=1
export DOTFILES="$HOME/.dotfiles" export DOTFILES="$HOME/.dotfiles"
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$HOME/.local/share/bob/nvim-bin:$HOME/.local/share/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH" LOCAL_SHARE="$HOME/.local/share"
export PATH="$HOME/.local/bin:$DOTFILES/local/bin:$LOCAL_SHARE/bob/nvim-bin:$LOCAL_SHARE/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
export SHARED_SCRIPTS_SOURCED=0 export SHARED_SCRIPTS_SOURCED=0
source "$DOTFILES/config/shared.sh" source "$DOTFILES/config/shared.sh"
eval "$(oh-my-posh init zsh --config "$DOTFILES/config/omp/own.toml")" eval "$(oh-my-posh init zsh --config "$DOTFILES/config/omp/own.toml")"
# Load asdf
export ASDF_DIR="$XDG_BIN_HOME/asdf"
if [[ -d $ASDF_DIR ]]; then
[[ -d $ASDF_DIR/bin ]] && x-path-prepend "$ASDF_DIR/bin"
[[ -d $ASDF_DIR/shims ]] && x-path-prepend "$ASDF_DIR/shims"
[[ -d $ASDF_DIR/completions ]] && fpath=("$ASDF_DIR/completions" $fpath)
[[ -d $ASDF_DIR/plugins ]] && fpath=("$ASDF_DIR/plugins" $fpath)
source "$ASDF_DIR/asdf.sh"
fi
# Function to load antigen if available # Function to load antigen if available
load_antigen() load_antigen()
{ {
@@ -32,14 +23,21 @@ load_antigen()
antigen use oh-my-zsh antigen use oh-my-zsh
export ZSH_TMUX_AUTOSTART=true export ZSH_TMUX_AUTOSTART=false
export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf" export ZSH_TMUX_CONFIG="$DOTFILES/config/tmux/tmux.conf"
export ZSH_TMUX_UNICODE=true export ZSH_TMUX_UNICODE=true
export ZSH_TMUX_AUTOQUIT=false export ZSH_TMUX_AUTOQUIT=false
export ZSH_TMUX_DEFAULT_SESSION_NAME=main export ZSH_TMUX_DEFAULT_SESSION_NAME=main
zstyle :omz:plugins:ssh-agent quiet yes zstyle :omz:plugins:eza 'dirs-first' yes
zstyle :omz:plugins:eza 'git-status' yes
zstyle :omz:plugins:eza 'icons' yes
if [[ "$OSTYPE" == darwin* ]]; then
zstyle :omz:plugins:ssh-agent keychain yes
fi
zstyle :omz:plugins:ssh-agent lazy yes zstyle :omz:plugins:ssh-agent lazy yes
zstyle :omz:plugins:ssh-agent quiet yes
# z, the zsh version # z, the zsh version
export ZSHZ_DATA="$XDG_STATE_HOME/z" export ZSHZ_DATA="$XDG_STATE_HOME/z"
@@ -48,14 +46,15 @@ load_antigen()
x-have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv x-have python && antigen bundle MichaelAquilina/zsh-autoswitch-virtualenv
# these should be always available # these should be always available
antigen bundle jreese/zsh-titles
antigen bundle gnu-utils
antigen bundle ssh-agent
antigen bundle gpg-agent antigen bundle gpg-agent
antigen bundle brew antigen bundle brew
antigen bundle tmux antigen bundle tmux
antigen bundle colored-man-pages antigen bundle colored-man-pages
# antigen bundle ssh-agent
antigen bundle jreese/zsh-titles
antigen bundle zsh-users/zsh-completions antigen bundle zsh-users/zsh-completions
antigen bundle eza
# this needs to be the last item # this needs to be the last item
antigen bundle zsh-users/zsh-syntax-highlighting antigen bundle zsh-users/zsh-syntax-highlighting
@@ -73,17 +72,6 @@ source_fzf_config()
fi fi
} }
# Function to initialize pyenv if available
initialize_pyenv()
{
if x-have pyenv; then
[[ -d $PYENV_ROOT/bin ]] && x-path-append "$PYENV_ROOT/bin"
[[ -d $PYENV_ROOT/shims ]] && x-path-append "$PYENV_ROOT/shims"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
}
# Function to set up tmux window name plugin if tmux is active # Function to set up tmux window name plugin if tmux is active
setup_tmux_window_name_plugin() setup_tmux_window_name_plugin()
{ {
@@ -100,28 +88,15 @@ setup_tmux_window_name_plugin()
fi fi
} }
# Function to initialize antidot if available
initialize_antidot()
{
if x-have antidot; then
eval "$(antidot init)"
fi
}
initialize_direnv()
{
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
}
main() main()
{ {
load_antigen load_antigen
source_fzf_config source_fzf_config
initialize_pyenv
setup_tmux_window_name_plugin setup_tmux_window_name_plugin
initialize_antidot if x-have antidot; then
initialize_direnv eval "$(antidot init)"
fi
source "${XDG_CONFIG_HOME:-$HOME/.config}/asdf-direnv/zshrc"
} }
main "$@" main "$@"

View File

@@ -112,3 +112,13 @@ if [[ $(uname) == 'Darwin' ]]; then
# Using herd for php now, so this is not needed anymore # Using herd for php now, so this is not needed anymore
# x-set-php-aliases # x-set-php-aliases
fi fi
X_ALIAS_FILES=(
"$HOME/.config/alias-secret"
"$HOME/.config/alias-$(hostname)"
"$HOME/.config/alias-$(hostname)-secret"
)
for aliasFile in "${X_ALIAS_FILES[@]}"; do
[ -f "$aliasFile" ] && source "$aliasFile" && msg "Sourced $aliasFile"
done
unset X_ALIAS_FILES

View File

@@ -15,6 +15,16 @@
export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH" export PATH="$XDG_BIN_HOME:$DOTFILES/local/bin:$XDG_DATA_HOME/bob/nvim-bin:$XDG_DATA_HOME/cargo/bin:/opt/homebrew/bin:/usr/local/bin:$PATH"
# Load asdf
export ASDF_DIR="$XDG_BIN_HOME/asdf"
if [[ -d $ASDF_DIR ]]; then
[[ -d $ASDF_DIR/bin ]] && x-path-prepend "$ASDF_DIR/bin"
[[ -d $ASDF_DIR/shims ]] && x-path-prepend "$ASDF_DIR/shims"
[[ -d $ASDF_DIR/completions ]] && fpath=("$ASDF_DIR/completions" $fpath)
[[ -d $ASDF_DIR/plugins ]] && fpath=("$ASDF_DIR/plugins" $fpath)
source "$ASDF_DIR/asdf.sh"
fi
if ! command -v msg &> /dev/null; then if ! command -v msg &> /dev/null; then
# Function to print messages if VERBOSE is enabled # Function to print messages if VERBOSE is enabled
# $1 - message (string) # $1 - message (string)
@@ -285,6 +295,8 @@ export GREP_OPTIONS="--color=auto"
# update the values of LINES and COLUMNS. # update the values of LINES and COLUMNS.
hash shopt 2> /dev/null && shopt -s checkwinsize hash shopt 2> /dev/null && shopt -s checkwinsize
export SHORT_HOST=$(hostname -s)
# Antigen configuration # Antigen configuration
# https://github.com/zsh-users/antigen/wiki/Configuration # https://github.com/zsh-users/antigen/wiki/Configuration
msg "Setting up Antigen configuration" msg "Setting up Antigen configuration"
@@ -401,6 +413,7 @@ export PYENV_ROOT="$XDG_STATE_HOME/pyenv"
export PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH" export PATH="$PYENV_ROOT/bin:$PYENV_ROOT/shims:$PATH"
x-have pyenv && { x-have pyenv && {
eval "$(pyenv init -)" eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
} }
# Ruby # Ruby
@@ -459,3 +472,12 @@ msg "Setting up miscellaneous configuration"
export CHEAT_USE_FZF=true export CHEAT_USE_FZF=true
export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history" export SQLITE_HISTORY="${XDG_CACHE_HOME}/sqlite_history"
X_EXPORTS_FILES=(
"$HOME/.config/exports-secret"
"$HOME/.config/exports-$(hostname)"
"$HOME/.config/exports-$(hostname)-secret"
)
for exportFile in "${X_EXPORTS_FILES[@]}"; do
[ -f "$exportFile" ] && source "$exportFile" && msg "Sourced $exportFile"
done
unset X_EXPORTS_FILES

View File

@@ -11,6 +11,8 @@ config.window_background_opacity = 0.97
-- Don't show tab bar -- Don't show tab bar
config.enable_tab_bar = false config.enable_tab_bar = false
config.send_composed_key_when_left_alt_is_pressed = true
-- Function to detect the theme based on appearance -- Function to detect the theme based on appearance
function Scheme_for_appearance(appearance) function Scheme_for_appearance(appearance)
if appearance:find("Dark") then if appearance:find("Dark") then

View File

@@ -17,7 +17,7 @@ CONFIG_HOST="$(hostname -s)"
# Enable debugging if requested # Enable debugging if requested
[ "$DEBUG" = "1" ] && set -x [ "$DEBUG" = "1" ] && set -x
CONFIG_PATH="${DOTFILES}/config" CONFIG_PATH="${HOME}/.config"
[ -d "$DOTFILES" ] || { [ -d "$DOTFILES" ] || {
msg_err "Error: DOTFILES is not set or $DOTFILES does not exist" msg_err "Error: DOTFILES is not set or $DOTFILES does not exist"