All Projects → miekg → Lean

miekg / Lean

Pretty, minimal, one-line, fast ZSH prompt

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Lean

Shelby
Shelby is a fast ⚡️ , lightweight ☁️ , minimal✨, shell prompt written in Go.
Stars: ✭ 148 (+8.82%)
Mutual labels:  zsh, prompt, minimal
slimline
Minimal, customizable, fast and elegant ZSH prompt
Stars: ✭ 48 (-64.71%)
Mutual labels:  zsh, minimal, prompt
Pure
Pretty, minimal and fast ZSH prompt
Stars: ✭ 10,891 (+7908.09%)
Mutual labels:  zsh, prompt, minimal
Typewritten
A minimal, lightweight, informative zsh prompt theme
Stars: ✭ 442 (+225%)
Mutual labels:  zsh, prompt, minimal
Common
A simple, clean and minimal prompt.
Stars: ✭ 213 (+56.62%)
Mutual labels:  zsh, prompt, minimal
bashy
Extremely fast and simple git prompt for bash and zsh
Stars: ✭ 43 (-68.38%)
Mutual labels:  zsh, prompt
apollo-zsh-theme
Heavily customizable, compatible, and fast ZSH theme framework.
Stars: ✭ 64 (-52.94%)
Mutual labels:  zsh, prompt
git-prompt.zsh
A fast, customizable, pure-shell, asynchronous Git prompt for Zsh
Stars: ✭ 139 (+2.21%)
Mutual labels:  zsh, prompt
Liquidprompt
A full-featured & carefully designed adaptive prompt for Bash & Zsh
Stars: ✭ 4,134 (+2939.71%)
Mutual labels:  zsh, prompt
auto-ls
zsh plugin for auto-ls
Stars: ✭ 77 (-43.38%)
Mutual labels:  zsh, prompt
Zsh Kubectl Prompt
Display information about the kubectl current context and namespace in zsh prompt.
Stars: ✭ 342 (+151.47%)
Mutual labels:  zsh, prompt
Gbt
Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go.
Stars: ✭ 457 (+236.03%)
Mutual labels:  zsh, prompt
enquirer
Stylish, intuitive and user-friendly prompts, for Node.js. Used by eslint, webpack, yarn, pm2, pnpm, RedwoodJS, FactorJS, salesforce, Cypress, Google Lighthouse, Generate, tencent cloudbase, lint-staged, gluegun, hygen, hardhat, AWS Amplify, GitHub Actions Toolkit, @airbnb/nimbus, and many others! Please follow Enquirer's author: https://github.…
Stars: ✭ 6,523 (+4696.32%)
Mutual labels:  zsh, prompt
zsh-prompt-generator
Zsh Prompt Generator
Stars: ✭ 39 (-71.32%)
Mutual labels:  zsh, prompt
gitprompt
Display git status in the the terminal prompt
Stars: ✭ 22 (-83.82%)
Mutual labels:  zsh, prompt
Pretty Git Prompt
`git status` inside your shell prompt
Stars: ✭ 43 (-68.38%)
Mutual labels:  zsh, prompt
Oh My Posh
A prompt theme engine for any shell.
Stars: ✭ 841 (+518.38%)
Mutual labels:  zsh, prompt
Angel Ps1
Your fancy shell prompt fed by your guardian angel
Stars: ✭ 60 (-55.88%)
Mutual labels:  zsh, prompt
Spaceship Prompt
🚀⭐ A Zsh prompt for Astronauts
Stars: ✭ 15,748 (+11479.41%)
Mutual labels:  zsh, prompt
Silver
A cross-shell customizable powerline-like prompt with icons
Stars: ✭ 238 (+75%)
Mutual labels:  zsh, prompt

About

After having used prompt pure for about a year, I felt that a two-line prompt was not for me. Also not utilizing the right side of the terminal seemed a missed opportunity. Still there is much to like: the elapsed time of a process, the coloring of the prompt if the exit code of the process isn't 0, git integration. So I took "pure", mixed in my ideas of what a prompt should look like and came up with "lean" - a 1 line prompt that stays out of your face.

lean example gif

So lean is an evolution of pure, with the following changes:

  • Defaults to a very sparse setup, only showing information you need at the moment.
  • Comes with the perfect prompt character. Author went through the entire ASCII range to find it (and found it pretty quickly!)
  • Never displays your username (assuming you know who you are).
  • When tmux is active it shows a yellow 't' (I disabled the tmux bar, so this is some visual indication that tmux is active). If you don't want this indicator, you can always set PROMPT_LEAN_TMUX="" prior to loading this plugin (or prior to sourcing zgen, etc.).
  • Show remote host if logged in through SSH.
  • All in one line, most stuff in the right prompt, leaving the left prompt nice and clean
  • Shows background jobs (in the left prompt)
  • Show (dirty) git repos (can be disabled by setting PROMPT_LEAN_VCS to 0)
  • Shortens path if needed (longer then 70% of your screen). Two methods are provided: 'truncate' and 'shrink' (fish-style working directory). Set PROMPT_LEAN_ABBR_METHOD to choose the one you like the most (default is 'truncate'). Set PROMPT_LEAN_PWD to 0 to disable showing the path altogether.
  • Uses PROMPT_LEAN_LEFT and PROMPT_LEAN_RIGHT to allow customization of the left and/or right side of the prompt.
  • For a configurable insertmode indicator, set the PROMPT_LEAN_VIMODE and PROMPT_LEAN_VIMODE_FORMAT variables. PROMPT_LEAN_VIMODE_FORMAT defaults to "%F{red}[NORMAL]%f"
  • Configurable colors to match your preferred scheme, by setting PROMPT_LEAN_COLOR1 and PROMPT_LEAN_COLOR2
  • Use PROMPT_LEAN_NOTITLE to customize when the title should not be display. Useful for terminals can not show title properly.
  • Use PROMPT_LEAN_VCS and PROMPT_LEAN_PWD to disable showing VCS info or the current working directory.

When lean starts, only 2 characters show on the screen '%' on the left and '~' on the right. All other info is omitted (like the user and system you are on), and shown only when needed.

Installation

zgen

If you use zgen you can add the following to your ~/.zshrc:

zgen load miekg/lean

and force reload with zgen reset && source ~/.zshrc.

Note you must have the option PROMPT_SUBST set, see zshoptions(1).

prezto

If you use prezto you should do the following:

cd $ZPREZTODIR && git clone --recurse-submodules https://github.com/belak/prezto-contrib contrib

Then in ~/.zpreztorc add contrib-prompt to module load list and select lean as a theme:

zstyle ':prezto:load' pmodule \
  ... \
  'contrib-prompt' \
  'prompt' \
  ...

zstyle ':prezto:module:prompt' theme 'lean'

PROMPT_LEAN_LEFT and PROMPT_LEAN_RIGHT should be customized in ~/.zshrc. The rest variables should be customized in ~/.zshenv.

Development

If you make any changes please run make test to ensure the (little) test suite is succesfull.

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].