Overview
The Kanagawa dotfiles include a comprehensive Zsh configuration featuring Oh My Zsh, Powerlevel10k prompt, useful plugins, and modern CLI tool integrations.
The shell configuration prioritizes speed, functionality, and aesthetics with carefully selected plugins and tool integrations.
Configuration Structure
~ /
├── .zshrc # Main Zsh configuration
├── .p10k.zsh # Powerlevel10k configuration
└── .oh-my-zsh/ # Oh My Zsh installation
└── custom/
└── plugins/
Main Configuration
The .zshrc file is organized into logical sections:
Fastfetch
Display system information on new terminal sessions
Powerlevel10k Instant Prompt
Fast prompt initialization
Environment Setup
PATH, JAVA_HOME, Android SDK, and other variables
Oh My Zsh
Theme and plugin configuration
Tool Integration
Zoxide, Atuin, and other CLI tools
Aliases
Custom command shortcuts
Powerlevel10k Config
Load P10k configuration
Fastfetch Integration
if [[ -t 1 && -z " $FASTFETCH_DONE " ]]; then
export FASTFETCH_DONE = 1
fastfetch
fi
Shows system information (OS, kernel, packages, etc.) once per session.
Only Once FASTFETCH_DONE prevents repeated displays
TTY Check Only runs in interactive terminals
Powerlevel10k Theme
# Instant prompt for fast startup
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
# Set theme
ZSH_THEME = "powerlevel10k/powerlevel10k"
Powerlevel10k Features
Instant Prompt Shows prompt immediately, even before plugins load
Git Integration Detailed git status in prompt
Performance Optimized for speed and low latency
Customizable Highly configurable prompt elements
Customizing P10k Run the configuration wizard: This opens an interactive wizard to customize:
Prompt style (lean, classic, rainbow, etc.)
Icons and symbols
Colors
Prompt elements
Separators and spacing
Configuration is saved to ~/.p10k.zsh.
Environment Variables
Path Configuration
export PATH = " $HOME /.local/bin: $PATH "
export PATH = / home / nico /. opencode / bin : $PATH
Java and Android
export JAVA_HOME = / usr / lib / jvm / default
export ANDROID_HOME = $HOME / Android / Sdk
export PATH = $PATH : $ANDROID_HOME / emulator
export PATH = $PATH : $ANDROID_HOME / platform-tools
export PATH = $PATH : $ANDROID_HOME / tools
export PATH = $PATH : $ANDROID_HOME / tools / bin
Flutter
export PATH = $PATH : $HOME / development / flutter / bin
These paths enable development tools for Android, Flutter, and other platforms.
Oh My Zsh Plugins
plugins = (
git
zsh-autosuggestions
zsh-syntax-highlighting
sudo
)
source $ZSH /oh-my-zsh.sh
git
zsh-autosuggestions
zsh-syntax-highlighting
sudo
Git Plugin Provides numerous git aliases and functions: Alias Command Description gstgit statusShow working tree status gagit addAdd files to staging gcgit commit -vCommit with verbose output gpgit pushPush commits glgit pullPull changes gcogit checkoutSwitch branches gcbgit checkout -bCreate and switch to branch gdgit diffShow changes glggit log --graphGraph log view
Built-in with Oh My Zsh - no installation needed.Autosuggestions Plugin Suggests commands as you type based on history: # Install
git clone https://github.com/zsh-users/zsh-autosuggestions \
${ ZSH_CUSTOM :- ~ / . oh-my-zsh / custom } /plugins/zsh-autosuggestions
Usage :
Start typing a command
See gray suggestion appear
Press → (right arrow) to accept
Press Alt+→ to accept one word
History-based Suggestions from command history
Non-intrusive Gray text doesn’t interfere with typing
Syntax Highlighting Plugin Colors commands as you type: # Install
git clone https://github.com/zsh-users/zsh-syntax-highlighting \
${ ZSH_CUSTOM :- ~ / . oh-my-zsh / custom } /plugins/zsh-syntax-highlighting
Features :
Green: Valid command
Red: Invalid/unknown command
Blue: Path that exists
Underline: Options and flags
Helps catch typos before execution. Sudo Plugin Press Esc twice to prepend sudo to the current command. # Type a command
apt update
# Press Esc twice
# Becomes:
sudo apt update
Built-in with Oh My Zsh - no installation needed.This is incredibly useful when you forget to add sudo to a command.
Zoxide (Smart cd)
eval "$( zoxide init zsh)"
Usage :
z dotfiles # Jump to ~/dotfiles from anywhere
z conf nvim # Jump to ~/.config/nvim
zi # Interactive selection
Zoxide tracks your most-used directories and lets you jump to them with partial names.
Atuin (Shell History)
[[ $- == * i * ]] && eval "$( atuin init zsh)"
Features :
Sync shell history across machines
Better history search with Ctrl+R
Statistics and insights
SQLite-backed storage
Zoxide Smart directory jumping based on frequency
Atuin Enhanced shell history with sync
Custom Aliases
alias dots = 'cd ~/dotfiles'
alias ls = 'eza --icons --group-directories-first'
alias cat = 'bat --paging=never'
alias oc = 'opencode'
alias phpmyadmin = 'sudo systemctl start mariadb httpd && xdg-open http://localhost/phpmyadmin'
Navigation
Enhanced Commands
Development
Navigation Aliases alias dots = 'cd ~/dotfiles'
Quick access to the dotfiles directory. Modern Replacements alias ls = 'eza --icons --group-directories-first'
alias cat = 'bat --paging=never'
eza : Modern ls replacement with icons and colors
bat : cat with syntax highlighting
Make sure eza and bat are installed for these aliases to work.
Development Aliases alias oc = 'opencode'
alias phpmyadmin = 'sudo systemctl start mariadb httpd && xdg-open http://localhost/phpmyadmin'
Quick shortcuts for development tools and services.
Lazy Loading
Conda
conda () {
unset -f conda
source /home/nico/miniconda/etc/profile.d/conda.sh
conda " $@ "
}
Conda is loaded on-demand, speeding up shell startup significantly.
Why? Conda initialization is slow. This function only loads it when you first use the conda command.
The first conda command will have a slight delay while it initializes. Subsequent commands are instant.
Installation Requirements
To use this configuration, install the following:
# Oh My Zsh
sh -c "$( curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# Powerlevel10k
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git \
${ ZSH_CUSTOM :- $HOME / . oh-my-zsh / custom } /themes/powerlevel10k
# zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-autosuggestions \
${ ZSH_CUSTOM :- ~ / . oh-my-zsh / custom } /plugins/zsh-autosuggestions
# zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-syntax-highlighting \
${ ZSH_CUSTOM :- ~ / . oh-my-zsh / custom } /plugins/zsh-syntax-highlighting
Install a Nerd Font for proper icon display: # Download and install CaskaydiaCove Nerd Font
# https://www.nerdfonts.com/font-downloads
Set the font in your terminal emulator settings.
Instant Prompt P10k instant prompt shows immediately
Lazy Loading Conda and heavy tools load on-demand
Minimal Plugins Only essential plugins enabled
Fastfetch Once System info shown once per session
Troubleshooting
Check plugin load times: time zsh -i -c exit
Disable plugins one by one to identify the culprit
Ensure P10k instant prompt is working
Install a Nerd Font
Configure your terminal to use the Nerd Font
Restart the terminal
Autosuggestions not working
Verify plugin is installed
Check it’s listed in the plugins=() array
Source .zshrc again: source ~/.zshrc
The lazy loading function requires the Miniconda path to be correct. Update the path in the conda() function if needed.
Customization Tips
Add aliases at the end of .zshrc: alias myalias = 'command here'
alias gs = 'git status'
alias v = 'nvim'
Then reload: source ~/.zshrc
Run the P10k configuration wizard: Choose your preferred style, icons, and colors.
Find the plugin on GitHub
Clone to ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/plugin-name
Add plugin-name to the plugins=() array
Reload: source ~/.zshrc
Next Steps
Ghostty Terminal Configure the terminal emulator
Scripts Explore automation scripts