One Person Unicorn

Back to Posts

Building the Ultimate Command Line Environment for Unicorn Founders: A Practical Guide to iTerm2 & tmux

CodingoAI

Introduction: Why the Terminal Environment is Crucial for a Solo Entrepreneur

For a solo unicorn founder, the most valuable assets are time and focus. When you have to handle everything from product development to operations and marketing alone, the efficiency of your development environment is not just a matter of convenience—it’s a matter of survival. The Command Line Interface (CLI), in particular, is the central axis of the modern development workflow, and how you configure and utilize it can dramatically alter your productivity.

This report goes beyond a simple setup guide; it aims to build a battle station tailored to the unique needs of a solo founder. That is, to create a robust and efficient environment that automates repetitive tasks, minimizes context-switching costs, and perfectly protects your work from system failures. To achieve this, we will build an integrated system centered around the terminal emulator iTerm2 and the session manager tmux, encompassing the shell (Zsh) and the development workflow (Neovim integration). This process will include powerful, battle-tested tips and tricks that feel almost like “cheating.” Through this report, your terminal will be transformed from a simple command-entry tool into a powerful engine that accelerates your business growth.

Part I: The Foundation - Creating a High-Performance Workspace with iTerm2

Everything starts with the screen we face every day. For a solo founder, the terminal is not just a tool but the primary workspace where most of the day is spent. Therefore, optimizing this space for clarity, speed, and comfort is the essential first step to reducing eye strain and increasing focus.

Section 1.1: Functional Aesthetics - Why the Look of Your Terminal Matters

Customizing the appearance of your terminal is not merely a matter of taste. A well-chosen font and color scheme are functional elements that enhance code readability, reduce cognitive load, and help maintain focus during long work sessions.

Fonts: A Precision Tool

For a developer, a font is a key tool that visually conveys the structure and logic of code. Fonts that support ligatures, in particular, improve the visual flow of code by combining multi-character operators like => or != into a single symbol.

But the key is to go one step further. Standard programming fonts are not enough. For the information-dense environment we are building, a “Nerd Font” with thousands of embedded icons and glyphs is essential. These fonts integrate icons from sources like Font Awesome, Devicons, and Octicons directly into the font itself, which is a prerequisite for richly displaying visual information in the prompts and status bars we will set up later.

In a macOS environment, using Homebrew is the most reproducible and manageable method. You can easily install your desired Nerd Font with the following commands:

# Add the Homebrew Cask-Fonts repository
brew tap homebrew/cask-fonts

# Example: Install JetBrains Mono Nerd Font
brew install --cask font-jetbrains-mono-nerd-font

If you prefer manual installation, you can download the font from the Nerd Fonts website and install it through the Font Book application on macOS.

Recommended Nerd Font ComparisonFira CodeJetBrains MonoCascadia Code
Ligature StyleStylish and uniqueFunctional and clearSmooth and integrated
Glyph ClarityHigh (especially at small sizes)Very High (optimized for IDEs)High (suitable for terminals)
Powerline SupportExcellentExcellentVery Excellent
Overall FeelCreative and funProfessional and refinedModern and practical

A solo founder doesn’t have time to waste testing dozens of fonts. The table above narrows the options down to three top choices and clearly presents the pros and cons of each to help you make a quick, informed decision.

Color Schemes: A Lens for Focus

A well-designed color scheme reduces eye strain and allows for immediate recognition of important information (e.g., error messages). It is advisable to use themes that are widely used and validated by the developer community.

  • Recommended Themes: Themes like Tokyo Night, Gruvbox, and Nord are favored by many developers. You can find hundreds of options on sites like iterm2colorschemes.com.
  • iTerm2 Material Design: A theme designed according to Google’s Material Design principles, offering excellent readability and accessibility.

You can easily apply a theme by downloading a .itermcolors file and importing it via iTerm2 > Preferences > Profiles > Colors > Color Presets... > Import....

Section 1.2: Core iTerm2 Settings for Maximum Productivity

