All Projects → brujoand → Sbp

brujoand / Sbp

Licence: mit
Simple Bash Prompt (SBP) is a bash prompt, which strives to be simple. But it isn't. But it looks kind of nice. I think.

Programming Languages

shell
77523 projects
bash
514 projects

Projects that are alternatives of or similar to Sbp

Powerline Extra Symbols
▶️ Extra glyphs for your powerline separators
Stars: ✭ 778 (+184.98%)
Mutual labels:  prompt, powerline
Powerline
A more PowerShell prompt
Stars: ✭ 444 (+62.64%)
Mutual labels:  prompt, powerline
Trueline
Fast and extensible bash powerline prompt with true color and fancy icon support
Stars: ✭ 271 (-0.73%)
Mutual labels:  prompt, powerline
fishline
A powerline prompt framework for the fish-shell built in fish-shell.
Stars: ✭ 66 (-75.82%)
Mutual labels:  prompt, powerline
Silver
A cross-shell customizable powerline-like prompt with icons
Stars: ✭ 238 (-12.82%)
Mutual labels:  prompt, powerline
Angel Ps1
Your fancy shell prompt fed by your guardian angel
Stars: ✭ 60 (-78.02%)
Mutual labels:  prompt, powerline
Liquidprompt
A full-featured & carefully designed adaptive prompt for Bash & Zsh
Stars: ✭ 4,134 (+1414.29%)
Mutual labels:  prompt, powerline
Powerline
Powerline is a statusline plugin for vim, and provides statuslines and prompts for several other applications, including zsh, bash, tmux, IPython, Awesome and Qtile.
Stars: ✭ 12,989 (+4657.88%)
Mutual labels:  prompt, powerline
cmder-powershell-powerline-prompt
Custom PowerShell prompt for Cmder on Windows
Stars: ✭ 94 (-65.57%)
Mutual labels:  prompt, powerline
powerless
Minimalistic/responsive ZSH prompt inspired by powerline.
Stars: ✭ 63 (-76.92%)
Mutual labels:  prompt, powerline
auto-ls
zsh plugin for auto-ls
Stars: ✭ 77 (-71.79%)
Mutual labels:  prompt
gitprompt
Display git status in the the terminal prompt
Stars: ✭ 22 (-91.94%)
Mutual labels:  prompt
mobile-message
基于移动端的弹窗组件,默认提供info、success、warning、error、alert、confirm、multiple、vertical、bottomSheet、prompt,可自定义弹窗。它可以包含任何Html内容可以自定义弹窗的样式,也可以加入自定以的弹窗动画。
Stars: ✭ 13 (-95.24%)
Mutual labels:  prompt
date-prompt
A CLI date picker prompt.
Stars: ✭ 16 (-94.14%)
Mutual labels:  prompt
oh-my-fish
The Fish Shell Framework
Stars: ✭ 8,403 (+2978.02%)
Mutual labels:  prompt
bashy
Extremely fast and simple git prompt for bash and zsh
Stars: ✭ 43 (-84.25%)
Mutual labels:  prompt
PromptCLI
Interactive command line interface library
Stars: ✭ 30 (-89.01%)
Mutual labels:  prompt
Hilbish
🌺 The flower shell. A comfy and nice little shell for Lua fans!
Stars: ✭ 191 (-30.04%)
Mutual labels:  prompt
Qprompt
Python library for quick CLI user prompts, input, and menus.
Stars: ✭ 46 (-83.15%)
Mutual labels:  prompt
Tmux Powerline
A hackable statusbar for tmux consisting of dynamic & beautiful looking segments, inspired by vim-powerlline, written purely in bash.
Stars: ✭ 2,802 (+926.37%)
Mutual labels:  powerline

SBP - Simple Bash Prompt

Build Status

Simple Bash Prompt (SBP) is a bash prompt, which was simple once. This started out as a pure ripoff from powerline-shell, which is great, but written in python. SBP is all bash, which makes it fast and fun.

I've tried making the code as readable and extensible as possible. If something seems wrong, lacking or bad in some way; feel free to rant, review and create a pull request.

Screenshot

For a live demo of this magic head over here

A note on the recent changes

I wanted to add support for truecolors instead of relying on "just" 256 colors. To do this I had to break the configuration, and when the flood gates had been opened, a lot of things started changing. Suddenly layout changes was pretty easy too. After a while speed became and issue, and I had to reduce the number of subshells. This led to return by reference which is now the standard way of returning results in the code base. So if you're upgrading from an older version it's probably a good idea to make a copy of your sbp config and start fresh.

Hard Requirements

  • Bash 4.3+

Soft Requirements

If you want the fancy pointy segment separators, you need the powerline fonts installed and enabled. Both. You can get them here which also has installation instructions Now the hard_to_remember part. Change the settings of your terminal emulator. Something like "Settings" and then "Fonts" will probably be the right place. If you don't like powerline then use the 'plain' or 'lines' theme or create your own. If you are using Kitty as a terminal then everything should work out of the box.

Installing

With brew:

brew install brujoand/sbp/sbp This will get you the latest release.

With git and the install script

When you clone this repo, there is an install script located at ´bin/install´. It will add two lines to $HOME/.bashrc:

  SBP_PATH=/the/path/to/sbp
  source ${SBP_PATH}/sbp.bash

You could also just add these two lines to some bash config file of your own choosing manually. Keep in mind that this approach will use the master branch by default, so expect less stability.

Usage

So you're ready to go. Now you do nothing. Just use it. But you could. If you want. Change stuff up a bit. Edit your config by running sbp edit config and run sbp reload if you changed something substantial. Most changes will be effective immediately. You can use the sbp command for a lot of things:

  Usage: sbp [command]

  Commands:
  reload            - Reload SBP and user settings
  status            - Show the current configuration
  help              - Show this help text
  list
    config          - List all current settings
    segments        - List all available segments
    hooks           - List all available hooks
    themes          - List all available color themes and layouts
  edit
    config          - Opens the sbp config in $EDITOR
    colors          - Opens the colors config in $EDITOR
  set
    color           - Set [color] for the current session
    layout          - Set [layout] for the current session
  toggle
    peekaboo        - Toggle execution of [segment] or [hook]
    debug           - Toggle debug mode
  sbp

Features

Segments

Segments can be configured, moved, and hidden depending on your mood, or environment. Read more about those and how to make your own in the Segments Folder.

Hooks

Hooks let's you execute scripts asynchronously to either alert you, or prepare data in some way. Whatever you want really. Read more about those and how to make your own in the Hooks Folder.

Colors and Layouts

Colors and layouts let you decide how the prompt is drawn. Read more about those and how to make your own in the Colors and Layouts. SBP supports both truecolors through RGB values and 256 colors by using ansi codes. Many will probably just want to rely on the configuration set in Xresources, by using the xresources color setting.

Beta - VI mode

The setting settings_prompt_ready_vi_mode=1 will use the prompt_ready icon with the configured colors and change it's color depending on the current VI mode if enabled. The cursor will also change from blinking to solid block if your terminal supports it. The VI mode support has been removed as it is not possible to predictably place the VI mode indicator on a multiline prompt. PR's are very welcome if you find a way to do this.

FAQ

Is this really just bash?

Yes, but actually no. At the time of writing the main implementation has just a few calls do date, while some segments touch grep and sed but these are being removed. Sometimes we need to talk to other CLI applications though like git.

My prompt doesn't show any colors, whats wrong?

You are using a terminal that doesn't support truecolors, the OSX Terminal.app maybe? You can write your own ansi theme, or use one of the two provided ones, default-256 or xresources.

I don't want to install any fancy fonts, can I still have nice things?

Why yes! Simply use the 'plain' layout. No fonts needed. Or use the Kitty terminal which will draw most of the missing characters for you.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].