Compare commits

..
10 Commits
Author SHA1 Message Date
Tri Vo Khac 92372953de feat: update zinit configuration for enhanced command listing
- Set `ZINIT[LIST_COMMAND]` to use `lsd --tree` for improved directory visualization
- Ensure `ZINIT[NO_ALIASES]` is properly declared without export
2025-04-17 15:59:57 +07:00
Tri Vo Khac b238f54ca3 feat: update zsh aliases and options for improved functionality
- Modify `ls` and `la` aliases for better compatibility with `lsd`
- Add `gs` alias for a concise git status command
- Reinstate history settings in zsh options for consistent behavior
- Ensure history management options are clearly defined
2025-04-15 15:22:57 +07:00
Tri Vo Khac 2ec3c0b116 feat: add configuration files for aria2 and containers, and update zsh aliases
- Introduce aria2 configuration for RPC and default download directory
- Add containers configuration to suppress compose warning logs
- Update zsh aliases to include a shortcut for Docker using podman
2025-04-13 16:02:02 +07:00
Tri Vo Khac 3d97d39bdc feat: enhance zsh bin setup to include GNU tools
- Add support for GNU tools in PATH without 'g' prefix
- Include additional bin paths for local binaries
- Improve structure for adding directories to PATH
2025-03-13 13:17:00 +07:00
Tri Vo Khac 9ed04e7eae feat: enhance terminal and git configurations
- Add bar cursor style to Ghostty config
- Enable automatic remote setup for Git push
- Simplify zsh plugin configuration
- Expand and improve shell aliases
2025-02-11 10:38:06 +07:00
Tri Vo Khac c5bb6055bf feat: add initial Ghostty configuration with font and theme settings 2024-12-27 10:38:02 +07:00
Tri Vo Khac fe7b00ac51 fix: use single quote for fzf-preview 2024-12-09 10:31:05 +07:00
Tri Vo Khac 801449db29 refactor: restructure zsh configuration and move snippets to dedicated directory 2024-12-06 20:17:39 +07:00
Tri Vo Khac 833ef8f70e feat: enhance configuration with new aliases and local bin setup 2024-12-06 15:50:33 +07:00
Tri Vo Khac 70a2f649be fix:
- missing zsh history when using fzf
- not found aliases
2024-08-17 00:04:43 +07:00
11 changed files with 128 additions and 25 deletions

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
enable-rpc = true
rpc-listen-all = true
dir = ~/Downloads
# rpc-secret = your_password
@@ -0,0 +1,2 @@
[engine]
compose_warning_logs = false
+3
View File
@@ -0,0 +1,3 @@
font-family = "JetBrainsMono Nerd Font"
theme = "SpaceGray Eighties"
cursor-style = bar
+7
View File
@@ -3,3 +3,10 @@
[user] [user]
name = Tri Vo Khac name = Tri Vo Khac
email = 33442340+vokhactri@users.noreply.github.com 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
[push]
autoSetupRemote = true
+17 -17
View File
@@ -1,38 +1,38 @@
# install zinit # install zinit
source $ZDOTDIR/zinit.zsh source $ZDOTDIR/zinit
# load remote plugins # load remote plugins
zinit wait lucid light-mode for \ zinit wait lucid light-mode id-as depth"1" for \
wintermi/zsh-brew \ wintermi/zsh-brew \
hlissner/zsh-autopair \ hlissner/zsh-autopair \
Aloxaf/fzf-tab \ Aloxaf/fzf-tab \
atinit"zicompinit; zicdreplay -q" \ atinit"zicompinit; zicdreplay -q" \
zdharma-continuum/fast-syntax-highlighting zap-zsh/supercharge \ zdharma-continuum/fast-syntax-highlighting \
atload"_zsh_autosuggest_start" \ atload"_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions \ zsh-users/zsh-autosuggestions
blockf atpull'zinit creinstall -q .' \
zsh-users/zsh-completions
# load prompt theme # load prompt theme
zinit ice as"command" from"gh-r" \ zinit ice as"command" from"gh-r" id-as \
atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \ atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \
atpull"%atclone" src"init.zsh" atpull"%atclone" src"init.zsh"
zinit light starship/starship zinit light starship/starship
# load binaries # load binaries
zinit as"command" wait lucid light-mode from"gh-r" for \ zinit as"command" wait lucid light-mode from"gh-r" id-as for \
extract"!" atload="alias cat=bat" lsd-rs/lsd \ extract"!" lsd-rs/lsd \
extract"!" atload="alias nano=micro" zyedidia/micro \ extract"!" zyedidia/micro \
extract"!" cp"autocomplete/bat.zsh -> _bat" atload"alias cat=bat" @sharkdp/bat \ extract"!" cp"autocomplete/bat.zsh -> _bat" @sharkdp/bat \
extract"!" atclone="cp usr/bin/fastfetch .; rm -rf usr" \ extract"!" pick"usr/bin/fastfetch" \
fastfetch-cli/fastfetch \ fastfetch-cli/fastfetch \
atclone"./zoxide init zsh > init.zsh" atpull"%atclone" src"init.zsh" \ atclone"./zoxide init zsh > init.zsh" atpull"%atclone" src"init.zsh" \
ajeetdsouza/zoxide \ ajeetdsouza/zoxide \
atclone"./fzf --zsh > init.zsh" atpull="%atclone" src"init.zsh" \ atclone"./fzf --zsh > init.zsh" atpull="%atclone" src"init.zsh" \
junegunn/fzf \ junegunn/fzf \
atclone"./fnm env --use-on-cd > init.zsh" atpull"%atclone" src"init.zsh" Schniz/fnm atclone"./fnm env --use-on-cd --shell zsh > init.zsh; ./fnm completions --shell zsh > _fnm" atpull"%atclone" src"init.zsh" Schniz/fnm
# load local snippets # load local scripts
source $ZDOTDIR/exports.zsh zinit is-snippet id-as for \
$ZDOTDIR/snippets/exports \
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'lsd -1 --color=always --icon=always $realpath' $ZDOTDIR/snippets/aliases \
$ZDOTDIR/snippets/options \
$ZDOTDIR/snippets/bin
-4
View File
@@ -1,4 +0,0 @@
#!/usr/bin/env zsh
(($+commands[bat])) && alias cat="bat"
(($+commands[lsd])) && alias ls="lsd"
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env zsh
# Modern alternatives to traditional commands
alias cat='bat'
alias ls='lsd -A'
alias la='lsd -lA'
alias tree='lsd --tree'
alias nano='micro'
alias fetch='fastfetch'
# Git shortcuts
alias g='git'
alias gs='git status -sb'
alias ga='git add'
alias gc='git commit'
alias gp='git push'
alias gl='git pull'
# Docker shortcuts
alias docker='podman'
+37
View File
@@ -0,0 +1,37 @@
#!/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
@@ -1,13 +1,11 @@
#!/usr/bin/env zsh #!/usr/bin/env zsh
HISTSIZE=1000000
SAVEHIST=1000000
export MANWIDTH=999 export MANWIDTH=999
export EDITOR="micro" export EDITOR="micro"
export PAGE="bat" export PAGER="bat"
export VISUAL="micro" export VISUAL="micro"
export SUDO_EDITOR="micro" export SUDO_EDITOR="micro"
export COMPANY_DIR="$HOME/Documents/work/company/"
export STARSHIP_CONFIG="$XDG_CONFIG_HOME"/starship/starship.toml export STARSHIP_CONFIG="$XDG_CONFIG_HOME"/starship/starship.toml
+30
View File
@@ -0,0 +1,30 @@
#!/usr/bin/env zsh
unsetopt BEEP
setopt AUTO_CD
setopt GLOB_DOTS
setopt NOMATCH
setopt MENU_COMPLETE
setopt EXTENDED_GLOB
setopt INTERACTIVE_COMMENTS
setopt APPEND_HISTORY
setopt PUSHD_IGNORE_DUPS
setopt BANG_HIST # Treat the '!' character specially during expansion.
setopt EXTENDED_HISTORY # Write the history file in the ":start:elapsed;command" format.
setopt INC_APPEND_HISTORY # Write to the history file immediately, not when the shell exits.
setopt SHARE_HISTORY # Share history between all sessions.
setopt HIST_EXPIRE_DUPS_FIRST # Expire duplicate entries first when trimming history.
setopt HIST_IGNORE_DUPS # Don't record an entry that was just recorded again.
setopt HIST_IGNORE_ALL_DUPS # Delete old recorded entry if new entry is a duplicate.
setopt HIST_FIND_NO_DUPS # Do not display a line previously found.
setopt HIST_IGNORE_SPACE # Don't record an entry starting with a space.
setopt HIST_SAVE_NO_DUPS # Don't write duplicate entries in the history file.
setopt HIST_REDUCE_BLANKS # Remove superfluous blanks before recording entry.
setopt HIST_VERIFY # Don't execute immediately upon history expansion.
HISTFILE="${ZDOTDIR:-$HOME}/.zsh_history"
HISTSIZE=5000000
SAVEHIST=5000000
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'lsd -1 --color=always --icon=always $realpath'
@@ -3,4 +3,10 @@
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)" [ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" [ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
# not to use aliases: zi or zini
declare -A ZINIT
ZINIT[NO_ALIASES]=1
ZINIT[LIST_COMMAND]='lsd --tree'
source "${ZINIT_HOME}/zinit.zsh" source "${ZINIT_HOME}/zinit.zsh"