Now let’s activate iTerm2’s powerful features to turn the terminal from a simple shell window into an integrated work hub.

  • Context Switching with Profiles: You can create multiple profiles in Preferences > Profiles to separate different work environments. For example, you can configure a ‘Work’ profile with a specific color scheme and startup commands, and a ‘Personal’ profile with different settings to clearly separate work contexts.
  • Hotkey Window: The Always-On Command Center: This is a game-changing feature. By registering a system-wide hotkey (e.g., Option + Space) in Preferences > Keys > Hotkey, you can instantly bring up a terminal window from any application. This transforms the terminal into an instant utility for running simple commands and dramatically reduces the friction of context switching between applications.
  • Shell Integration: A Deep Connection Between Terminal and Shell: This is a non-negotiable, essential setting. By running the following command to install the shell integration script, iTerm2 gains a semantic understanding of the shell’s state.
curl -L https://iterm2.com/shell_integration/install_shell_integration.sh | bash

This integration allows iTerm2 to know the location of the current prompt, the command being executed, the current host and directory, and more. This forms the basis for enabling powerful features like automatic profile switching and accurate information display in the status bar, which we will explore later.

Section 1.3: iTerm2 Advanced Automation (“Cheat” Techniques)

Now let’s move beyond the basic features of iTerm2 to explore advanced, “cheat-like” techniques that automate your workflow.

Automated Awareness with Triggers

Triggers are a powerful feature that automatically executes a defined action when a specific text pattern appears in the terminal.

You can configure them in Preferences > Profiles > Advanced > Triggers.

  • Example 1: Instantly Highlight Errors: By setting a ‘Highlight Text’ action for the regular expression (error|failed|fatal), relevant logs will be immediately highlighted in red upon a build or test failure, ensuring you never miss them.
  • Example 2: Build Completion Notifications: By setting a ‘Post Notification’ action for a phrase like Build completed successfully, you can focus on other tasks during a long compilation and receive a macOS notification the moment it finishes.

Native Status Bar: An Alternative to the tmux UI

Before we dive into tmux, let’s first leverage iTerm2’s own status bar feature. In Preferences > Profiles > Session, turn on ‘Status bar enabled’ and click Configure Status Bar to display various pieces of information like the Git branch (user.gitBranch), CPU/memory usage, current directory, and more.

Mastering these native iTerm2 features first is crucial. It sets a baseline for productivity and provides a clear rationale for why and when you should use tmux later. For example, a problem like build completion notifications can be solved sufficiently with iTerm2 triggers, so using tmux for this would be over-engineering. This layered approach of using each tool for its most effective purpose is a key strategy for efficiently using a solo founder’s resources.

Part II: The Engine - Maximizing Shell Performance with Zsh

Now that we have a powerful workspace, it’s time to upgrade the engine that runs within it: the shell. We will move beyond the default shell to build a plugin-based Zsh environment that actively assists the user, anticipates needs, and provides critical context at a glance.

Section 2.1: Beyond Bash - Oh My Zsh as a Management Framework

To prevent the ~/.zshrc file from turning into hundreds of lines of unmanageable code, we use Oh My Zsh. It’s not just a collection of themes, but a framework that systematically manages plugins, themes, and updates. You can install it with a single command:

sh -c "$(curl -fsSL https://install.ohmyz.sh/)"

Section 2.2: The Plugin Arsenal for the Solo Founder

Oh My Zsh offers over 300 plugins, but what matters is not quantity, but impact. We have curated a list of core plugins that can immediately boost a solo founder’s productivity.

