Giter Club home page Giter Club logo

oh-my-zsh-powerline-theme's Introduction

oh-my-zsh-powerline-theme

oh-my-zsh Powerline style Theme

Preview

Preview

Set Up

  1. Clone the repository.

  2. Create a symlink of powerline.zsh-theme in .oh-my-zsh/themes/. You can use the install_in_omz.sh file:

    ./install_in_omz.sh
    
  3. Configure the theme in your .zshrc file:

    ZSH_THEME="powerline"
    

More options

All options must be overridden in your .zshrc file.

By default, at the right of the powerline are displayed the date and the time. If you don't want date or time, you can choose what you want to display:

POWERLINE_RIGHT_B="time replacement"

Or if you don't want to display anything:

POWERLINE_RIGHT_B="none"

If you want to display date next to time:

POWERLINE_RIGHT_A="date"

If you want to display exit-code of last command next to time:

POWERLINE_RIGHT_A="exit-status"

or if you want it to appear only on faulty runs:

POWERLINE_RIGHT_A="exit-status-on-fail"

If you want to display date or non-zero-exit-code of last command next to time:

POWERLINE_RIGHT_A="mixed"

If you want to display a custom text next to time:

POWERLINE_RIGHT_A="blackfire.io"

If you want to change the color of the POWERLINE_RIGHT_A element:

POWERLINE_RIGHT_A_COLOR_FRONT="black"
POWERLINE_RIGHT_A_COLOR_BACK="red"

If you want to change the date format to what you want:

POWERLINE_DATE_FORMAT="%D{%d-%m}"

If you don't want to display your username (the green or red (root) colors are still there):

POWERLINE_HIDE_USER_NAME="true"

If you don't want to display your hostname (the green or red (root) colors are still there):

POWERLINE_HIDE_HOST_NAME="true"

If you only want to see the first part of the hostname (not the fqdn):

POWERLINE_SHORT_HOST_NAME="true"

If you want to hide git prompt status (new files, modified files, unmerged files, etc):

POWERLINE_HIDE_GIT_PROMPT_STATUS="true"

If you want to hide the right hand side prompt completely:

POWERLINE_DISABLE_RPROMPT="true"

If you don't want the blank line before the prompt:

POWERLINE_NO_BLANK_LINE="true"

If you want full path:

POWERLINE_PATH="full"

If you want to display ~ instead of your full path:

POWERLINE_PATH="short"

If you want to customize the current path display (overrides full path above):

POWERLINE_CUSTOM_CURRENT_PATH="%3~"

If you want git info on right instead of left:

POWERLINE_SHOW_GIT_ON_RIGHT="true"

If you want to tell if you are in a remote SSH session:

POWERLINE_DETECT_SSH="true"

If you want to hide virtualenv information in the prompt:

POWERLINE_HIDE_VIRTUAL_ENV="true"

Also you can change the icons of GIT info, default values are:

POWERLINE_GIT_CLEAN="✔"
POWERLINE_GIT_DIRTY="✘"
POWERLINE_GIT_ADDED="%F{green}✚%F{black}"
POWERLINE_GIT_MODIFIED="%F{blue}✹%F{black}"
POWERLINE_GIT_DELETED="%F{red}✖%F{black}"
POWERLINE_GIT_UNTRACKED="%F{yellow}✭%F{black}"
POWERLINE_GIT_RENAMED="➜"
POWERLINE_GIT_UNMERGED="═"

Requirements

  • Vim Powerline patched font: Download your favorite one on Lokaltog/powerline-font.
  • Z shell (zsh): See oh-my-zsh for more info.
  • Make sure terminal is using 256-colors mode with export TERM="xterm-256color".

Contribute

How to contribute

  • Create an issue if you find a bug or if you want a new feature.
  • Fork the project and pull request your very best feature.

Thanks

oh-my-zsh-powerline-theme's People

Contributors

adrienbrault avatar arthraim avatar dshoreman avatar dtran320 avatar flavius avatar gbin avatar itszero avatar jeremyfreeagent avatar jottr avatar krischer avatar lcharkiewicz avatar mkraemer avatar pierrelvx avatar segiddins avatar thomaschrstnsn avatar wujtruj avatar yachi avatar zakkak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oh-my-zsh-powerline-theme's Issues

Right display space

There is a space at the right of the right display that doesn't need to be there.

The special character doesn't display correctly in the remote server

Firstly, Everything works perfectly in my local machine which is Mac 10.8, but I want use the same powerline theme for my remote server which is an EC2 instance, after I install the theme, install the font in ~/.fonts folder and github.com/cmoel/tom_dale_embe­r_screencast, then to the remote server, it still shows the crazy characters:

How to add custom VT sequences (text) to prompt?

Hey,

first, thanks for this great work. This is a very nice theme!

Now, I'd like to inject custom VT sequences into the prompt (so on the left side of the command input that I am typing). It seems impossible, or at lest I couldn't find a way for that. I'm fairly new to zsh/powerline, so please be kind if i was acting super blind. :)

Many thanks.

Preview.png not showing

The preview-image does not load, because of
Refused to load the image 'http://github.com/jeremyFreeAgent/oh-my-zsh-powerline-theme/raw/master/preview.png' because it violates the following Content Security Policy directive: "img-src 'self' data: assets-cdn.github.com identicons.github.com www.google-analytics.com collector.githubapp.com *.githubusercontent.com *.gravatar.com *.wp.com".

Tab completion shifts characters, makes command unreadable

