Home

Awesome

日本語のREADMEも用意してあります。

Prowpt - Simple, lightweight, and customizable Powerline-like prompt theme for Bash and Zsh

GitHub top language GitHub repo size GitHub license GitHub tag (latest by date) GitHub last commit (branch)

Screenshot

Screenshot
Note: Syantax highlighting is not included.

Table Of Contents

Features

Requirements

Appearance

Prompt sample
Python virtualenv environment name will be displayed when you are in the environment.

Git Status Icon

If there is/are

HEAD and upstream defference

Installation

Bash

Manual

  1. Clone the repository
    git clone https://github.com/alpaca-honke/prowpt.git ~/.prowpt/
    
  2. Add the following line below the PS1 settings in ~/.bashrc
    source ~/.prowpt/prowpt.bash
    
  3. Restart your terminal

Sheldon

  1. Run the following command
    sheldon add prowpt --github alpaca-honke/prowpt --use '*.bash' --branch main
    
  2. Restart your terminal

Zsh

Manual

  1. Clone the repository
    git clone https://github.com/alpaca-honke/prowpt.git ~/.prowpt/
    
  2. Comment out the following line in ~/.zshrc
    autoload -Uz promptinit
    promptinit
    prompt adam1
    
  3. Add the following line in ~/.zshrc
    source ~/.prowpt/prowpt.plugin.zsh
    
  4. Restart your terminal

Oh-My Zsh

  1. Clone the repository
    git clone https://github.com/alpaca-honke/prowpt.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/prowpt/
    
  2. Add prowpt to the list of plugins for Oh-My-Zsh in the ~/.zshrc
    plugins=(
        #other plugins
        prowpt
    )
    
  3. Restart your terminal

Zinit

  1. Add the following line to ~/.zshrc
    zinit light alpaca-honke/prowpt
    
  2. Restart your terminal

Antigen

  1. Run or write in the .zshrc the following command
    antigen bundle alpaca-honke/prowpt --branch=main
    
  2. Restart your terminal

Zplug

  1. Add the following line to ~/.zshrc
    zplug "alpaca-honke/prowpt", as:plugin, at:main
    
  2. Restart your terminal

Sheldon

  1. Run the following command
    sheldon add prowpt --github alpaca-honke/prowpt --branch main
    
  2. Restart your terminal

Customization

You can easily to custom it using ~/.config/prowpt/config.sh.

  1. Create a directory
    mkdir ~/.config/prowpt/
    
  2. Edit config file (You can use other text editors.)
    vim ~/.config/prowpt/config.sh
    

Customizable Value

You can easily to custom prompt by setting some variables like this:

PROWPT_SEGMENT_SEPARATOR=$'\ue0b8'
PROWPT_CURRENT_TIME_BG="5"
GIT_PS1_SHOWUPSTREAM=""

Text Values

VariablesDescriptionDefault
PROWPT_CURRENT_TIMEFirst segment valueBash: \t, Zsh: %*
PROWPT_USERSecond segment valueBash: \u, Zsh: %n
PROWPT_HOSTThird segment valueBash: \h, Zsh: %m
PROWPT_PROMPTLast (second line) segment valueBash: $, Zsh: %#
PROWPT_GIT_HEAD_BRANCHAn icon that is shown when current HEAD is a branch in Git repos$'\ue0a0'
PROWPT_GIT_HEAD_DETACHEDAn icon that is shown when current HEAD is a detached HEAD in Git repos$\ue729'

Delimiter

Set the delimiter for segment (the block of the prompt).
You can set the delimiter using unicode like $'\ue0b0'.
There is a list of commonly used delimiters.
Delimiter sample
Note: You can use e0b1, e0b5, e0b9, e0bb, e0c1, e0cd for the PWD delimiter, and any other character in the list for segment delimiters.
If you want to use vertical segment delimiters, set PROWPT_SEGMENT_DELIMITER="". The same as for PWD delimiters, you can use | (pipe).

