chore(shell): cleanup and antidote plugins

This commit is contained in:
2024-11-25 13:54:14 +02:00
parent 16673de789
commit 900e6a8f85
5 changed files with 23 additions and 2143 deletions

View File

@@ -52,46 +52,6 @@ load_antidote()
source ${zsh_plugins}.zsh
}
# Function to load antigen if available
load_antigen()
{
local antigen_zsh_path="$XDG_BIN_HOME/antigen.zsh"
# shellcheck source=../../.local/bin/antigen.zsh
if [[ -f "$antigen_zsh_path" ]]; then
source "$antigen_zsh_path"
antigen use oh-my-zsh
if [[ "$OSTYPE" == darwin* ]]; then
zstyle :omz:plugins:ssh-agent keychain yes
fi
zstyle :omz:plugins:ssh-agent lazy yes
zstyle :omz:plugins:ssh-agent quiet yes
# nvm
zstyle ':omz:plugins:nvm' autoload yes
# z, the zsh version
export ZSHZ_DATA="$XDG_STATE_HOME/z"
antigen bundle z
antigen bundle nvm
# these should be always available
antigen bundle jreese/zsh-titles
antigen bundle brew
antigen bundle colored-man-pages
antigen bundle zsh-users/zsh-completions
x-have eza && antigen bundle eza
x-have tms && antigen bundle yuki-ycino/tms
# this needs to be the last bundle
antigen bundle zsh-users/zsh-syntax-highlighting
antigen apply
fi
}
# Function to source FZF configuration
source_fzf_config()
{
@@ -118,7 +78,6 @@ setup_tmux_window_name_plugin()
fi
}
# load_antigen
load_antidote
source_fzf_config
setup_tmux_window_name_plugin

View File

@@ -405,6 +405,7 @@ x-dc "$DOCKER_CONFIG"
export DOCKER_SCAN_SUGGEST=false
# fzf
export FZF_BASE="${XDG_CONFIG_HOME}/fzf"
export FZF_DEFAULT_OPTS='--height 40% --tmux bottom,40% --layout reverse --border top'
# GnuPG

View File

@@ -9,19 +9,23 @@ zsh-users/zsh-completions kind:fpath path:src
# frameworks like oh-my-zsh are supported
getantidote/use-omz # handle OMZ dependencies
ohmyzsh/ohmyzsh path:lib # load OMZ's library
ohmyzsh/ohmyzsh path:plugins/colored-man-pages # load OMZ plugins
ohmyzsh/ohmyzsh path:plugins/colored-man-pages
ohmyzsh/ohmyzsh path:plugins/brew
ohmyzsh/ohmyzsh path:plugins/extract
ohmyzsh/ohmyzsh path:plugins/eza
ohmyzsh/ohmyzsh path:plugins/fzf
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/golang
ohmyzsh/ohmyzsh path:plugins/gpg-agent
ohmyzsh/ohmyzsh path:plugins/nvm
ohmyzsh/ohmyzsh path:plugins/python
# ohmyzsh/ohmyzsh path:plugins/ssh-agent
ohmyzsh/ohmyzsh path:plugins/tmux
ohmyzsh/ohmyzsh path:plugins/z
# Add some programmer plugins
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/golang
ohmyzsh/ohmyzsh path:plugins/python
ohmyzsh/ohmyzsh path:plugins/nvm
# Automatically activate nvm if .nvmrc file is present
ivuorinen/nvm-auto-use
# Add core plugins that make Zsh a bit more like Fish
zdharma-continuum/fast-syntax-highlighting
@@ -29,3 +33,6 @@ zdharma-continuum/fast-syntax-highlighting
# Add some plugins that are not in OMZ
jreese/zsh-titles
yuki-ycino/tms
# This needs to be last bundle
zsh-users/zsh-syntax-highlighting

File diff suppressed because it is too large Load Diff

View File

@@ -122,7 +122,6 @@ section_install()
MENU=(
"all:Installs everything in the correct order"
"antigen:Updates the antigen.zsh file"
"cargo:Install rust/cargo packages"
"cheat-databases:Install cheat external cheatsheet databases"
"composer:Install composer"
@@ -148,34 +147,22 @@ section_install()
msgr msg "Starting to install all and reloading configurations..."
$0 install macos
$0 install fonts
$0 install antigen
$0 brew install
$0 install ohmyposh
$0 install asdf
# $0 install ohmybash
# $0 install pip
# $0 install cargo
$0 install composer
# $0 install dotenv
$0 install fzf
# $0 install gh
# $0 install go
$0 install go
$0 install cheat-databases
$0 install imagick
# $0 install neofetch
# $0 install nvm
# $0 install npm
$0 install ntfy
$0 install nvm
$0 install npm
# $0 install ntfy
$0 install z
msgr msg "Reloading configurations again..."
source "$DOTFILES/config/shared.sh"
msgr yay "All done!"
;;
antigen)
msg "Installing antigen..."
curl -sSfL git.io/antigen -o "$DOTFILES/local/bin/antigen.zsh" \
&& msg_yay "New antigen installed!"
;;
asdf)
msg "Installing asdf..."
bash "$DOTFILES/scripts/install-asdf.sh both" \
@@ -198,13 +185,6 @@ section_install()
bash "$DOTFILES/scripts/install-composer.sh" \
&& msg_yay "composer installed!"
;;
dotenv)
msg "Installing dotenv-linter..."
curl -sSfL \
https://raw.githubusercontent.com/dotenv-linter/dotenv-linter/master/install.sh \
| sh -s -- -b "$XDG_BIN_HOME" \
&& msg_yay "dotenv-linter installed!"
;;
fonts)
msg "Installing fonts..."
bash "$DOTFILES/scripts/install-fonts.sh" \
@@ -231,13 +211,6 @@ section_install()
&& chmod +x "$XDG_BIN_HOME/magick" \
&& msg_yay "imagick installed!"
;;
starship)
msg "Installing starship.rs..."
curl -sS https://starship.rs/install.sh | sh -s -- \
--bin-dir ~/.local/bin \
--yes \
&& msg_yay "starship installed!"
;;
macos)
msg "Setting up macOS defaults..."
bash "$DOTFILES/scripts/set-macos-defaults.sh" \
@@ -250,9 +223,11 @@ section_install()
;;
nvm)
msg "Installing nvm..."
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$VERSION_NVM/install.sh" | bash
git checkout "$DOTFILES/base/zshrc"
git checkout "$DOTFILES/base/bashrc"
NVM_VERSION=$(x-gh-get-latest-version nvm-sh/nvm)
msg "Latest nvm version: $NVM_VERSION"
NVM_INSTALL="https://raw.githubusercontent.com/nvm-sh/nvm/${NVM_VERSION}/install.sh"
NVM_CURL="curl -o- \"$NVM_INSTALL\" | bash"
PROFILE=/dev/null bash -c "$NVM_CURL"
$0 install nvm-latest
msg_yay "nvm installed!"
;;
@@ -276,11 +251,6 @@ section_install()
bash "$DOTFILES/scripts/install-ntfy.sh" \
&& msg_yay "ntfy installed!"
;;
ohmybash)
msg "oh-my-bash install started..."
bash "$DOTFILES/scripts/install-ohmybash.sh" \
&& msg_yay "oh-my-bash installed!"
;;
ohmyposh)
msg "oh-my-posh install started..."
bash "$DOTFILES/scripts/install-ohmyposh.sh" \