Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rupeshtiwari/2a474596ea9b87de0026d2e58a54c7bf to your computer and use it in GitHub Desktop.

Select an option

Save rupeshtiwari/2a474596ea9b87de0026d2e58a54c7bf to your computer and use it in GitHub Desktop.
Fixing Agnoster Prompt + Hiding tmux Green Bar
  • Agnoster prompt fixes
  • New-line arrow cursor
  • tmux green-bar fix

Clean Agnoster Prompt + Hidden tmux Status Bar (Mac / zsh)

Goal

  • Use Oh My Zsh with the agnoster theme.
  • Show only the current folder in the blue segment (not the full path).
  • Keep the left git segment: ▶ main ±.
  • Hide:
    • user@host (e.g. rupesh@Rupeshs-MacBook-Pro)
    • right-side git:(main*).
  • Put the cursor on the next line with a nice arrow.
  • Use tmux splits, but hide the green tmux status bar globally.

1. zsh / agnoster configuration

1.1 Set theme to agnoster

In ~/.zshrc:

ZSH_THEME="agnoster"

(make sure other themes like fwalch, refined, etc. are not active)


1.2 Final agnoster tweaks

Add this block at the very bottom of ~/.zshrc:

# --- Rupesh final agnoster tweaks ---

# 1) Hide user@host segment (rupesh@Rupeshs-MacBook-Pro)
prompt_context() { :; }

# 2) Show only current folder, white text on blue
prompt_dir() {
  local dir="%1~"           # %1~ = just the last path segment
  prompt_segment blue white "$dir"
}

# 3) Remove everything on the right side (e.g. git:(main*))
RPROMPT=''

# 4) Put the cursor on the next line with a smart arrow
PROMPT+='
%F{39}➜%f '

Reload zsh:

source ~/.zshrc

1.3 Result

Prompt now looks like:

demo-1-inspect-brokers ▶ main ±
➜ 
  • Blue segment: current folder only.
  • Yellow segment: git branch + dirty marker.
  • No hostname.
  • No right-side git:(main*).
  • Cursor on its own line with an arrow.

2. tmux configuration (hide green bar for all sessions)

2.1 Create or edit ~/.tmux.conf

Open:

code ~/.tmux.conf

Put this inside:

# Hide the tmux status bar globally
set -g status off

Save the file.

2.2 Apply to current tmux session (optional)

If you’re inside tmux already:

tmux source-file ~/.tmux.conf

Or just start a new session:

tmux

2.3 Result

  • No green status bar at the bottom.

  • Clean screen with only your agnoster prompt.

  • You can still use tmux splits:

    • Horizontal split: Ctrl + b then ".
    • Vertical split: Ctrl + b then %.
    • Move between panes: Ctrl + b then arrow keys.

Final State

You now have:

demo-1-inspect-brokers ▶ main ±
➜ _

in each tmux pane, with:

  • Clean agnoster theme.
  • Short folder name.
  • Git info on the left only.
  • No tmux status bar.
  • Full-width line to type commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment