Skip to main content

Generate customised shell prompts (for ZSH)

Project description

Generate rich shell prompts. Only supports Zsh at the moment.

Usage

Install it:

pip install --user makeprompt

Put this in your ~/.zshrc:

autoload -Uz promptinit
promptinit
prompt off
setopt PROMPT_SUBST

PROMPT='$( ~/.local/bin/makeprompt )'

Features

  • Display user/hostname/path using truecolor (24-bit) colors

  • 8-bit color fallbacks, for terminals that don’t support truecolor

  • git repository status information (branch, dirty)

  • Python enabled virtualenv information

  • Background (stopped) jobs count

Customize

The MAKEPROMPT_COLORS environment variable can be used to change colors of different parts of the prompt.

Format is similar to LS_COLORS, for example:

export MAKEPROMPT_COLORS='user=38;2;56;142;60:host=38;2;198;255;0'

A utility script is provided to conveniently generate TrueColor paletters from HTML hex colors.

For example:

python -m makeprompt.utils.make_truecolor_palette user='#808' host='#f0f' path='#ff0'

you can also use this in your shell configuration:

eval $( python -m makeprompt.utils.make_truecolor_palette ... )
export MAKEPROMPT_COLORS

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

makeprompt-0.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

makeprompt-0.2-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file makeprompt-0.2.tar.gz.

File metadata

  • Download URL: makeprompt-0.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.8.0

File hashes

Hashes for makeprompt-0.2.tar.gz
Algorithm Hash digest
SHA256 bb3d679b8a9a20d356e0f646d3595cec81b5310050d57c64ce144aba6b7c6694
MD5 14f5dec72b6032cd0cb38cdea33ea3b9
BLAKE2b-256 29897b47029364f4059b51db9ed85d6d67ff013357a3739851ff04b1c32a48b7

See more details on using hashes here.

File details

Details for the file makeprompt-0.2-py3-none-any.whl.

File metadata

  • Download URL: makeprompt-0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.8.0

File hashes

Hashes for makeprompt-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4abc27b00da19cde9f06e619a9a3389210b322efc31598c06687c890f2c21d89
MD5 e83793961f8baea22f7fd104ef6303ad
BLAKE2b-256 f64c1176885613f3c6a2f43448b6ddfac2a388cbaa2816cd1b06aeb0aadf249d

See more details on using hashes here.

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