Creating dotfiles for terminals
dot files for terminals a
This commit is contained in:
71
.zshrc
Normal file
71
.zshrc
Normal file
@@ -0,0 +1,71 @@
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
export EDITOR="nvim"
|
||||
export VISUAL="nvim"
|
||||
|
||||
|
||||
# This must be at the top for Powerlevel10k Instant Prompt to work.
|
||||
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
|
||||
|
||||
# === Oh My Zsh Configuration ===
|
||||
# Path to your Oh My Zsh installation.
|
||||
export ZSH="$HOME/.oh-my-zsh"
|
||||
|
||||
# Set the Powerlevel10k theme.
|
||||
ZSH_THEME="powerlevel10k/powerlevel10k"
|
||||
|
||||
# Which plugins would you like to load?
|
||||
plugins=(git zsh-autosuggestions zsh-syntax-highlighting)
|
||||
|
||||
|
||||
# === Custom PATH Configuration ===
|
||||
# This is the most critical fix. We set the PATH *before* sourcing Oh My Zsh.
|
||||
# This ensures all custom commands are available to the shell and plugins.
|
||||
export PATH="$HOME/.local/bin:$HOME/.fzf/bin:$PATH"
|
||||
|
||||
|
||||
# === Source Oh My Zsh ===
|
||||
# This line loads the Oh My Zsh framework. All customisations must come after this.
|
||||
source $ZSH/oh-my-zsh.sh
|
||||
|
||||
|
||||
# === Custom Tool Configuration ===
|
||||
# All your custom tools are configured here, after OMZ has loaded.
|
||||
|
||||
# 1. Bat (Better Cat)
|
||||
# On Debian/Ubuntu, the binary is often 'batcat'. If 'bat' is not found,
|
||||
# change this alias to 'batcat'.
|
||||
alias cat='bat --color=always --paging=never'
|
||||
|
||||
# 2. Eza Aliases (Modern replacement for 'ls')
|
||||
alias ls='eza --icons --git'
|
||||
alias ll='eza -l --icons --git'
|
||||
alias la='eza -la --icons --git'
|
||||
alias tree='eza --tree'
|
||||
|
||||
# 3. Zoxide (Smarter cd)
|
||||
eval "$(zoxide init zsh)"
|
||||
|
||||
# 4. Atuin (Shell History)
|
||||
# Your existing Atuin config.
|
||||
eval "$(atuin init zsh)"
|
||||
bindkey '^[[A' atuin-up-search # Up arrow
|
||||
bindkey '^[[B' atuin-down-search # Down arrow
|
||||
|
||||
# 5. FZF (Fuzzy Finder)
|
||||
# The official script handles keybindings (Ctrl+T) and completions.
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
|
||||
# 6. Carapace (Completion Engine)
|
||||
# This will now work because the PATH is set correctly above.
|
||||
source <(carapace-bin _carapace zsh)
|
||||
|
||||
|
||||
# === Load Powerlevel10k Theme ===
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
|
||||
# This must be the very last thing in your .zshrc
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
|
||||
alias cat='batcat --color=always --paging=never'
|
||||
Reference in New Issue
Block a user