Git Product home page Git Product logo

spaceship-zsh-theme's Introduction

Spaceship

⭐🚀 Spaceship ZSH

An “Oh My ZSH!” theme for Astronauts.

Spaceship is an “Oh My ZSH!” minimalistic and powerful theme. It combines everything you may need for convenient work, without unnecessary complications, like a real spaceship.

Currently it shows:

  • Current git branch.
  • Git repo status:
    • + — uncommitted changes in the index;
    • ! — unstaged changes;
    • ? — untracked changes;
    • $ — stashed changes;
    • — unpulled commits;
    • — unpushed commits.
  • Prompt character turns red if the last command exits with non-zero code.
  • Hostname only displayed when in an SSH session.
  • Username displayed only when it isn't $LOGNAME.
  • Username turns red when root.
  • Current Node.js version, through NVM ().
  • Current Ruby version, through RVM/RBENV/CHRUBY (💎).
  • Current Python virtualenv.
  • Current Vi-mode mode.

Want more features? Please, open an issue or send pull request.

Requirements

For correct work you will first need:

Installing

For oh-my-zsh users

Installing using curl:

curl -o - https://raw.githubusercontent.com/denysdovhan/spaceship-zsh-theme/master/install.sh | zsh

Installing using wget:

wget -O - https://raw.githubusercontent.com/denysdovhan/spaceship-zsh-theme/master/install.sh | zsh

If you have problems, follow these instructions:

  1. Download the theme here
  2. Rename spaceship.zsh to spaceship.zsh-theme
  3. Put the file spaceship.zsh-theme in $ZSH_CUSTOM/themes/
  4. Add the line to your ~/.zshrc:
ZSH_THEME="spaceship"

For antigen users

Add the following snippet ~/.zshrc after the line antigen use oh-my-zsh:

antigen theme https://github.com/denysdovhan/spaceship-zsh-theme spaceship

For Zgen users

Add the following line to your ~/.zshrc where you're adding your other zsh plugins:

zgen load denysdovhan/spaceship-zsh-theme spaceship

Screenshots

The spaceship theme looks awesome with some popular color schemes. Take a look to make sure:

Monokai

Monokai

Solarized Dark

Solarized

Night Eighties

Night Eighties

One Dark

One Dark

Options

Now you have ability to disable elements of Spaceship. All options must be overridden in your .zshrc file.

Prompt

Variable Default Meaning
SPACESHIP_PROMPT_SYMBOL Character to be shown before any command
SPACESHIP_PROMPT_SEPARATE_LINE true Make the prompt span across two lines
SPACESHIP_PROMPT_ADD_NEWLINE true Adds a newline character before each prompt line
SPACESHIP_PROMPT_TRUNC 3 Number of folders of cwd to show in prompt, 0 to show all

Git

Variable Default Meaning
SPACESHIP_GIT_SHOW true Show/hide git status
SPACESHIP_GIT_UNCOMMITTED + Character to be shown on uncommitted changes
SPACESHIP_GIT_UNSTAGED ! Character to be shown on unstaged changes
SPACESHIP_GIT_UNTRACKED ? Character to be shown on untracked changes
SPACESHIP_GIT_STASHED $ Character to be shown on stashed changes
SPACESHIP_GIT_UNPULLED Character to be shown on unpulled changes
SPACESHIP_GIT_UNPUSHED Character to be shown on unpushed changes

Nvm

Variable Default Meaning
SPACESHIP_NVM_SHOW true Current Node.js version
SPACESHIP_NVM_SYMBOL Character to be shown before Node.js version

Ruby

Variable Default Meaning
SPACESHIP_RUBY_SHOW true Current Ruby version
SPACESHIP_RUBY_SYMBOL 💎 Character to be shown before Ruby version

Venv

Variable Default Meaning
SPACESHIP_VENV_SHOW true Current Python virtualenv

Vi-mode

Variable Default Meaning
SPACESHIP_VI_MODE_SHOW true Current Vi-mode
SPACESHIP_VI_MODE_INSERT [I] Text to be shown when in insert mode
SPACESHIP_VI_MODE_NORMAL [N] Text to be shown when in normal mode

Note: For oh-my-zsh users with vi-mode plugin enabled: Add export RPS1="%{$reset_color%}" before source $ZSH/oh-my-zsh.sh in ~/.zshrc to disable default <<< NORMAL mode indicator in right prompt.

Example

Here is all optins which may be changed. Copy this to your ~/.zshrc to make it easy to change.

# PROMPT
SPACESHIP_PROMPT_SYMBOL=''
SPACESHIP_PROMPT_ADD_NEWLINE=true
SPACESHIP_PROMPT_SEPARATE_LINE=true

# GIT
SPACESHIP_GIT_SHOW=true
SPACESHIP_GIT_UNCOMMITTED='+'
SPACESHIP_GIT_UNSTAGED='!'
SPACESHIP_GIT_UNTRACKED='?'
SPACESHIP_GIT_STASHED='$'
SPACESHIP_GIT_UNPULLED=''
SPACESHIP_GIT_UNPUSHED=''

# NVM
SPACESHIP_NVM_SHOW=true
SPACESHIP_NVM_SYMBOL=''

# RUBY
SPACESHIP_RUBY_SHOW=true
SPACESHIP_RUBY_SYMBOL='💎'

# VENV
SPACESHIP_VENV_SHOW=true

# VI_MODE
SPACESHIP_VI_MODE_SHOW=true
SPACESHIP_VI_MODE_INSERT="[I]"
SPACESHIP_VI_MODE_NORMAL="[N]"

License

MIT © Denys Dovhan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.