chore: update git configuration and remove unused files

- Updated Git user email in `.gitconfig`.
- Removed obsolete Kitty and Topgrade configuration files.
- Cleaned up Zsh configuration by removing unused snippets and scripts, and reorganized plugin loading in `.zshrc`.
This commit is contained in:
Tri Vo Khac committed 2025-04-19 10:54:42 +07:00
1 parent aa85f4ff43
commit 05244511c2
12 files changed
+103 -197

No files matched your search

+57 -28
View File
@@ -1,38 +1,67 @@
# install zinit
source $ZDOTDIR/zinit
source $ZDOTDIR/zinit.zsh
# load remote plugins
zinit wait lucid light-mode id-as depth"1" for \
zinit light zdharma-continuum/zinit-annex-bin-gem-node
zinit light zdharma-continuum/zinit-annex-binary-symlink
zinit wait lucid light-mode id-as depth'1' for \
wintermi/zsh-brew \
hlissner/zsh-autopair \
Aloxaf/fzf-tab \
atinit"zicompinit; zicdreplay -q" \
atinit'zicompinit; zicdreplay -q' \
zdharma-continuum/fast-syntax-highlighting \
atload"_zsh_autosuggest_start" \
atload'_zsh_autosuggest_start' \
zsh-users/zsh-autosuggestions
# load prompt theme
zinit ice as"command" from"gh-r" id-as \
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
atpull"%atclone" src"init.zsh"
zinit light starship/starship
zinit id-as from'gh-r' lbin'!' null for \
lsd-rs/lsd \
zyedidia/micro \
@sharkdp/bat
# load binaries
zinit as"command" wait lucid light-mode from"gh-r" id-as for \
extract"!" lsd-rs/lsd \
extract"!" zyedidia/micro \
extract"!" cp"autocomplete/bat.zsh -> _bat" @sharkdp/bat \
extract"!" pick"usr/bin/fastfetch" \
fastfetch-cli/fastfetch \
atclone"./zoxide init zsh > init.zsh" atpull"%atclone" src"init.zsh" \
ajeetdsouza/zoxide \
atclone"./fzf --zsh > init.zsh" atpull="%atclone" src"init.zsh" \
junegunn/fzf \
atclone"./fnm env --use-on-cd --shell zsh > init.zsh; ./fnm completions --shell zsh > _fnm" atpull"%atclone" src"init.zsh" Schniz/fnm
zinit for \
id-as \
from'gh-r' \
sbin'!**/bin/fastfetch -> fastfetch' \
@fastfetch-cli/fastfetch
# load local scripts
zinit is-snippet id-as for \
$ZDOTDIR/snippets/exports \
$ZDOTDIR/snippets/aliases \
$ZDOTDIR/snippets/options \
$ZDOTDIR/snippets/bin
zinit for \
id-as \
atload'eval "$(zoxide init zsh)"' \
from'gh-r' \
lbin'!' \
@ajeetdsouza/zoxide
zinit for \
id-as \
as'completion' \
atclone'./fnm completions --shell zsh > _fnm.zsh' \
atload'eval "$(fnm env --use-on-cd --shell zsh)"' \
atpull'%atclone' \
blockf \
from'gh-r' \
nocompile \
sbin'fnm' \
@Schniz/fnm
zinit for \
id-as \
as'completion' \
atclone'./starship completions zsh > _starship' \
atpull'%atclone' \
atload'eval "$(starship init zsh)"' \
from'gh-r' \
sbin'**/starship -> starship' \
@starship/starship
zinit for \
id-as \
from'gh-r' \
lbin'!fzf' \
atclone'fzf --zsh > fzf.zsh' \
atpull'%atclone' \
src'fzf.zsh' \
@junegunn/fzf
for script in $ZDOTDIR/config/*.zsh; do
source "$script"
done
File renamed without changes.
+42
View File
@@ -0,0 +1,42 @@
#!/usr/bin/env zsh
# Define a marker file (choose a location in your cache or temp directory)
MARKER_FILE="${XDG_CACHE_HOME:-$HOME/.cache}/gnu_tools_symlinked"
if [[ ! -f "$MARKER_FILE" ]]; then
gnu_tools=(
"coreutils"
"findutils"
"gnu-tar"
"gnu-sed"
"gawk"
"gnu-indent"
"grep"
)
for tool in $gnu_tools; do
gnubin="/opt/homebrew/opt/$tool/libexec/gnubin"
if [ -d "$gnubin" ]; then
for bin in "$gnubin"/*; do
ln -sf "$bin" "$XDG_BIN_HOME/$(basename "$bin")"
done
fi
done
# Create the marker file to indicate the script has run
touch "$MARKER_FILE"
fi
local bin_paths=(
"$XDG_BIN_HOME"
"/opt/homebrew/opt/gnu-getopt/bin"
)
for bin_path in "${bin_paths[@]}"; do
if [ -d "$bin_path" ]; then
case ":$PATH:" in
*":$bin_path:"*) ;;
*) PATH="$bin_path:$PATH" ;;
esac
fi
done
@@ -6,6 +6,5 @@ export EDITOR="micro"
export PAGER="bat"
export VISUAL="micro"
export SUDO_EDITOR="micro"
export COMPANY_DIR="$HOME/Documents/work/company/"
export STARSHIP_CONFIG="$XDG_CONFIG_HOME"/starship/starship.toml
File renamed without changes.
-37
View File
@@ -1,37 +0,0 @@
#!/usr/bin/env zsh
# Add GNU tools to PATH without 'g' prefix
local gnu_tools=(
"coreutils"
"findutils"
"gnu-tar"
"gnu-sed"
"gawk"
"gnu-indent"
"grep"
)
for tool in $gnu_tools; do
local gnubin="/opt/homebrew/opt/$tool/libexec/gnubin"
if [ -d "$gnubin" ]; then
case ":$PATH:" in
*":$gnubin:"*) ;;
*) export PATH="$gnubin:$PATH" ;;
esac
fi
done
# Add other bins separately since they have a different path structure
local bin_paths=(
"$HOME/.local/bin"
"/opt/homebrew/opt/gnu-getopt/bin"
)
for bin_path in $bin_paths; do
if [ -d "$bin_path" ]; then
case ":$PATH:" in
*":$bin_path:"*) ;;
*) export PATH="$bin_path:$PATH" ;;
esac
fi
done
File renamed without changes.