Skip to main content

Package description here.

Project description

nr.powerline

Simple powerline implementation, only tested in Bash. It is recommended that you use a font from NerdFonts in order to have proper support for special characters (like the right triangle).

Requirements

  • Bash
  • Pipx
  • Python 3.5+

Installation

$ pipx install nr.powerline
$ source <(nr-powerline --src bash)

Roadmap

  • Pass previous status code into nr-powerline command.
  • Breadcrumb working directory
  • Truecolor and xterm-256 color support

Configuration

Simply pass the --file option when sourcing the bash code. It must point to a Python script that makes use of the nr.powerline API. Example:

from nr.powerline import PowerLine
powerline = PowerLine()
git = powerline.get_plugin('git')

powerline.set_pen('white', 'blue')
powerline.add_part(' {c.GIT_FOLDER} ' if git.project else ' {c.DIRECTORY} ')
powerline.add_part('{session.cwd} !{c.RIGHT_TRIANGLE}')
if git.project:
    powerline.set_pen(None, 'yellow')
    powerline.add_part(' {c.BRANCH} {git.branch} !{c.RIGHT_TRIANGLE}')
    powerline.add_part(' ')
    powerline.clear_pen()

Copyright © 2020 Niklas Rosenstein

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nr.powerline-0.0.7.tar.gz (8.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page