VariablesDescriptionDefault
PROWPT_SEGMENT_DELIMITERSegment delimiter$'\ue060'
PROWPT_PWD_DELIMITERCurrent directory delimiter instead of /$'\ue0b1'

Whether To Highlight Home Dir (~)

If you want to highlight your home directory, set
PROWPT_PWD_HOME_HIGHLIGHT="yes" .
If not,
set PROWPT_PWD_HOME_HIGHLIGHT="no" or any other value.

Prompt Color

You can set prompt colors using ANSI 256 colors.
256 Colors Cheat Sheet

VariablesDescriptionDefault
PROWPT_CURRENT_TIME_FGFirst segment foreground color253
PROWPT_CURRENT_TIME_BGFirst segment background color31
PROWPT_USER_FGSecond segment foreground color253
PROWPT_USER_BGSecond segment background color242
PROWPT_HOST_FGThird segment foreground color253
PROWPT_HOST_BGThird segment background color239
PROWPT_PWD_FGPWD segment foreground color253
PROWPT_PWD_BGPWD segment background color237
PROWPT_PWD_DELIMITER_FGPWD delimiter foreground color250
PROWPT_PWD_HOME_FGHome directory segment foreground color (when you set PROWPT_PWD_HOME_HIGHLIGHT="yes")253
PROWPT_PWD_HOME_BGHome directory segment background color (when you set PROWPT_PWD_HOME_HIGHLIGHT="no")31
PROWPT_GIT_FGGit status segment foreground color236
PROWPT_GIT_BGGit status segment background color148
PROWPT_GIT_DIRTY_FGGit status segment foreground color when working tree is dirty253
PROWPT_GIT_DIRTY_BGGit status segment background color when working tree is dirty166
PROWPT_GIT_STAGED_FGGit status segment foreground color when there are some staged files236
PROWPT_GIT_STAGED_BGGit status segment background color when there are some staged files178
PROWPT_GIT_DETACHED_FGGit status segment background color when current HEAD is a detached HEAD253
PROWPT_GIT_DETACHED_BGGit status segment foreground color when current HEAD is a detached HEAD103
PROWPT_PROMPT_FGLast (second line) segment foreground color253
PROWPT_PROMPT_BGLast (second line) segment background color237
PROWPT_PROMPT_ERROR_FGLast (second line) segment foreground color (when exit status is not 0)253
PROWPT_PROMPT_ERROR_BGLast (second line) segment background color (when exit status is not 0)5

Git Segment Style

This segment uses https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh.
The customizable variables follow this script.

VariablesDescriptionDefault
GIT_PS1_SHOWDIRTYSTATEIf you set it to a noempty value, unstaged (*) and staged (+) changes will be shown next to the branch name.yes
GIT_PS1_SHOWSTASHSTATEBy setting it to a nonempty value, if something is stashed, then a '$' will be shown next to the branch name.yes
GIT_PS1_SHOWUNTRACKEDFILESIf you set it to a nonempty value, then a '%' will be shown next to the branch name if there're untracked files.yes
GIT_PS1_SHOWUPSTREAMIf you set GIT_PS1_SHOWUPSTREAM="auto", then the difference betweeen HEAD and its upstream will be shown next to the branch name. A "<" indicates you are behind, ">" indicates you are ahead, "<>" indicates you have diverged and "=" indicates that there is no difference.auto

See https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh or prowpt/git-prompt.sh for details. Other customizable variables are also written there.

Other Customization

If you want to custom but there are no customizable variables for it, overwrite prowpt-core.sh or any other files.

Contributing

I know this program is not complete.We welcome your contribution to this program. If you are willing to contribute, please make some pull requests.

In the same way, open an issue if you find some problems or need more features.

Contact Me

If there is/are some bugs or other problems,

Addresses

These are commonly used addresses. See alpaca-honke.github.io for other addresses.

License

Prowpt is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.0 of the License.

Prowpt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

See COPYING or GNU General Public Licence version 2.0, and Licenses - GNU Project - Free Software Foundation for more details.

Copyright (C) 2023 あるかっぱ/アルパカ本家 Alkappa/alpaca-honke