You can activate them by adding them to the plugins=(...) list in your ~/.zshrc file.

  • zsh-autosuggestions: Suggests auto-completions in gray text based on your previously entered commands. You can press the right arrow key () to fill them in instantly, dramatically reducing repetitive command entry.
  • zsh-syntax-highlighting: Analyzes syntax in real-time as you type commands, displaying valid commands in green and non-existent ones in red. It helps you spot typos before you hit enter.
  • fzf: A powerful command-line fuzzy finder. Pressing Ctrl+R allows you to fuzzy-search your command history, letting you instantly find and re-execute complex commands with just a few characters.
  • z: A tool for navigating directories based on a “frecent” (frequently + recent) algorithm. Instead of repeatedly using the cd command, you can jump to a deep path like /path/to/my/project/src/components by simply typing a part of the directory name, like z comp.
  • git: A plugin included by default with Oh My Zsh that provides hundreds of useful git aliases like gst (git status), gp (git push), and gco (git checkout), boosting productivity.
Core Oh My Zsh PluginPurposeKey Feature/CommandProductivity Impact
zsh-autosuggestionsCommand auto-completionHistory-based suggestions while typing★★★★★
fzfFuzzy searchCtrl+R to search history★★★★★
zsh-syntax-highlightingSyntax highlightingReal-time command validation★★★★☆
zSmart directory navigationz <dir_fragment>★★★★☆
gitGit command shortcutsgst, gco, gp, etc.★★★☆☆

These plugins are powerful individually, but they create synergy when used together. zsh-autosuggestions learns the commands you type, fzf lets you instantly search that history, and z learns the directories you visit. This forms a positive feedback loop where the shell gets better at predicting your next move the more you use it.

Section 2.3: The Information-Dense Prompt

Starship is a modern, cross-shell prompt written in Rust, making it extremely fast and easily configurable with a single TOML file. Install it with Homebrew and add the initialization script to your .zshrc.

brew install starship
# Add to the end of your ~/.zshrc file
eval "$(starship init zsh)"

Starship automatically displays key information in the prompt, such as the current Git branch and status, versions of Node.js/Python/Go, and Kubernetes context. This “ambient awareness” is essential for a solo developer switching between multiple projects and tech stacks. It eliminates the need to type trivial confirmation commands like git status or node -v, allowing the user to stay in the flow of development.

Section 2.4: The Art of the Alias

In addition to the aliases provided by plugins, creating your own is a powerful way to personalize your workflow. Define your own aliases in your .zshrc file for frequently used but long or complex commands.

# ~/.zshrc
alias k="kubectl"
alias dcb="docker-compose build"
alias dcu="docker-compose up -d"
alias dcd="docker-compose down"

This strategy is like creating a personal API for your workflow. This highly-tuned shell environment reduces the cognitive load of remembering long commands, navigating complex directory structures, and checking system status. This becomes a competitive advantage, allowing you to focus more mental energy on creative problem-solving—that is, product development.

Part III: The Cockpit - Mastering tmux for Session and Workspace Management

Now we introduce the core of our workflow: tmux. It’s time to move beyond a single command line and transition to a fully managed workspace that can handle multiple contexts, persist work even if the connection is lost, and enable powerful parallel operations.

Section 3.1: The Foundational .tmux.conf Setup

Let’s create a complete, well-commented starting configuration file from scratch. This file will be located at ~/.tmux.conf.

  • Remap the Prefix Key: The default prefix, Ctrl+b, is notoriously awkward to press. It’s common to change it to Ctrl+a, inherited from GNU Screen, or an easier-to-press key like Ctrl+Space.
  • Vim-style Navigation: To provide a consistent experience for Vim/Neovim users, we enable vi key bindings for pane navigation (hjkl) and in copy mode.
  • Enable Mouse Mode: set -g mouse on is a controversial but highly practical setting for a solo developer on a GUI-based OS. It allows for intuitive pane resizing, text selection, and scrolling with the mouse, lowering the initial learning curve.
  • Improve Responsiveness: Set escape-time to a low value (e.g., 20ms) so that the Esc key in Neovim responds instantly inside tmux.
  • Color Settings: Set the terminal type to tmux-256color to fully support 256 colors and true color.

The following is the beginning of a .tmux.conf file that includes these core settings.

# ~/.tmux.conf

