Giter Site home page Giter Site logo

powerline's Introduction

powerline

Powerline configs for gnome-terminal. Tested and configured on Ubuntu-16.04 under gnome-terminal. Please note, this instruction (fonts installation part) will not work under any terminal emulator. It's confirmed to work under gnome-terminal, but it aslo should work under konsole.

For further info please refer: https://powerline.readthedocs.org/en/latest/

Screenshots

  • bash shell example (running local shell with python virtualenv activated): bash shell look1
  • bash shell example (running remote shell via SSH): bash shell look2
  • vim statusline example (normal mode): vim look1
  • vim statusline example (replace mode): vim look2

Requirements

  • git (sudo apt-get install git)

Installation

Installation consists of two parts:

  • Installing fonts for terminal emulator (gnome-terminal or konsole) - this should be done on a PC you're going to run terminal emulator on.
  • Installing and configuing powerline shell prompt on needed hosts for needed shell users.

Installing fonts

Ubuntu 16.04:

sudo apt-get install fonts-powerline

You may need to restart your terminal emulator in order to apply changes.

Installing and configuring powerline shell prompt

On a host you want to enable powerline shell prompt:

  • install packages:
sudo apt-get install powerline python3-powerline
  • run the following commands under needed shell user, this user should have bash shell:
# configure powerline
sed -i '1i term screen-256color' ~/.screenrc
git clone https://github.com/adidenko/powerline ~/.config/powerline

# enable in vim
echo "set laststatus=2" >> ~/.vimrc
echo -e "python3 from powerline.vim import setup as powerline_setup" >> ~/.vimrc
echo -e "python3 powerline_setup()\npython3 del powerline_setup" >> ~/.vimrc

# enable in shell
echo ". /usr/share/powerline/bindings/bash/powerline.sh" >> ~/.bashrc

# configure TERM variable to work properly under gnome-terminal with and without screen
echo 'if [ "$TERM" != "screen-256color" ] ; then' >> ~/.bashrc
echo -e "\texport TERM=xterm-256color\nfi" >> ~/.bashrc

That's it, now you should have powerline shell prompt and vim status line.

powerline's People

Contributors

adidenko avatar

Watchers

 avatar  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.