A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/rdnetto/powerline-hs below:

rdnetto/powerline-hs: A lightning fast reimplementation of the Powerline prompt generator in Haskell.

Powerline-hs is a Powerline clone written in Haskell. It is significantly faster than the original implementation, and makes the shell noticeably more responsive.

Powerline-hs takes just 79.1 ms to render both prompts, in comparison to Powerline which took 1.25 seconds. (The execution time for a Python Hello World program is included for context.)

(Click on the graph for an interactive version.)

You can find the source for these benchmarks here, and the Powerline configuration they were run against here. To run the benchmarks, use:

stack bench --benchmark-arguments '--output=bench.html -L 10'

Powerline-hs currently only supports shell prompt generation (Bash, ZSH). It does not support the following segments:

Support for other segments and usages may be added on request, time permitting. Pull requests are always welcome.

You will need to have Powerline installed, since Powerline-hs uses its config files and shell scripts.

You can download a pre-compiled binary from the Releases page - just extract the tarball and you're good to go.

Alternatively, you can compile from source using Stack with:

Powerline-hs is intended to be a drop-in replacement for Powerline. This means that most of Powerline's documentation still applies, and that it should produce the same output without any additional configuration. If it does not, please file a bug.

To try out Powerline-hs in your current shell, just run:

export POWERLINE_COMMAND=$HOME/.local/bin/powerline-hs

(~/.local/bin is the path stack install copies it into - you may need to change it if you placed the executable somewhere else.)

To make it the default, add the following to your shell's RC file (e.g. .zshrc):

POWERLINE_COMMAND=$HOME/.local/bin/powerline-hs
POWERLINE_CONFIG_COMMAND=/bin/true
source /usr/share/zsh/site-contrib/powerline.zsh

The path of the shell script will depend on where you have Powerline installed and which distro you are using.

Powerline only provides a basic git information segment. There is an implementation here that adds a more advance git status support. Powerline-hs follows powerline-gistatus convention and only provides partial support.

Features supported:

{
  "function": "powerline_gitstatus.gitstatus_ahead",
  "priority": 40
}
{
  "function": "powerline_gitstatus.gitstatus_behind",
  "priority": 40
}
{
  "function": "powerline_gitstatus.gitstatus_staged",
  "priority": 40
}
{
  "function": "powerline_gitstatus.gitstatus_unmerged",
  "priority": 40
}
{
  "function": "powerline_gitstatus.gitstatus_changed",
  "priority": 40
}
{
  "function": "powerline_gitstatus.gitstatus_untracked",
  "priority": 40
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4