# Change prefix to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

# Vim-style key bindings
set-window-option -g mode-keys vi
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# Enable mouse mode
set -g mouse on

# Set for faster key response
set -sg escape-time 20

# 256 color and true color support
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"

Section 3.2: Flexible Workspace Navigation

This section is a practical guide to building the core tmux commands into your muscle memory.

Sessions: The top-level unit for managing multiple projects.

  • tmux new -s <name>: Create a new named session
  • tmux ls: List currently running sessions
  • tmux a -t <name>: Attach to a specific named session
  • Prefix + s: An interactive menu to visually select a session

Windows: The equivalent of tabs within a session.

  • Prefix + c: Create a new window
  • Prefix + p / Prefix + n: Move to the previous/next window
  • Prefix + <number>: Go directly to a window by its number
  • Prefix + w: An interactive menu to visually select a window

Panes: The smaller terminal spaces that a window is divided into.

  • Prefix + %: Split vertically
  • Prefix + ": Split horizontally
  • Prefix + <arrow key>: Move between panes
  • Prefix + z: Zoom/unzoom the current pane

Manipulation:

  • Prefix + !: Break the current pane out into a new window
  • Prefix + :join-pane -t :<window_number>: Move a pane from another window into the current one

A well-configured .tmux.conf file is the foundation for making this navigation seamless. Without remapping the prefix and enabling vi keys, the friction of using tmux increases, defeating its primary purpose of improving efficiency.

Section 3.3: The “God Mode” Cheat - synchronize-panes

This is an essential “cheat” technique for anyone who is both a solo founder and a system administrator. When you need to run the same command on multiple servers simultaneously, this feature dramatically reduces your work time.

Workflow Example: A scenario of updating 3 remote servers at the same time.

  1. Split a single window into 3 panes.
  2. SSH into a different server in each pane.
  3. Turn on synchronization mode with the command Prefix + :setw synchronize-panes on.
  4. Type the command sudo apt update && sudo apt upgrade -y just once.
  5. The typed command is sent to and executed in all 3 panes simultaneously.
  6. After the work is done, turn off synchronization mode with Prefix + :setw synchronize-panes off.

To make this powerful feature easier to use, it’s a good idea to set a shortcut in your .tmux.conf.

# ~/.tmux.conf
bind C-s set-window-option synchronize-panes

The synchronize-panes feature fundamentally changes how a solo operator manages systems. A task that used to scale linearly with the number of servers (repeating login, update, logout) is transformed into a constant-time operation. This is a powerful operational leverage that allows one person to efficiently manage an infrastructure that a small team might otherwise handle.

Part IV: The Automated Cockpit - Project Workflows and Persistence

This part focuses on eliminating repetitive setup tasks. A unicorn founder should not waste time manually reconfiguring their development environment. We must define project layouts as code and ensure that the entire workspace can survive reboots and unexpected shutdowns.

Section 4.1: Automating Project Workspaces

We will compare two methods for scripting project-specific tmux layouts.

Method 1: Shell Scripts

  • Concept: Write a simple shell script that uses tmux commands like tmux new-session, split-window, and send-keys to configure the layout.
  • Pros: Lightweight, has no dependencies other than tmux, and is extremely flexible.
  • Cons: For complex layouts, the script can become long and less readable.

Method 2: Tmuxinator

  • Concept: A Ruby-based tool that allows you to define layouts in a clean, declarative YAML format.
  • Pros: Highly readable, the configuration file itself serves as documentation, and it’s ideal for complex, standardized layouts.
  • Cons: Requires an additional dependency: Ruby.

Tmuxinator Configuration Example

Here is a complete project.yml file example for a typical web application. You can save this file as ~/.config/tmuxinator/my-app.yml and run it with the command tmuxinator start my-app.

# ~/.config/tmuxinator/my-app.yml
name: my-app
root: ~/projects/my-app

