diff --git a/git/.gitconfig b/git/.gitconfig index 81b8495..af09f62 100644 --- a/git/.gitconfig +++ b/git/.gitconfig @@ -2,11 +2,6 @@ defaultBranch = main [user] name = Tri Vo Khac - email = 33442340+vokhactri@users.noreply.github.com -[filter "lfs"] - required = true - clean = git-lfs clean -- %f - smudge = git-lfs smudge -- %f - process = git-lfs filter-process + email = me@trivk.dev [push] autoSetupRemote = true diff --git a/kitty/.config/kitty/.kitty.conf.swp b/kitty/.config/kitty/.kitty.conf.swp deleted file mode 100644 index 3466f7a..0000000 Binary files a/kitty/.config/kitty/.kitty.conf.swp and /dev/null differ diff --git a/kitty/.config/kitty/kitty.conf b/kitty/.config/kitty/kitty.conf deleted file mode 100644 index 4ff419a..0000000 --- a/kitty/.config/kitty/kitty.conf +++ /dev/null @@ -1,18 +0,0 @@ -# vim:fileencoding=utf-8:foldmethod=marker - -font_family JetBrainsMono Nerd Font Regular -bold_font JetBrainsMono Nerd Font Bold -italic_font JetBrainsMono Nerd Font Italic -bold_italic_font JetBrainsMono Nerd Font Bold Italic - -font_size 13.0 - -background_opacity 0.85 - -allow_hyperlinks yes - -shell_integration enabled - -macos_option_as_alt yes - -# include ./mocha.conf diff --git a/topgrade/.config/topgrade.toml b/topgrade/.config/topgrade.toml deleted file mode 100644 index 0e800b9..0000000 --- a/topgrade/.config/topgrade.toml +++ /dev/null @@ -1,104 +0,0 @@ -# Don't ask for confirmations -#assume_yes = true - -# Disable specific steps - same options as the command line flag -disable = ["system", "emacs", "gem", "node", "pnpm", "pip3", "micro", "containers"] - -display_preamble = false - -# Ignore failures for these steps -#ignore_failures = ["powershell"] - -# Run specific steps - same options as the command line flag -#only = ["system", "emacs"] - -# Do not ask to retry failed steps (default: false) -#no_retry = true - -# Run inside tmux -#run_in_tmux = true - -# List of remote machines with Topgrade installed on them -#remote_topgrades = ["toothless", "pi", "parnas"] - -# Arguments to pass SSH when upgrading remote systems -#ssh_arguments = "-o ConnectTimeout=2" - -# Path to Topgrade executable on remote machines -#remote_topgrade_path = ".cargo/bin/topgrade" - -# Arguments to pass tmux when pulling Repositories -#tmux_arguments = "-S /var/tmux.sock" - -# Do not set the terminal title -#set_title = false - -# Display the time in step titles -# display_time = true - -# Cleanup temporary or old files -#cleanup = true - -[git] -#max_concurrency = 5 -# Additional git repositories to pull -#repos = [ -# "~/src/*/", -# "~/.config/something" -#] - -# Don't pull the predefined git repos -#pull_predefined = false - -# Arguments to pass Git when pulling Repositories -#arguments = "--rebase --autostash" - -[composer] -#self_update = true - -# Commands to run before anything -[pre_commands] -#"Emacs Snapshot" = "rm -rf ~/.emacs.d/elpa.bak && cp -rl ~/.emacs.d/elpa ~/.emacs.d/elpa.bak" - -# Custom commands -[commands] -#"Python Environment" = "~/dev/.env/bin/pip install -i https://pypi.python.org/simple -U --upgrade-strategy eager jupyter" - -[brew] -#greedy_cask = true - -[linux] -# Arch Package Manager to use. Allowed values: autodetect, trizen, paru, yay, pikaur, pacman. -#arch_package_manager = "pacman" -# Arguments to pass yay (or paru) when updating packages -#yay_arguments = "--nodevel" -#show_arch_news = true -#trizen_arguments = "--devel" -#pikaur_arguments = "" -#enable_tlmgr = true -#emerge_sync_flags = "-q" -#emerge_update_flags = "-uDNa --with-bdeps=y world" -#redhat_distro_sync = false -#rpm_ostree = false - -[windows] -# Manually select Windows updates -#accept_all_updates = false -#open_remotes_in_new_terminal = true - -# Causes Topgrade to rename itself during the run to allow package managers -# to upgrade it. Use this only if you installed Topgrade by using a package -# manager such as Scoop to Cargo -#self_rename = true - -[npm] -# Use sudo if the NPM directory isn't owned by the current user -#use_sudo = true - -[firmware] -# Offer to update firmware; if false just check for and display available updates -#upgrade = true - -[flatpak] -# Use sudo for updating the system-wide installation -#use_sudo = true diff --git a/zsh/.config/zsh/.zshrc b/zsh/.config/zsh/.zshrc index 50fdf08..89a7134 100644 --- a/zsh/.config/zsh/.zshrc +++ b/zsh/.config/zsh/.zshrc @@ -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 diff --git a/zsh/.config/zsh/snippets/aliases b/zsh/.config/zsh/config/alias.zsh similarity index 100% rename from zsh/.config/zsh/snippets/aliases rename to zsh/.config/zsh/config/alias.zsh diff --git a/zsh/.config/zsh/config/bin.zsh b/zsh/.config/zsh/config/bin.zsh new file mode 100644 index 0000000..1eddb1f --- /dev/null +++ b/zsh/.config/zsh/config/bin.zsh @@ -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 diff --git a/zsh/.config/zsh/snippets/exports b/zsh/.config/zsh/config/default.zsh similarity index 79% rename from zsh/.config/zsh/snippets/exports rename to zsh/.config/zsh/config/default.zsh index 3d1cc39..b1b2ffe 100644 --- a/zsh/.config/zsh/snippets/exports +++ b/zsh/.config/zsh/config/default.zsh @@ -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 diff --git a/zsh/.config/zsh/snippets/options b/zsh/.config/zsh/config/shell.zsh similarity index 100% rename from zsh/.config/zsh/snippets/options rename to zsh/.config/zsh/config/shell.zsh diff --git a/zsh/.config/zsh/snippets/bin b/zsh/.config/zsh/snippets/bin deleted file mode 100644 index 068af8c..0000000 --- a/zsh/.config/zsh/snippets/bin +++ /dev/null @@ -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 - diff --git a/zsh/.config/zsh/zinit b/zsh/.config/zsh/zinit.zsh similarity index 100% rename from zsh/.config/zsh/zinit rename to zsh/.config/zsh/zinit.zsh diff --git a/zsh/.zshenv b/zsh/.zshenv index 9090bf3..b8aa3ec 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,3 +1,3 @@ -export XDG_CONFIG_HOME="${HOME}/.config" -export ZDOTDIR="${XDG_CONFIG_HOME}/zsh" -export SHELL_SESSIONS_DISABLE=1 +XDG_CONFIG_HOME="${HOME}/.config" +XDG_BIN_HOME="${HOME}/.local/bin" +ZDOTDIR="${XDG_CONFIG_HOME}/zsh"