{"id":13626271,"url":"https://github.com/geometry-zsh/geometry","last_synced_at":"2025-05-14T15:09:20.441Z","repository":{"id":19874494,"uuid":"56933990","full_name":"geometry-zsh/geometry","owner":"geometry-zsh","description":"geometry is a minimal, composable zsh prompt","archived":false,"fork":false,"pushed_at":"2025-01-13T16:25:54.000Z","size":4388,"stargazers_count":963,"open_issues_count":7,"forks_count":97,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-06T13:01:30.693Z","etag":null,"topics":["geometry","prompt","shell","theme","zsh"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geometry-zsh.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","contributing":"contributing.md","funding":null,"license":"license","code_of_conduct":"code_of_conduct.md","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":"2016-04-23T18:16:36.000Z","updated_at":"2025-04-05T20:45:22.000Z","dependencies_parsed_at":"2024-06-19T02:52:17.568Z","dependency_job_id":"ad4410c6-6f0d-4209-a0df-3474cf95eee0","html_url":"https://github.com/geometry-zsh/geometry","commit_stats":{"total_commits":332,"total_committers":46,"mean_commits":7.217391304347826,"dds":0.5030120481927711,"last_synced_commit":"6825dede0fa496ac724aabaf7916c6f1cb6a5292"},"previous_names":["frmendes/geometry"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geometry-zsh%2Fgeometry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geometry-zsh%2Fgeometry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geometry-zsh%2Fgeometry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geometry-zsh%2Fgeometry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geometry-zsh","download_url":"https://codeload.github.com/geometry-zsh/geometry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741145,"owners_count":21154249,"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":["geometry","prompt","shell","theme","zsh"],"created_at":"2024-08-01T21:02:14.373Z","updated_at":"2025-04-13T15:49:08.626Z","avatar_url":"https://github.com/geometry-zsh.png","language":"Shell","readme":"# geometry\n\n![geometry logo by @MarioRicalde](images/branding/readme-logo.png)\n\n\u003e a minimalistic, fully customizable zsh prompt theme\n\ngeometry starts small, with reasonable defaults, and allows you to customize it at your own will.\nIt can be as simple or complex as you like.\n\nIf you have a question, suggestion, or request please [open an issue][] and be sure to check out [our contribution guide][]\n\n## What it does\n\nAll geometry does is run simple functions to customize the left and right prompts.\n\nWe bundle a few useful functions to start with, that can:\n\n- give you a custom colored prompt symbol\n- change the prompt symbol color according to the last command exit status\n- make the prompt symbol color change with your hostname\n- display current git branch, state and time since latest commit\n- tell you whether you need to pull, push or if you're mid-rebase\n- display the number of conflicting files and the total number of conflicts\n- display if there is a stash\n- display the running time of long-running commands\n- set the terminal title to current command and directory\n- make you the coolest hacker in the whole Starbucks\n\nThe right side prompt prints asynchronously, so you know it's going to be fast™.\n\nGeometry also has a secondary prompt that shows up when pressing enter with an empty command, which you can configure with `GEOMETRY_INFO`.\n\n## Installing\n\ntool          | add to `.zshrc`\n--------------|--------------------------------------\n[zr][]        | `zr geometry-zsh/geometry`\n[zplug][]     | `zplug \"geometry-zsh/geometry\"`\n[antigen][]   | `antigen theme geometry-zsh/geometry`\n[Homebrew][]  | `brew install geometry`\n[zi][]        | `zi lucid for atload\"!geometry::prompt\" geometry-zsh/geometry`\n**manually**  | `source geometry/geometry.zsh` (after `git clone https://github.com/geometry-zsh/geometry`)\n\n## Functions\n\n![showing prompt customization with new function](./images/screenshots/functions.png)\n\nGeometry displays output in several places. The output displayed in each location is determined by the plugins configured for that location.\nThese are the supported locations, along with the environment variable used to configure each one.\n\nVariable Name        | Text display location                                             \n---------------------|-------------------------------------------------------\nGEOMETRY_PROMPT      | Text shown to the left of the cursor\nGEOMETRY_RPROMPT     | Text shown at the right edge of the terminal\nGEOMETRY_INFO        | Text shown after pressing enter with no input\nGEOMETRY_TITLE       | Text shown in the terminal title\nGEOMETRY_CMDTITLE    | Text shown in the terminal title when a command is run\n\nTo customize the prompt, add any function to the list of functions for the desired display location:\n\n```sh\nGEOMETRY_PROMPT=(geometry_status geometry_path) # redefine left prompt\nGEOMETRY_RPROMPT+=(pwd)                         # append current working directory to right prompt\nGEOMETRY_TITLE=(geometry_node)\n```\n\nMost of these functions only show up if it makes sense to (for example, `geometry_git` only shows up if in a git repository).\n\nPlease check out and share third-party functions on our [functions wiki page][]\n\nFor more details on how to create a function, check out [our contribution guide][]\n\nIf you prefer a two-line prompt, try `GEOMETRY_PROMPT+=(geometry_newline)`\n\n## Configuration\n\nYou can configure everything in geometry by defining a variable.\n\nThe default configuration tries to balance the theme to be both lightweight and contain useful features.\n\nHere we highlight some of the more commonly customized variables, but to see all of them, look in the function definitions inside the [functions directory](/functions).\n\n### general\n\n```shell\nGEOMETRY_SEPARATOR=\" \"    # use ' ' to separate function output\n```\n\n### geometry_status\n\n```shell\nGEOMETRY_STATUS_SYMBOL=\"▲\"             # default prompt symbol\nGEOMETRY_STATUS_SYMBOL_ERROR=\"△\"       # displayed when exit value is != 0\nGEOMETRY_STATUS_COLOR_ERROR=\"magenta\"  # prompt symbol color when exit value is != 0\nGEOMETRY_STATUS_COLOR=\"default\"        # prompt symbol color\nGEOMETRY_STATUS_COLOR_ROOT=\"red\"       # root prompt symbol color\n```\n\n### geometry_exitcode\nThis renders the exit code of the previous function if it is not success.\n\n```shell\nGEOMETRY_EXITCODE_COLOR=\"red\" # exit code color\n```\n\n### geometry_git\n\nThe git function is one of the most developed plugins in geometry.\n**We recommend installing `rg` or `ag` for the best performance with `geometry_git`**.\nIf you want to customize what is shown, instead of using `geometry_git`, feel free to use the helper functions `geometry_git_{symbol, branch, conflicts, time, stashes \u0026 status}`. You may also want to use `geometry::git_wrapper` to have the nice `::` joining.\n\n```shell\nGEOMETRY_GIT_SYMBOL_REBASE=\"\\uE0A0\" # set the default rebase symbol to the powerline symbol \nGEOMETRY_GIT_SYMBOL_STASHES=x       # change the git stash indicator to `x`\nGEOMETRY_GIT_COLOR_STASHES=blue     # change the git stash color to blue\nGEOMETRY_GIT_GREP=ack               # define which grep-like tool to use (By default it looks for rg, ag and finally grep)\nGEOMETRY_GIT_NO_COMMITS_MESSAGE=\"\"  # hide the 'no commits' message in new repositories\nGEOMETRY_GIT_TIME_DETAILED=true     # show full time (e.g. `12h 30m 53s`) instead of the coarsest interval (e.g. `12h`)\n```\n\n![picture of git features](./images/screenshots/git.png)\n\n### geometry_jj\nYou can customize the template using [jj template language](https://jj-vcs.github.io/jj/latest/templates/)\n\n```shell\nGEOMETRY_JJ_TEMPLATE='\"%F{5}\" ++ change_id.shortest() ++ \"%F{4}\" ++ commit_id.shortest() ++ \"%f% \"'\n```\n\n## Hostname based colors\nGeometry provides a generic function (`geometry::hostcolor`) for setting any color based on hostname. The color is calculated as the sum of each character converted to an integer. For example the hostname 'abc' generates a value of 294.\n\nBy default the colors 1-9 and 17-230 are used as colors depending on what the environment supports. The calculated value is then modded by the size of the color list to choose a value. This value will be consistent given the same hostname.\n\nThese colors can be overridden by setting variables.\n\n```shell\nGEOMETRY_HOST_COLORS=({1..7})  # Only use the colors 1-7\nGEOMETRY_HOST_COLOR=4          # Override the color for a specific host.\n```\n![colorize](/images/screenshots/colorize.png)\n\n## Thanks\n\ngeometry is maintained by [frm](https://github.com/frm), [desyncr](https://github.com/desyncr) and [jedahan](https://github.com/jedahan).\n\nThank you [MarioRicalde](https://github.com/MarioRicalde) for the lovely logos and branding.\n\nA big thank you to the dozens of [additional contributors](https://github.com/geometry-zsh/geometry/graphs/contributors).\n\n[functions wiki page]: https://github.com/geometry-zsh/geometry/wiki/functions\n[open an issue]: https://github.com/geometry-zsh/geometry/issues/new\n[zr]: https://github.com/jedahan/zr\n[zplug]: https://github.com/zplug/zplug\n[zi]: https://wiki.zshell.dev/docs\n[antigen]: https://github.com/zsh-users/antigen\n[homebrew]: https://brew.sh\n[our contribution guide]: contributing.md\n","funding_links":[],"categories":["Themes","Shell","Customization","Packages","\u003ca name=\"prompt\"\u003e\u003c/a\u003ePrompts"],"sub_categories":["ZSH on Windows","Zinit (née zplugin)","Directory Navigation","Colorschemes"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeometry-zsh%2Fgeometry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeometry-zsh%2Fgeometry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeometry-zsh%2Fgeometry/lists"}