windows:
  - editor: nvim .
  - server:
      layout: even-horizontal
      panes:
        - api: cd api && npm run dev
        - web: cd web && npm run dev
  - services: docker-compose up
  - logs: docker-compose logs -f

This configuration creates a session with four windows: editor for Neovim, server split into API and web development servers, services for Docker, and a logs window for checking logs.

Automation MethodTmuxinatorShell Script
Setup CostLow (YAML syntax)Very Low (basic shell knowledge)
ReadabilityVery High (declarative)Low (imperative)
PortabilityLow (Ruby dependency)Very High (only tmux needed)
Complexity MgmtExcellentModerate
Recommended UseLong-term, complex main projectsOne-off or simple tasks

This comparison guides the user to choose the right tool for the situation. While a shell script might be more efficient for quick and simple tasks, the clarity and structure of Tmuxinator are a better investment for core projects that need to be maintained long-term.

Section 4.2: Complete Persistence - Surviving Reboots and Crashes

This is the ultimate safety net. We will build a system that automatically saves and restores the entire tmux environment, completely preventing work loss due to unexpected events.

Step 1: Install Tmux Plugin Manager (TPM): Install TPM, the de facto standard for managing tmux plugins. It’s a simple process of cloning the repository with git clone and adding one line to your .tmux.conf.

git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm
# Add to the bottom of your ~/.tmux.conf file
run '~/.tmux/plugins/tpm/tpm'

Step 2: Install tmux-resurrect & tmux-continuum:

Install both plugins via TPM. Add the following to the TPM plugin list in your .tmux.conf.

# ~/.tmux.conf
#... other settings...

# Plugin list
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

# Run TPM (must be at the end of the file)
run '~/.tmux/plugins/tpm/tpm'

After saving the configuration file, press Prefix + I (capital I) inside tmux to install the plugins.

tmux-resurrect provides manual control via Prefix + Ctrl-s (save) and Prefix + Ctrl-r (restore), while tmux-continuum automates this. To enable auto-restore, add the following setting:

# ~/.tmux.conf
set -g @continuum-restore 'on'

This setup (Tmuxinator + Resurrect/Continuum) makes your local machine effectively “stateless.” Even if the OS suddenly freezes or reboots, simply opening a terminal and starting tmux will restore the workspace for every project exactly as it was, down to the cursor position in every file and the command history in every shell. The cognitive cost and time lost due to a restart converge to almost zero. This level of resilience fundamentally changes the developer’s relationship with their tools. The fear of losing work disappears, encouraging the construction of more complex and long-running environments. This is the essence of an antifragile development environment, providing the ultimate leverage for a solo founder.

Part V: The Symbiotic System - Deep Integration for a Seamless Flow

In this final part, we reach true mastery. We will blur the boundaries between tools and create a single, cohesive system where movement and action are fluid and intuitive. The most important “cheats” and productivity gains are found here.

Section 5.1: The Great Debate - Standard tmux vs. iTerm2 Control Mode (tmux -CC)

  • Standard Approach: The traditional way of using tmux as a terminal-agnostic, pure multiplexer. It is highly portable and considered the “correct” method.
  • The “Cheat” - Control Mode: Running tmux with the tmux -CC command. This directly connects a “headless” tmux session to the iTerm2 GUI. As a result, tmux windows become native iTerm2 tabs, and tmux panes become native iTerm2 splits. The user controls tmux using iTerm2’s shortcuts, mouse support, and menus.

Analysis:

  • Pros of -CC Mode: Superior mouse support, the elegance of a native UI, and the ability to use iTerm2’s search and copy/paste features directly within tmux panes. It provides a more “Mac-like” experience overall.
  • Cons of -CC Mode: It sacrifices portability (an iTerm2-only workflow). It can occasionally have visual glitches and deviates from the pure CLI paradigm.

Recommendation for the Unicorn: For a solo founder who primarily works on a Mac, the ergonomic benefits offered by tmux -CC more than offset the disadvantage of lost portability. It is a pragmatic choice optimized for 99% of use cases (working on the main machine). You can set tmux -CC as the startup command in your iTerm2 profile to run it automatically.

Section 5.2: The Symbiotic Relationship with Neovim

This is the most critical point of integration for a developer.

Unified Navigation

  • The Problem: By default, the keys for moving between Neovim splits (Ctrl-w + hjkl) and tmux panes (Prefix + hjkl) are different. This causes constant friction.
  • The Solution: Install and configure the nvim-tmux-navigation plugin. (Vimscript users can use vim-tmux-navigator).

Setup: Add the necessary code snippets to your .tmux.conf and Neovim’s init.lua to make tmux aware of the Vim/Neovim process and intelligently forward key inputs. The result is that you can seamlessly move between Neovim splits and tmux panes with a single key combination: Ctrl + h/j/k/l.

Partial .tmux.conf setup:

is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'

init.lua (Neovim) setup:

-- Example using lazy.nvim
{
  "alexghergh/nvim-tmux-navigation",
  config = function()
    require('nvim-tmux-navigation').setup {
      keybindings = {
        left = "<C-h>",
        down = "<C-j>",
        up = "<C-k>",
        right = "<C-l>",
      }
    }
  end
}

The REPL Workflow (The “Slime” Cheat)

  • The Problem: The typical development loop is a repetitive cycle of ‘write code → switch to terminal → run code → switch back to editor.’ This is slow and cumbersome.
  • The Solution: Set up a plugin like vim-slime. This plugin allows you to select a block of code in Neovim and send it directly to another tmux pane for execution.

Workflow Example: Split the screen with Neovim on the left and a Python REPL on the right. The user writes a function in Neovim, selects it in visual mode, and presses a shortcut. The selected code is instantly sent to the Python pane on the right and executed. This creates an incredibly fast feedback loop for data science, scripting, testing, and more. It’s a “cheat” that bypasses the traditional ‘batch’ style development cycle.

Section 5.3: The Ultimate Information Display

We will now craft the perfect tmux status bar, the central nervous system for project awareness.

  • Framework vs. DIY: Using a pre-made theme like Oh My Tmux! can give you a beautiful Powerline-style status bar instantly. On the other hand, building it yourself allows you to create a custom status bar that displays only the information you need.
  • Essential Components (DIY):
    • System Status: Use a plugin like tmux-cpu to display CPU, RAM, and GPU information.
    • Git Information: Run a shell script within the status bar configuration to display the current Git branch and status: #(git branch --show-current).
    • Powerline Style: Use the special glyphs from your previously installed Nerd Font (e.g., , ) to create Powerline-style separators for a polished look.

Example Status Bar Configuration (.tmux.conf):

set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"
set -g status-right "#[fg=cyan,bold] #(git branch --show-current) | #[fg=white]%Y-%m-%d %H:%M"
set -g status-style bg=black,fg=white

This fully integrated system (iTerm2 + Zsh + Tmux + Neovim) creates a state of “ergonomic bliss.” The founder no longer fights with their tools; the tools become an extension of their thoughts. Navigation is subconscious, context is always ambient, and repetitive tasks are automated. This is the final state we are aiming for: a command-line environment designed not just for function, but for a continuous state of deep immersion and creative flow. This is the true battle station of a unicorn.

Part VI: Conclusion and Reference Configuration Files

Section 6.1: The Completed Battle Station

So far, we have built an integrated command-line environment designed to maximize the productivity of a solo unicorn founder. The philosophy of this system is clear: eliminate friction, preserve context, and automate repetition.

  • iTerm2 provided an aesthetically pleasing and functionally powerful foundation, acting as a system-wide utility through its hotkey window and triggers.
  • Zsh, Oh My Zsh, and a curated selection of plugins transformed the shell from a passive command interpreter into an active assistant that predicts and supports the user’s intent.
  • tmux served as the core of workspace and context management, providing operational leverage with features like synchronize-panes and ensuring complete automation and persistence through Tmuxinator and tmux-resurrect/continuum.
  • Finally, deep integration with Neovim achieved the pinnacle of development flow, enabling borderless navigation with nvim-tmux-navigation and an interactive development loop with vim-slime.

This combined environment is more than just the sum of its tools. It is a powerful system designed to give back the most precious resource to a solo founder—time—and allow them to focus on the essence of their business, not its technical complexities.

Section 6.2: Appendix - Complete Configuration Files

Below are the complete, ready-to-use configuration files that incorporate all the recommendations discussed in this report. Please modify paths and other settings to fit your own environment.

~/.zshrc

# Zsh Path
export ZSH="/Users/your_user/.oh-my-zsh"

# Oh My Zsh Theme (disable when using Starship)
ZSH_THEME=""

# Oh My Zsh Plugins
plugins=(
  git
  z
  zsh-autosuggestions
  zsh-syntax-highlighting
  fzf
)

# Load Oh My Zsh
source $ZSH/oh-my-zsh.sh

# Initialize Starship Prompt
eval "$(starship init zsh)"

# Personal Aliases
alias ll="ls -laF"
alias k="kubectl"
alias dcb="docker-compose build"
alias dcu="docker-compose up -d"
alias dcd="docker-compose down"

~/.tmux.conf

# =============================================================================
# Basic Settings
# =============================================================================
# Change prefix to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix

# 256 color and true color support
set -g default-terminal "tmux-256color"
set-option -ga terminal-overrides ",xterm-256color:Tc"

# Set for faster key response
set -sg escape-time 20

# Increase history size
set -g history-limit 10000

# Enable mouse mode
set -g mouse on


# =============================================================================
# Key Bindings
# =============================================================================
# Vim-style key bindings (pane navigation and copy mode)
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'pbcopy'

# Pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R

# Pane splitting (retain current path)
bind '"' split-window -v -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"

# Reload config file
bind r source-file ~/.tmux.conf \; display "Reloaded!"

# Toggle pane synchronization
bind C-s set-window-option synchronize-panes


# =============================================================================
# Neovim & Tmux Navigation
# =============================================================================
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^+ +(\S+\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'


# =============================================================================
# Status Bar
# =============================================================================
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour235 fg=colour137'
set -g status-left ''
set -g status-right '#[fg=colour233,bg=colour245,bold] %Y-%m-%d %H:%M #[fg=colour233,bg=colour252,bold] #(git branch --show-current) '
set -g status-right-length 50
set -g status-left-length 20

setw -g window-status-current-style 'fg=colour1 bg=colour252 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '

setw -g window-status-style 'fg=colour138 bg=colour235'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '

setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'


# =============================================================================
# TPM (Tmux Plugin Manager)
# =============================================================================
# Plugin list
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-cpu'

# Enable auto-restore
set -g @continuum-restore 'on'

# Run TPM (must be at the end of the file)
run '~/.tmux/plugins/tpm/tpm'

~/.config/tmuxinator/sample.yml

# ~/.config/tmuxinator/sample.yml

name: sample-project
root: ~/path/to/your/project

# Optional tmux socket
# socket_name: foo

# Runs on project start, always
# on_project_start: command

# Run on project start, after the first time
# on_project_restart: command

# Pass command line options to tmux. Useful for specifying a different tmux.conf.
# tmux_options: -f ~/.tmux.mac.conf

# Specifies (by name or index) which window will be selected on project startup.
# startup_window: editor

# Specifies (by index) which pane of the specified window will be selected.
# startup_pane: 1

# Controls whether the tmux session should be attached to automatically.
# attach: false

windows:
  - editor:
      layout: main-vertical
      panes:
        - nvim .
        - # Empty pane for commands
  - server:
      layout: even-horizontal
      panes:
        - api:
            - cd api/
            - npm run dev
        - web:
            - cd web/
            - npm run dev
  - logs:
      - docker-compose logs -f
  - shell:
      - # Another shell for git, etc.

Sources