0xsaika / powerline-zsh

Powerline for Zsh Custom and Fix

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Powerline style prompt for Zsh :: Customize & Fix

This is fork from https://github.com/carlcarl/powerline-zsh

Custom&fix by saika

fix charset of status bar

Powerline-Zsh Screenshot Powerline-Zsh Screenshot2

Setup

  • Install Powerline symbol otf in font folder

  • Install Powerline Font from here

     echo -e "\ue0a0\ue0a1\ue0a2\ue0b0\ue0b1\ue0b2\ue0b3"
  • Clone this repository somewhere

    git clone https://github.com/0xsaika/powerline-zsh
  • Create a symlink to the python script in your home:

    ln -s <path/to/powerline-zsh.py> ~/powerline-zsh.py
  • Now add the following to your .zshrc:

    export TERM='xterm-256color'
    function _update_ps1()
    {
        export PROMPT="$(~/powerline-zsh.py $?)"
    }
    precmd()
    {
        _update_ps1
    }

Usage

  • powerline-zsh.py usage:

    -h, --help  show this help message and exit
    --cwd-only  Hide parent directory
    --hostname  Show hostname at the begin
    -m <mode>   Choose icon font: default, compatible, patched or konsole.
                Default is "default"

Tips

  • If you want delete root indicator, chk line 287 and comment out that line

    powerline.append(Segment(powerline, ' $', fg, bg))

About

Powerline for Zsh Custom and Fix

License:MIT License


Languages

Language:Python 100.0%