Skip to main content

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:
1

Fastfetch

Display system information on new terminal sessions
2

Powerlevel10k Instant Prompt

Fast prompt initialization
3

Environment Setup

PATH, JAVA_HOME, Android SDK, and other variables
4

Oh My Zsh

Theme and plugin configuration
5

Tool Integration

Zoxide, Atuin, and other CLI tools
6

Aliases

Custom command shortcuts
7

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

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 Plugin

Provides numerous git aliases and functions:
AliasCommandDescription
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.

Modern CLI Tool Integration

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'

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
# Arch Linux
sudo pacman -S zoxide atuin eza bat fastfetch

# Ubuntu/Debian
# Install from respective GitHub releases or cargo
cargo install zoxide atuin eza bat
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.

Performance Optimization

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
  • 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:
p10k configure
Choose your preferred style, icons, and colors.
  1. Find the plugin on GitHub
  2. Clone to ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/plugin-name
  3. Add plugin-name to the plugins=() array
  4. Reload: source ~/.zshrc

Next Steps

Ghostty Terminal

Configure the terminal emulator

Scripts

Explore automation scripts

Build docs developers (and LLMs) love