A gif explaining what my problem is (sorry that it's a bit laggy, this happened after conversion from video):

iterm-problem

As you can see I have set the correct font (Meslo LG M DZ Regular for Powerline), I also had set the LANG and LANG_ALL values to en_US.UTF-8.

Here is my .zshrc, the theme config part is at the top, the code at bottom are mostly functions/aliases.

I'm using:

  • OS X Yosemite 10.10.4 (freshly installed today, as is the rest)
  • iTerm2 Build 2.9.20150720-nightly -- also happening in Terminal.app
  • zsh 5.0.8 (x86_64-apple-darwin14.3.0)
  • this theme, configured with mentioned font and material design colors theme

I have been using this theme (same config) for almost a year before I decided to reinstall the OS and now I can't figure out what am I missing.

Color info bar second from right?

This is how my terminal prompt currently looks:

jkleinberg_gnvjkleinberg1pfd57___repos_todo__zsh_

I know that I can change the color of the right-most bar (what is displaying my date) with the POWERLINE_RIGHT_A_COLOR_BACK and POWERLINE_RIGHT_A_COLOR_FRONT environment variables, but what about the time and Git info?

I have expected POWERLINE_RIGHT_B_COLOR_BACKand POWERLINE_RIGHT_B_COLOR_FRONTas well as C, but they currently do not. It would be especially nice, since currently B and C are the same color.

How to remove the white space when in a no-git directory

When I am in a directory which is not a git repository, there is an white space shown at the end of the prompt.

image

I've tried to uncomment the if-statement in line 109 to line 128, not work.

Also tried the ternary expression as this article:

POWERLINE_GIT_INFO_LEFT=$(("$(git_prompt_info)"=""?1:0))

But end up with : zsh: bad math expression: illegal character: "

My temporary solution is add below lines to my ~/.zshrc:

function newCD(){
	cd $1;
	source "$ZSH/themes/$ZSH_THEME.zsh-theme"
}
alias cd="newCD"

But it seems to so ugly and unstable as I changed the behavior of the default command "cd", so does anyone have a better solution?

Only show current working directory in the path

Even if I set the POWERLINE_PATH="short", it is still too long for some path, like smap10@Xu ~/Project/Relation-Extraction/relation-classication-cnn-pytorch

image

Is ther any way only show the current working directory, like this

smap10@Xu .../Relation-Extraction/relation-classication-cnn-pytorch

or

smap10@Xu ~/.../relation-classication-cnn-pytorch

Strange Ubuntu Issue

I'm sure this is probably a simple fix, but I can't seem to figure it out. Here's what my vim looks like:

vim font

I'm using Ubuntu Mono for Powerline.

The problem is that when I get this theme set up, here's what the font looks like on the command line:

terminal

I probabaly need to set something somewhere else, but I can't figure out what I'm missing.

Thanks in advance for any help!

Edit Color Scheme

Is there a way to change the colors of the prompt in .zshrc? The default color scheme looks great with the solarized theme in iTerm, but is hard to read in a terminal with a black background.

Repeat character after tab-complete / expansion

repeat_character

After a tab-complete, a repeat character shows up, and other weird behavior happens at the text prompt. I've tried suggestions online saying to add the following to the top of my .zshrc:

export LC_ALL="en_US.UTF-8"
export LANG="en_US.UTF-8"
export TERM="xterm-256color"

Do you have any fixes for this? I'm on OSX using iTerm2, also using the powerline-fonts.

multicolored icons?

How can you have multicolored icons? e.g. the star has two colors (not counting the background) and the pile of crap as multiple colors. How is this possible? I thought terminal characters had only a foreground and a background color.

OS X Character not in Range

After installing the powerline theme I am getting the following error:

.oh-my-zsh/custom/themes/powerline.zsh-theme:112: character not in range

I have no clue how to resolve this.

Problem blank line and resize

Hi,

I'm having this three problems:

1º If I put something on the right (date, time, whatever..) it looks like this (even in full screen):

captura de pantalla 2014-06-19 a la s 17 13 27

2º I can only write in the next line, not in the same line as User@host and with that blank square that disappear while writing:

captura de pantalla 2014-06-19 a la s 17 22 51

3º When I resize, Iterm goes crazy:

captura de pantalla 2014-06-19 a la s 17 23 20

Error: character not in range in arch linux

I have been using this theme in my mac for a while and no problem at all. But when I was trying to use it in linux VPS in digital ocean. I got the following error.

P.S. I'm using latest version of arch linux and oh-my-zsh

powerline.zsh-theme:90: character not in range

iTerm2 unicode character transparency

The right arrow unicode characters don't display correctly with transparency in iterm2. Their color stays constant with transparency change despite surrounding background color adjusting appropriately. Not sure if this is an iterm2 issue displaying colored unicode, but perhaps there is a workaround with the powerline theme?

With transparency off:
image

With transparency at 50%:
image

Transparency at 100%:
image

Prezto support?

Hi, I loved the screenshot and wanted to try it out, but I use prezto... I couldn't get it working in there... Any tips?

Problem with right prompt and line height

Hey,

I already contacted jeremy via email (didn't know about the issues tab, I'm new in this git stuff), but since I didn't figure it out (and since someone else might also have this issue) I'm posting it here:

I have problem with right prompt - it looks like this:
http://i.imgur.com/4a3pl.png
there's a space between arrow and date/time background, but also, the arrow height is not right (arrow height is the problem on the left side too). In email, jeremy told something about line height not set right, but I didn't figure it out - I googled for urxvt line height and zsh line height - no results...

tl;dr - I want arrows to be the same height as the background colors and I don't want spaces between arrows and background colors.
I am using urxvt with Inconsolata for Powerline, size 11.

Thanks!

history command times bug

When the number of commands reaches 10001, it will return to this number every time it is reconnected

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.