Skip to content

A simple yet elegant zsh theme for developer (to be used with oh-my-zsh)

License

Notifications You must be signed in to change notification settings

drNoob13/SimpleZshTheme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tuan.zsh-theme

A simple zsh theme for oh-my-zsh, a.k.a tuan theme for short.

This dark theme favors visual clarity while is still easy on the eyes and provides a minimum amount of necessary information for developers, esp. those who uses Python virtualenv.

Screenshots

img

Features

  • Directory: show current and parent directory up to 1 level. Auto shorten when traversing any directory tree.
  • Git status:
    • 🔥 means there is uncommitted change in the current (git) directory. If you use oh-my-zsh, git status is evaluated by the git_prompt_info() sub function, which calls the git status --porcelain plus other conditioned flags.
    • It is possible to ignore untracked files (so that it won't show 🔥) by enabling the following line in your .zshrc:
      DISABLE_UNTRACKED_FILES_DIRTY="true"
  • Clock: 24-h clock that might come handy. Can be changed to AM/PM format if needed.

Other Notes

For those who want to replicate exactly the shell appearance in above screenshots, see if you have the same font and terminal theme as below.

  • Font: FiraCode Nerd Font Retina (See more on the Font requirement below).
  • Terminal emulator: tilix.
  • Terminal theme: Dracula theme for tilix terminal.

How to Install in Linux

  1. Set up your oh-my-zsh.
  2. Link file tuan.zsh-theme to ~/.oh-my-zsh/themes/
    # Clone this repo to <dir>/SimpleZshTheme
    cd ~/.oh-my-zsh/themes/  # goto oh-my-zsh theme dir
    ln -s <dir>/SimpleZshTheme/tuan.zsh-theme  .  # sym link
  3. Add/modify your .zshrc to add new theme:
    ZSH_THEME="tuan" 
  4. Enable UTF-8 for correct display of special characters in your .zshrc:
    # add following lines in your .zshrc
    export LC_ALL=en_US.UTF-8
    export LANG=en_US.UTF-8
  5. Recommended plugins for oh-my-zsh:
    # in your .zshrc
    plugins=(git   # mush have
            python
            please # if you use please build system
            aliases
            copypath
            zsh-autosuggestions # must have
            # zsh-syntax-highlighting # good to have, see below note        
    )
    
    On zsh-syntax-highlighting: (feel free to skip if you are not using this plugin) I would highly recommend disabling the syntax underlining. It can be done by adding the following lines into your .zshrc:
    # Disable underlining for zsh-syntax-highlighting plugin
    (( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
    ZSH_HIGHLIGHT_STYLES[path]=none
    ZSH_HIGHLIGHT_STYLES[path_prefix]=none

Requirements:

  • Oh-my-zsh installed in your system. oh-my-zsh github provides very clear and straightforward instructions on how to install and use.
  • A Nerd Font installed in your machine, e.g. Fira Code Nerd Font (website). This is required to render some of the fonts and icons properly. If you see weird characters displayed on your terminal, there is a high chance that you haven't installed and chosen the font properly.
    • Choose FiraCode Nerd Font in your terminal emulator profile.
    • Do the same in your VSCode editor.font and terminal.font settings if you want to use this theme in your VSCode terminal.
  • [Optional] Dracula theme for your choice of terminal emulator, e.g. tilix, gnome-terminal, etc., and for VSCode (if you also use VSCode). Refer to Dracula theme website for installation.

Credits

  • robbyrussell and the oh-my-zsh community.
  • ChesterYue for his theme-icon inspiration.
  • The Nerd Fonts' authors and community.
  • Dracula theme's authors and contributors.

About

A simple yet elegant zsh theme for developer (to be used with oh-my-zsh)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages