Created
February 1, 2025 12:25
-
-
Save sihan010/15ea1e168f0cdbfde0c55524ae9ecead to your computer and use it in GitHub Desktop.
Clean ZSH folder structure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZDOTDIR="/home/sihan/.config/zsh" | |
export HISTFILE="$ZDOTDIR/.zsh_history" | |
# XDG | |
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config} | |
export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache} | |
export XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share} | |
export XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
fi | |
export ZSH="$ZDOTDIR/.oh-my-zsh" | |
ZSH_THEME="powerlevel10k/powerlevel10k" | |
zstyle ':omz:update' mode reminder | |
zstyle ':omz:update' frequency 30 | |
HIST_STAMPS="yyyy-mm-dd" | |
plugins=( | |
git | |
zsh-autosuggestions | |
zsh-syntax-highlighting | |
zsh-autocomplete | |
zsh-history-substring-search | |
docker | |
kubectl | |
) | |
source $ZSH/oh-my-zsh.sh | |
# User configuration | |
export MANPATH="/usr/local/man:$MANPATH" | |
export ARCHFLAGS="-arch x86_64" | |
if [[ -n $SSH_CONNECTION ]]; then | |
export EDITOR='nano' | |
else | |
export EDITOR='code' | |
fi | |
alias ls="eza --long --color=always --icons=always --hyperlink --header --group-directories-first" | |
# HomeBrew | |
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" | |
# NVM | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" ] && \. "/home/linuxbrew/.linuxbrew/opt/nvm/nvm.sh" | |
# SDKMAN | |
export SDKMAN_DIR="$HOME/.sdkman" | |
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh" | |
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. | |
[[ ! -f /home/sihan/.config/zsh/.p10k.zsh ]] || source /home/sihan/.config/zsh/.p10k.zsh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment