Giter VIP home page Giter VIP logo

powerline-shell's Introduction

A Powerline style prompt for your shell

A beautiful and useful prompt generator for Bash, ZSH, Fish, and tcsh:

MacVim+Solarized+Powerline+CtrlP

  • Shows some important details about the git/svn/hg/fossil branch (see below)
  • Changes color if the last command exited with a failure code
  • If you're too deep into a directory tree, shortens the displayed path with an ellipsis
  • Shows the current Python virtualenv environment
  • It's easy to customize and extend. See below for details.

The generated prompts are designed to resemble powerline, but otherwise this project has no relation to powerline.

Table of Contents generated with DocToc

Version Control

All of the version control systems supported by powerline shell give you a quick look into the state of your repo:

  • The current branch is displayed and changes background color when the branch is dirty.
  • When the local branch differs from the remote, the difference in number of commits is shown along with or indicating whether a git push or pull is pending.

If files are modified or in conflict, the situation is summarized with the following symbols:

  • -- a file has been modified (but not staged for commit, in git)
  • -- a file is staged for commit (git) or added for tracking
  • -- a file has conflicts
  • ? -- a file is untracked

Each of these will have a number next to it if more than one file matches.

The segment can start with a symbol representing the version control system in use. To show that symbol, the configuration file must have a variable vcs with an option show_symbol set to true (see Segment Configuration).

Setup

This script uses ANSI color codes to display colors in a terminal. These are notoriously non-portable, so may not work for you out of the box, but try setting your $TERM to xterm-256color.

  • Patch the font you use for your terminal: see powerline-fonts

    • If you struggle too much to get working fonts in your terminal, you can use "compatible" mode.
    • If you're using old patched fonts, you have to use the older symbols. Basically reverse this commit in your copy.
  • Install using pip:

pip install powerline-shell

(You can use the --user option to install for just your user, if you'd like. But you may need to fiddle with your PATH to get this working properly.)

  • Or, install from the git repository:
git clone https://github.com/b-ryan/powerline-shell
cd powerline-shell
python setup.py install
  • Setup your shell prompt using the instructions for your shell below.

Bash

Add the following to your .bashrc file:

function _update_ps1() {
    PS1=$(powerline-shell $?)
}

if [[ $TERM != linux && ! $PROMPT_COMMAND =~ _update_ps1 ]]; then
    PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
fi

Note: On macOS, you must add this to one of .bash_profile, .bash_login, or .profile. macOS will execute the files in the aforementioned order and will stop execution at the first file it finds. For more information on the order of precedence, see the section INVOCATION in man bash.

ZSH

Add the following to your .zshrc:

function powerline_precmd() {
    PS1="$(powerline-shell --shell zsh $?)"
}

function install_powerline_precmd() {
  for s in "${precmd_functions[@]}"; do
    if [ "$s" = "powerline_precmd" ]; then
      return
    fi
  done
  precmd_functions+=(powerline_precmd)
}

if [ "$TERM" != "linux" -a -x "$(command -v powerline-shell)" ]; then
    install_powerline_precmd
fi

Fish

Redefine fish_prompt in ~/.config/fish/config.fish:

function fish_prompt
    powerline-shell --shell bare $status
end

tcsh

Add the following to your .tcshrc:

alias precmd 'set prompt="`powerline-shell --shell tcsh $?`"'

Customization

Config File

Powerline-shell is customizable through the use of a config file. This file is expected to be located at ~/.config/powerline-shell/config.json. You can generate the default config at this location using:

mkdir -p ~/.config/powerline-shell && \
powerline-shell --generate-config > ~/.config/powerline-shell/config.json

(As an example, my config file is located here: here)

Adding, Removing and Re-arranging segments

Once you have generated your config file, you can now start adding or removing "segments" - the building blocks of your shell. The list of segments available can be seen here.

You can also create custom segments. Start by copying an existing segment like this. Make sure to change any relative imports to absolute imports. Ie. change things like:

from ..utils import BasicSegment

to

from powerline_shell.utils import BasicSegment

Then change the add_to_powerline function to do what you want. You can then use this segment in your configuration by putting the path to your segment in the segments section, like:

"segments": [
    "~/path/to/segment.py"
]

Generic Segments

There are two special segments available. stdout accepts an arbitrary command and the output of the command will be put into your prompt. env takes an environment variable and the value of the variable will be set in your prompt. For example, your config could look like this:

{
  "segments": [
    "cwd",
    "git",
    {
      "type": "stdout",
      "command": ["echo", "hi"],
      "fg_color": 22,
      "bg_color": 161
    },
    {
      "type": "env",
      "var": "DOCKER_MACHINE_NAME"
    },
  ]
}

Segment Separator

By default, a unicode character (resembling the > symbol) is used to separate each segment. This can be changed by changing the "mode" option in the config file. The available modes are:

  • patched - The default.
  • compatible - Attempts to use characters that may already be available using your chosen font.
  • flat - No separator is used between segments, giving each segment a rectangular appearance (and also saves space).

Themes

The powerline_shell/themes directory stores themes for your prompt, which are basically color values used by segments. The default.py defines a default theme which can be used standalone, and every other theme falls back to it if they miss colors for any segments.

If you want to create a custom theme, start by copying one of the existing themes, like the basic. and update your ~/.config/powerline-shell/config.json, setting the "theme" to the path of the file. For example your configuration might have:

  "theme": "~/mythemes/my-great-theme.py"

You can then modify the color codes to your liking. Theme colors are specified using Xterm-256 color codes.

A script for testing color combinations is provided at colortest.py. Note that the colors you see may vary depending on your terminal. When designing a theme, please test your theme on multiple terminals, especially with default settings.

Segment Configuration

Some segments support additional configuration. The options for the segment are nested under the name of the segment itself. For example, all of the options for the cwd segment are set in ~/.config/powerline-shell/config.json like:

{
    "segments": [...],
    "cwd": {
        options go here
    }
    "theme": "theme-name",
    "vcs": {
        options go here
    }
}

The options for the cwd segment are:

  • mode: If plain, then simple text will be used to show the cwd. If dironly, only the current directory will be shown. Otherwise expands the cwd into individual directories.
  • max_depth: Maximum number of directories to show in path.
  • max_dir_size: Maximum number of characters displayed for each directory in the path.
  • full_cwd: If true, the last directory will not be shortened when max_dir_size is used.

The hostname segment provides one option:

  • colorize: If true, the hostname will be colorized based on a hash of itself.

The vcs segment provides one option:

  • show_symbol: If true, the version control system segment will start with a symbol representing the specific version control system in use in the current directory.

The options for the battery segment are:

  • always_show_percentage: If true, show percentage when fully charged on AC.
  • low_threshold: Threshold percentage for low-battery indicator color.

The options for the time segment are:

  • format: Format string as used by strftime function, e.g. %H:%M.

Contributing new types of segments

The powerline_shell/segments directory contains python scripts which are injected as is into a single file powerline_shell_base.py. Each segment script defines a function that inserts one or more segments into the prompt. If you want to add a new segment, simply create a new file in the segments directory.

Make sure that your script does not introduce new globals which might conflict with other scripts. Your script should fail silently and run quickly in any scenario.

Make sure you introduce new default colors in themes/default.py for every new segment you create. Test your segment with this theme first.

You should add tests for your segment as best you are able. Unit and integration tests are both welcome. Run your tests by running the test.sh script. It uses docker to manage dependencies and the environment. Alternatively, you can run the nosetests command after installing the requirements in requirements-dev.txt.

Troubleshooting

See the FAQ. If you continue to have issues, please open an issue.

powerline-shell's People

Contributors

b-ryan avatar banga avatar caetanus avatar ceholden avatar comagnaw avatar disco-stu avatar disruptek avatar emansije avatar emmanueltouzery avatar ericlemanissier avatar ffried avatar guilhermechapiewski avatar handsomecheung avatar hryanjones avatar jamessimas avatar jceaser avatar kc9jud avatar marcioalmada avatar mart-e avatar mindjiver avatar mwetterw avatar paol avatar saswatpadhi avatar shhong avatar strycore avatar tigr avatar tomislater avatar unn avatar wattengard avatar while1eq1 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  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

powerline-shell's Issues

Add option to disable SVN segment

Unlike git or mercurial, svn is slow especially when you have a big working copy. Sometimes it took a few seconds to get the svn status and that's really annoying. Can you please add an option so we can choose to turn it off in some circumstances.

seems keybindings in screen not work

I used powerline-bash in urxvt, it's great! I love it. Thanks, milkbikis.
But when I use screen, seems the keybindings not work any more. I used the same keybindings in screen like byobu, e.g.: F2 to create, F3 to next, F4 to previous.

powerline-shell hangs when trying to access a particular directory

Hi,

I am noticing that powerline-shell hangs when I try to access a particular directory. It simply hangs and does not respond.

When I turn off powerline-shell, I have no issues trying to cd into that directory. So powerline-shell must have trouble parsing something in that directory? Any ideas what that could be?

Thanks,

Fish doesn't work

as per README.md config do not work:

powerline-shell.py: error: argument --shell: invalid choice: 'bare' (choose from 'bash', 'zsh')

error message concentrates with git on non-ASCII path name

If git local repository path name has non-ASCII character, many error message are printed on the screen. It doesn't seems to be critical...

Here's steps to reproduce the error.

$ mkdir 파워라인大好き
$ cd 파워라인大好き
$ git init
Initialized empty Git repository in /Users/Leo/파워라인大好き/.git/
$ vi newfile

"newfile" [New File]
Error detected while processing function PowerlinePyeval:
line    1:
2014-05-02 11:55:31,849:ERROR:vim:branch:Exception while computing segment: 'asc
ii' codec can't decode byte 0xed in position 11: ordinal not in range(128)
Press ENTER or type command to continue
Error detected while processing function PowerlinePyeval:
line    1:
Traceback (most recent call last):
Press ENTER or type command to continue
......

Search history in vi editing mode

Hi,

I'm using the vi editing mode of the shell, and the powerline-shell doesn't display right when I do a search in the history with the '/' character (normal mode).

color customization

Nice work.

I am not too found of a having a pink git branch indicator though.
Can you add the possibility of themes/easy customization of colors.

Thanks,

Btw: I find that the following colors works ok for me:

diff --git powerline-bash.py powerline-bash.py
index 78bc030..c0e3fd4 100755
--- powerline-bash.py
+++ powerline-bash.py
@@ -111,8 +111,8 @@ def get_git_status():
return has_pending_commits, has_untracked_files, origin_position

def add_git_segment(powerline, cwd):

  • green = 148

  • red = 161

  • green = 0

  • red = 136
    #cmd = "git branch 2> /dev/null | grep -e '_'"
    p1 = subprocess.Popen(['git', 'branch'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
    p2 = subprocess.Popen(['grep', '-e', '_'], stdin=p1.stdout, stdout=subprocess.PIPE)
    @@ -124,8 +124,8 @@ def add_git_segment(powerline, cwd):
    branch += origin_position
    if has_untracked_files:
    branch += ' +'

  • bg = green

  • fg = 0

  • bg = 2

  • fg = 15
    if has_pending_commits:
    bg = red
    fg = 15
    @@ -189,7 +189,7 @@ def add_root_indicator(powerline, error):
    fg = 15
    if int(error) != 0:
    fg = 15

  •    bg = 161
    
  •    bg = 52
    

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

    if name == 'main':

Arrow colors are off.

The colors on the arrows don't match those on the background of the text as shown in the picture.

Screen Shot 2013-01-07 at 10 59 07 PM

Is there a way to fix this? Running this on OS X.

The ellipsis character used in add_cwd_segment raises an exception

The ellipsis character in https://github.com/milkbikis/powerline-bash/blob/master/powerline-bash.py#L80 raised an exception on a long paths.

Traceback (most recent call last):
  File "/home/martin/powerline-bash.py", line 216, in <module>
    sys.stdout.write(p.draw())
  File "/home/martin/powerline-bash.py", line 41, in draw
    return (''.join((s[0].draw(s[1]) for s in zip(self.segments, self.segments[1:]+[None])))
  File "/home/martin/powerline-bash.py", line 41, in <genexpr>
    return (''.join((s[0].draw(s[1]) for s in zip(self.segments, self.segments[1:]+[None])))
  File "/home/martin/powerline-bash.py", line 65, in draw
    self.separator))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 1: ordinal not in range(128)

Marking the character as Unicode solved the problem for me, in add_cwd_segment

        names = names[:2] + [u'⋯ '] + names[2-maxdepth:]

UTF8-Problems with directory names

When I'm using special characters in directories such as

$ mkdir Tête

I get

Traceback (most recent call last):
  File "/Users/oschrenk/.bash_powerline.py", line 318, in <module>
    sys.stdout.write(p.draw())
  File "/Users/oschrenk/.bash_powerline.py", line 74, in draw
    return (''.join((c.draw(n) for c, n in zip(self.segments, shifted)))
  File "/Users/oschrenk/.bash_powerline.py", line 74, in <genexpr>
    return (''.join((c.draw(n) for c, n in zip(self.segments, shifted)))
  File "/Users/oschrenk/.bash_powerline.py", line 100, in draw
    self.separator))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 2: ordinal not in range(128)

My python foo is too weak

Python 2.7.2
OSX 10.8.2
powerline-bash 69993d

Add option for max directory size in cwd

Hello,

In Fish shell (by default at least), the current path is displayed with the first letter of the directory except the last.
So /usr/lib/python2.7/site-packages will be shown as /u/l/p/site-packages.

I find this useful and would like that in powerline-shell. I have created a patch adding the option --cwd-max-dir-size. If you set 1, you will get the following result:

screenshot from 2013-12-05 14 41 26

(sorry, never understood how to do proper pull request in github, here is the commit)
mart-e@c4a9f26

number of jobs does not work

Hi,
i tried to use to see the number of jobs which is running in background. But no value is shown.

e.g.

sleep 10
^z
bg

I guess the segment for jobs should be show the number 1 for 10 seconds. But there is no value.

Marko

Weird symbols when ./powerline-shell.py is run

Hi,

I followed the instructions of installing powerline-shell. And set the following.

TERM=xterm-256color

Then I performed the "Fontconfig" and "Patched Font" instructions listed at https://powerline.readthedocs.org/en/latest/installation/linux.html#font-installation. Restarted my terminal (iTerm2) and when I tried to run powerline-shell I got a series of "garbage" elements coming:

[\e[38;5;250m][\e[48;5;240m] \u [\e[48;5;238m][\e[38;5;240m][\e[38;5;250m][\e[48;5;238m] \h [\e[48;5;31m][\e[38;5;238m][\e[38;5;15m][\e[48;5;31m] ~ [\e[48;5;237m][\e[38;5;31m][\e[38;5;254m][\e[48;5;237m] powerline-shell [\e[48;5;148m][\e[38;5;237m][\e[38;5;0m][\e[48;5;148m] master [\e[48;5;236m][\e[38;5;148m][\e[38;5;15m][\e[48;5;236m] $ [\e[0m][\e[38;5;236m][\e[0m][user@hostname powerline-shell]$

Any idea what I am missing? Thanks,

when repeatedly press CTRL + C ...

^CTraceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site.py", line 62, in
import os
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 49, in
import posixpath as path
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 16, in
import genericpath
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/genericpath.py", line 5, in
"""
^C

Weird icons for arrows

I'm using iTerm2 and can't seem to get the arrows to display correctly.

I've already tried patching fonts and adjusting the color settings without success, any ideas?

image

Error message in git repo's .git directory

Suppose ~/git/myproject is a git repo. If you change directory to ~/git/myproject/.git and press enter, powerline-bash will try to run git status --ignore-submodules, which will generate an error message

fatal: This operation must be run in a work tree

Optimize jobs segment

The current code of jobs.py is invoking 2 times a subprocess to determine the number of background jobs in the current shell. On my (slow) system, this segment is one of the slowest there is.
The subprocesses could be avoided by using the information in the /proc/*/stat files instead. Something like the following:

myppid = os.getppid()
CountJobs = {}
ProcessPid = -1

for f in os.listdir('/proc'):
    pathname = os.path.join('/proc', f)
    fstat = os.stat(pathname)

    if fstat.st_uid != os.getuid():
        continue

    if S_ISDIR(fstat.st_mode):
        statfile = os.path.join(pathname, 'stat')
        if os.path.isfile(statfile):
            with open(statfile) as f:
                statline = f.readline()
                fields   = statline.split()
                if len(fields) >= 3:
                    process_pid  = fields[0]
                    process_ppid = fields[3]

                    if process_pid == str(myppid):
                       ProcessPid = process_ppid

                    if CountJobs.has_key(process_ppid):
                       CountJobs[process_ppid] += 1
                    else:
                       CountJobs[process_ppid]  = 1

num_jobs = CountJobs[str(ProcessPid)] - 1
if num_jobs > 0:
    powerline.append(' %d ' % num_jobs, Color.JOBS_FG, Color.JOBS_BG)

On my slow laptop this is significantly (5 to 10) times faster.

Seems to unset terminal title in gnome-terminal.

On ubuntu 12.04, added the script to my .bashrc

like so:

´´´
function _update_ps1()
{
PS1="$(~/.bin/powerline-bash.py $?)"
}
export PROMPT_COMMAND="_update_ps1"
´´´

But gnome-terminal seems not to like the output of the python script because it just sets the title to blank.

Check for untracked files in git

For the git segment, on line 20 you should change "line.find('nothing to commit')" by "re.match('nothing.* to commit', line)".
With this change, you can see that you have nothing to commit (it's green) but there are untracked files present (the +).

(from an email I received)

Doing git checkout to a branch which doesn't have the cwd causes exceptions

Scenario:
You are in branch 'master' and create a new branch 'foo'.
You add a dir in this branch, then cd to it. You commit, etc.
Staying in the dir, you 'git checkout master' to go back to your master branch.
BAM! Powerline throws ugly exceptions..

I'll take a look and attempt a fix, but if someone beats me to it... :-P

Minor addition to sample _update_ps1() function def

Not sure if / where it belongs at all, but I spent some time tracking down and coming up with this new addition to _update_ps1() which I'm fond of for situations where I ssh to remote servers and such and have to leave fancy shell behind:

function _update_ps1() {
export PS1="$(/projects/powerline-shell/powerline-shell.py $?)";
echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/
}"; echo -ne "\007";
}

Not saying I think it definitely belongs anywhere, just feel guilty not sharing enhancement since I otherwise enjoy the fruits of your labors very much.

SyntaxError: invalid syntax

pavs:powerline-shell pav$ ls
README.md           install.py          segments
config.py           powerline-shell.py.template themes
pavs:powerline-shell pav$ ./install.py
  File "./install.py", line 15
    print 'Could not open ' + srcfile
                      ^
SyntaxError: invalid syntax

Multiple line commands do not draw correctly

This is what happened when I use echo "hello world".

  • In the first time, the string is just in one line, and it is OK.
  • In the second time, the string is spanned over two line, but the drawing is not correct(also the output of the command is), the word "world" goes to the beginning of the same line.

powerline-shell-multiple-line-bug

Show number of stashes (if >0)

I have a bad habit of stashing and then forgetting about it. It would be useful if the git segment displayed the number of stashes (if any exist).

The number of stashes can be obtained with (eg) 'git stash list | wc -l'.

Stuck in command history

If I browse the latest used commands with the arrow keys everything works as it should. But if I am on any item of the history, let's say for example python hello.py and if I move the cursor of just one position either to the right or to the left (meaning on the y letter or a space further the end of the line) I get stuck and I can't scroll the history up or down anymore. I actually can't do anything but hit return key to execute the command I am stuck in or press ctrl + u to erase the current content of the command line I'm stuck in.

Error about unicode

unicode
(Arch linux + zsh + Terminator ),who can help me? what's wrong with 2b80 and 2b81?

zsh

any plans for a zsh port?

Separators are brighter than backgrounds

I’ve installed powerline-bash in zsh on my OS X 10.8.2 system, and am using it in Terminal.app. Here’s what I’m seeing:

Screenshot_16_01_13_12_23_AM

Notice that the separator characters are appearing brighter than the backgrounds they are supposed to match. Any idea what could be causing this?

Breaks With System Python 3 or Inside of a Python 3 Virtualenv

Since the code is not py2 and py3 compatible, it breaks if you enter a Python 3 virtualenv (such as on OS X). As in #100, it will also break if your system has python set to py3, such as on Arch linux.

The options seem to be:

  1. Provide instructions to make a python2 symlink on the users machine and update powerline-shell.py to #!/usr/bin/env python2
  2. Hard code the python path into powerline-shell.py when running ./install.py
  3. Update the code to work with py2 and py3. It seems #66 was an attempt at that. If you are interested in this approach, I'd be happy to send a pull request against the current state of master.

Update readme.md

There is an error in the installation instructions.
You need to edit config.py.dist, not config.py.

Minimize whitespace

It would be nice to be able to minimize the amount of whitespace that is displayed (such as between directory names). Also, is there any way to redefine the separator for specific segments in the config file? I would prefer to have the traditional / as a directory separator.

This is what I want to accomplish: http://imgur.com/NXoUmm2

How about a solarized-light theme?

Currently all available themes are for dark background terminals.
It would be great to have a nice solarized theme for light backgrounds.

Virtualenv with python3 fails

When activating virtualenv with python3.2 in it, thus making the prompt use a different python version it fails with following error:

Traceback (most recent call last):
  File "/My/path/here", line 204, in <module>
    sys.stdout.write(p.draw())
UnicodeEncodeError: 'ascii' codec can't encode character '\u2b80' in position 74: ordinal not in range(128)

Note: Changing first line to #!/usr/bin/env python2.7 fixed the problem for me.

powerline-sh

I suggest to change name while it's possible. This project really rocks and w/ more and more popularity, name change will be just more and more painful!

It shouldn't be called powerline-bash or powerline-zsh because it actually supports more that just Bourne shell. My suggestion is to re-call it to powerline-sh that would stand for "Powerline shell".

Patched fonts link in Readme no longer works

It looks like vim-powerline has changed repositories and the wiki link from powerline-shell's readme no longer works. It also appears that vim-powerline now uses different glifs, so the patched fonts from that project may not work for powerline-shell

Powerline makes tmux/screen window title error

Hi milkbikis, thanks for your powline-bash.

I use

  • powerline-bash
  • zsh
  • tmux / screen

And after I open screen/tmux, the window tiles is "[stream] 0 zsh 1 zsh 2 zsh 3 zsh" and "... 5:zsh- 6:zsh" in tmux.

2013-01-09-121320_1431x202_scrot

I want window titls back to be "[stream] 0 python 1 ssh 3 ....". Can you help me?

Thanks.

Suggestion: Add an setup.py to install this script as an entry

I have forked this repo ,and has done this.

I think it is better to have a setup,py script. What my idea is , to install powerline-bash.py as an command for user's system. And after this , there is no need to make a symbol link.Also, the setup process will be easier and more pythonic..

[sudo] pip install git+git://github.com/~../powerline-shell

and what should be like in this setup script:

scripts=['powerline-bash.py']

and what configuration append to the bashrc will be:

function _update_ps1() {
   export PS1="$(powerline-bash.py $?)"
}

export PROMPT_COMMAND="_update_ps1"

The last one , we will avoid the issue : "python2" or "python"in shebang.

Overlapping arrows in powerline

I have used several of the patched fonts and for some reason I get this overlapping arrow-thingy

powerline

Any ideas what's gone wrong here?

EDIT: I have also tried multiple different themes including the built in ones

a bug?

when i run source ~/.zshrc

there are more and more powerline_precmd in $precmd_functions

powerline_precmd powerline_precmd powerline_precmd powerline_precmd ....

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.