Giter Site home page Giter Site logo

powerline-setup's Introduction

% Get powerline working with bash, vim and git integration % 21/08/2018

Based on
https://fedoramagazine.org/add-power-terminal-powerline/ (initial setup)
https://leifmadsen.wordpress.com/2015/09/09/configuring-powerline-to-show-working-git-branch/ (for git integration)

Intended for/tested on Fedora (28)

Installation

for powerline

dnf install powerline powerline-fonts

for vim

dnf install vim-powerline

for git integration (pip and python is obviously needed)

pip install powerline-gitstatus

configuration

for the bash prompt, add this snippet to your .bashrc

if [ -f `which powerline-daemon` ]; then
  powerline-daemon -q
  POWERLINE_BASH_CONTINUATION=1
  POWERLINE_BASH_SELECT=1
  . /usr/share/powerline/bash/powerline.sh
fi

for powerline in vim, add this snippet to your .vimrc

"" For powerline
python3 from powerline.vim import setup as powerline_setup
python3 powerline_setup()
python3 del powerline_setup
set laststatus=2 " Always display the statusline in all windows
set showtabline=2 " Always display the tabline, even if there is only one tab
set noshowmode " Hide the default mode text (e.g. -- INSERT -- below the statusline)
set t_Co=256

for git integration (show current branch in the bash prompt)

first create a powerline config directory

mkdir -p ~/.config/powerline

next copy your systemwide powerline config file over to your local

cp /etc/xdg/powerline/config.json ~/.config/powerline/config.json

modify the local file (~/.config/powerline/config.json) - change "theme": "default" to "theme": "default_leftonly" under the "shell" part. As follows:

}
"shell": {
"colorscheme": "default",
~~- "theme": "default",~~
+ "theme": "default_leftonly",
"local_themes": {
"continuation": "continuation",
"select": "select"

reload powerline

powerline-daemon --replace

powerline-setup's People

Watchers

James Cloos avatar Rasmus T. Bjerg 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.