{"id":16857625,"url":"https://github.com/miekg/lean","last_synced_at":"2025-04-09T17:26:09.178Z","repository":{"id":2537922,"uuid":"46785367","full_name":"miekg/lean","owner":"miekg","description":"Pretty, minimal, one-line, fast ZSH prompt","archived":false,"fork":false,"pushed_at":"2024-07-14T12:49:24.000Z","size":160,"stargazers_count":153,"open_issues_count":0,"forks_count":38,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-13T14:14:39.251Z","etag":null,"topics":["minimal","prompt","zsh"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/miekg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-24T10:47:36.000Z","updated_at":"2024-10-03T12:05:32.000Z","dependencies_parsed_at":"2024-10-13T14:13:22.310Z","dependency_job_id":null,"html_url":"https://github.com/miekg/lean","commit_stats":{"total_commits":64,"total_committers":21,"mean_commits":"3.0476190476190474","dds":0.390625,"last_synced_commit":"a9cb0229dbfbaa8eb92ecc04672ab54176adc19d"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miekg%2Flean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miekg%2Flean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miekg%2Flean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/miekg%2Flean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/miekg","download_url":"https://codeload.github.com/miekg/lean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248076134,"owners_count":21043717,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minimal","prompt","zsh"],"created_at":"2024-10-13T14:08:48.020Z","updated_at":"2025-04-09T17:26:09.154Z","avatar_url":"https://github.com/miekg.png","language":"Shell","readme":"# About\n\nAfter having used [prompt pure](https://github.com/sindresorhus/pure) for about a year, I felt that\na two-line prompt was not for me. Also not utilizing the right side of the terminal seemed a missed\nopportunity. Still there is much to like: the elapsed time of a process, the coloring of the prompt\nif the exit code of the process isn't 0, git integration. So I took \"pure\", mixed in my ideas of\nwhat a prompt should look like and came up with \"lean\" - a 1 line prompt that stays out of your\nface.\n\nWhen lean starts, only 2 characters show on the screen '%' on the left and '~' on the right.\n\n![lean example gif](https://github.com/miekg/lean/blob/master/lean.gif \"Example Session Using Lean\")\n\nSo lean is an evolution of pure, with the following changes:\n\n*   Defaults to a very sparse setup, only showing information you need at the moment.\n*   Comes with the perfect prompt character. Author went through the entire ASCII range to find it\n    (and found it pretty quickly!)\n*   Never displays your username (assuming you know who you are).\n*   When tmux is active it shows a yellow 't' (I disabled the tmux bar, so this is some visual\n    indication that tmux is active). If you don't want this indicator, you can always set\n    `PROMPT_LEAN_TMUX=\"\"` prior to loading this plugin (or prior to sourcing `zgen`, etc.).\n*   Show remote host if logged in through SSH.\n*   All in one line, most stuff in the right prompt, leaving the left prompt nice and clean\n*   Shows background jobs (in the left prompt)\n*   Show (dirty) git repos (can be disabled by setting `PROMPT_LEAN_VCS` to `0`). The branch name is\n    truncated to 20 characters.\n*   Shortens path if needed (longer then 70% of your screen). Two methods are provided: 'truncate'\n    and 'shrink' (fish-style working directory). Set `PROMPT_LEAN_ABBR_METHOD` to choose the one you\n    like the most (default is 'truncate'). Set `PROMPT_LEAN_PWD` to `0` to disable showing the path\n    altogether.\n*   Uses `PROMPT_LEAN_LEFT` and `PROMPT_LEAN_RIGHT` to allow customization of the left and/or right\n    side of the prompt.\n*   For a configurable insert-mode indicator, set the `PROMPT_LEAN_VIMODE` and\n    `PROMPT_LEAN_VIMODE_FORMAT` variables. `PROMPT_LEAN_VIMODE_FORMAT` defaults to\n    `\"%F{red}[NORMAL]%f\"`\n*   Configurable colors to match your preferred scheme, by setting `PROMPT_LEAN_COLOR1` and\n    `PROMPT_LEAN_COLOR2`\n*   Use `PROMPT_LEAN_NOTITLE` to customize when the title should not be displayed. Useful for\n    terminals that can not show title properly.\n*   Use `PROMPT_LEAN_VCS` and `PROMPT_LEAN_PWD` to disable showing VCS info or the current working\n    directory.\n\n# Installation\n\n## zgen\n\nIf you use [zgen](https://github.com/tarjoilija/zgen) you can add the following to your `~/.zshrc`:\n\n~~~\nzgen load miekg/lean\n~~~\n\nand force reload with `zgen reset \u0026\u0026 source ~/.zshrc`.\n\nNote you must have the option PROMPT_SUBST set, see zshoptions(1).\n\n## prezto\n\nIf you use [prezto](https://github.com/sorin-ionescu/prezto) you should do the following:\n\n~~~\ncd $ZPREZTODIR \u0026\u0026 git clone --recurse-submodules https://github.com/belak/prezto-contrib contrib\n~~~\n\nThen in `~/.zpreztorc` add `contrib-prompt` to module load list and select `lean` as a theme:\n\n~~~\nzstyle ':prezto:load' pmodule \\\n  ... \\\n  'contrib-prompt' \\\n  'prompt' \\\n  ...\n\nzstyle ':prezto:module:prompt' theme 'lean'\n~~~\n\n`PROMPT_LEAN_LEFT` and `PROMPT_LEAN_RIGHT` should be customized in `~/.zshrc`. The rest variables\nshould be customized in `~/.zshenv`.\n\n# Development\n\nIf you make any changes please run `make test` to ensure the (little) test suite is succesfull.\n","funding_links":[],"categories":["Themes"],"sub_categories":["ZSH on Windows"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiekg%2Flean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmiekg%2Flean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmiekg%2Flean/lists"}