Skip to content

tourcoder/blue.zsh-theme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

Blue ZSH Theme

A clean and customizable oh my zsh theme with Git integration, designed for dark terminals. It features a colorful prompt with dynamic Git branch and status indicators, and distinct ls colors for files and directories.

Features

  • Dynamic Prompt:

    • Git Repositories: Displays [path :: branch status] ➜
      • Path and brackets in blue (%F{75}).
      • Separator :: in white.
      • Branch name with color-coded branches:
        • main/master: Green (%F{40})
        • dev: Yellow (%F{226})
        • feature-*: Blue (%F{75})
        • Others: Orange (%F{214})
      • Git status indicators in yellow (%F{226}):
        • *: Modified or staged files
        • +: Untracked files
        • !: Merge conflicts
      • Prompt arrow (➜) in blue.
    • Non-Git Directories: Displays [path] ➜
      • Path and brackets in blue.
      • Prompt arrow in blue.
  • Colorful ls Output:

    • Directories: Bold blue
    • Regular files: Default color
    • Executables: Red
    • Symbolic links: Cyan
    • Other file types (sockets, pipes, etc.): Distinct colors
    • Compatible with macOS (ls -G) and Linux (ls --color=auto).
  • Lightweight and Optimized:

    • Minimal code with efficient Git status checks.
    • Clear structure for easy customization.

Installation

  1. Clone or Copy the Theme:

    • Save the theme file as blue.zsh-theme in your oh my zsh custom themes directory:
      cp blue.zsh-theme ~/.oh-my-zsh/themes/
  2. Set the Theme:

    • Edit your ~/.zshrc and set the theme:
      ZSH_THEME="blue"
    • Apply changes:
      source ~/.zshrc
  3. Verify Setup:

    • Navigate to a Git repository and check the prompt: [path :: branch status] ➜.
    • Navigate to a non-Git directory and check: [path] ➜.
    • Run ls -lah to confirm colorful file and directory output.

Requirements

  • Zsh with oh my zsh installed.
  • Terminal supporting 256 colors (echo $TERM should output xterm-256color or similar).
  • Optional: A font supporting emojis (e.g., Nerd Fonts) for better prompt rendering.

Customization

  • Change Colors:

    • Edit color variables in the theme file (e.g., BLUE='%F{75}' for path and arrow).
    • Use 256-color codes (e.g., %F{69} for darker blue, %F{228} for brighter yellow).
    • Test colors in your terminal to match your preferences.
  • Modify Prompt:

    • Adjust the PROMPT string in set_prompt to change symbols or layout.
    • Example: Replace ➜ with another symbol like β†’ or $.
  • Extend Git Status:

    • Modify parse_git_status to add more Git indicators (e.g., ahead/behind remote).
  • LS Colors:

    • Customize LSCOLORS (macOS) or LS_COLORS (Linux) for different file type colors.
    • Refer to man dircolors (Linux) or man ls (macOS) for details.

Troubleshooting

  • Prompt not displaying correctly?

    • Ensure ZSH_THEME="blue" is set in ~/.zshrc.
    • Verify Git is installed and working (git --version).
    • Check if is_git_repo works: Run git rev-parse --is-inside-work-tree in a Git directory.
  • Colors not showing?

    • Confirm your terminal supports 256 colors (echo $TERM).
    • Try adjusting color codes in the theme file.
  • LS colors not working?

    • Ensure CLICOLOR=1 (macOS) or ls --color=auto (Linux) is enabled.
    • Check LSCOLORS or LS_COLORS syntax.

License

This theme is released under the MIT License. Feel free to modify and share!

Contributing

Suggestions and pull requests are welcome! Please open an issue or submit a pull request on the repository (if hosted).


Happy coding with Blue ZSH Theme! πŸš€

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages