Code Monkey home page Code Monkey logo

rb-zsh-theme's Introduction

rb.zsh-theme

A ZSH theme based on agnoster, optimised for people who:

  • Like Solarized
  • Use Git
  • Love fancy powerline-like themes

This has been tweaked under Mac with Solarized dark and a good Unicode font (Fira Code Light)

Compatibility

This comes straight from agnoster, since my theme uses the same formatting code

In all likelihood, you will need to install a Powerline-patched font for this theme to render correctly.

To test if your terminal and font support it, check that all the necessary characters are supported by copying the following command to your terminal: echo "\ue0b0 \u00b1 \ue0a0 \u27a6 \u2718 \u26a1 \u2699". The result should look like this:

Character Example

What does it show?

  • Current git project, if any
  • Working directory, without path
  • Git status
    • Branch () or detached head (➦)
    • Current (shortened) branch with some tweaks / SHA1 in detached head state
    • Dirty working directory (±, color change)
  • Error status (color change)

Screenshot

Shortened branches

I use a small, inlined awk script to shorten git branches depending on some rules:

  • Check which is the likely word/concept separator (chooses between slash or dash)
  • Split by separator and shorten each word to 4 letters unless it matches our JIRA ticket format (in this case keep full, see screenshot)

Helpers

A helper function (which I alias to oj) opens the corresponding JIRA issue. Similarly, og opens the github page for the project. This last one could be in my general zsh configuration, but I decided to bind it to the theme code (since it is when it occurred to me)

Possible changes

I may tweak it to apply the non-shortening of ticket numbers to follow also the Spark ticket system, and add the corresponding issue tracker helper.

rb-zsh-theme's People

Contributors

rberenguel avatar

Watchers

 avatar

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.