{"id":13897686,"url":"https://github.com/softmoth/zsh-prompt-newt","last_synced_at":"2025-10-25T13:31:24.674Z","repository":{"id":147470074,"uuid":"139934951","full_name":"softmoth/zsh-prompt-newt","owner":"softmoth","description":"Fat \u0026 fast ZSH theme – beautiful inside and out, styled segments done right","archived":false,"fork":false,"pushed_at":"2021-03-31T19:05:56.000Z","size":79,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-31T07:22:03.229Z","etag":null,"topics":["powerline","prompt","theme","zsh","zsh-theme","zstyle"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/softmoth.png","metadata":{"files":{"readme":"README.adoc","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}},"created_at":"2018-07-06T04:57:07.000Z","updated_at":"2022-11-17T12:10:00.000Z","dependencies_parsed_at":"2023-07-24T19:17:44.370Z","dependency_job_id":null,"html_url":"https://github.com/softmoth/zsh-prompt-newt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softmoth%2Fzsh-prompt-newt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softmoth%2Fzsh-prompt-newt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softmoth%2Fzsh-prompt-newt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/softmoth%2Fzsh-prompt-newt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/softmoth","download_url":"https://codeload.github.com/softmoth/zsh-prompt-newt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238147611,"owners_count":19424295,"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":["powerline","prompt","theme","zsh","zsh-theme","zstyle"],"created_at":"2024-08-06T18:03:48.461Z","updated_at":"2025-10-25T13:31:24.333Z","avatar_url":"https://github.com/softmoth.png","language":"Shell","funding_links":[],"categories":["Themes","Shell"],"sub_categories":["ZSH on Windows","Zinit (née zplugin)"],"readme":"= Newt ZSH Theme\n:toc: preamble\n:demo-image: https://gist.githubusercontent.com/softmoth/2910577d28970c80b58f8b55c34d58c1/raw/newt-demo.png\n:preview-image: https://gist.githubusercontent.com/softmoth/2910577d28970c80b58f8b55c34d58c1/raw/newt-preview.png\n:separators-demo: https://gist.githubusercontent.com/softmoth/2910577d28970c80b58f8b55c34d58c1/raw/separators-demo.png\n:issues: https://github.com/softmoth/zsh-prompt-newt/issues\n\n____\n“She turned me into a newt!” +\n“A newt?” +\n“… I got better.” +\n____\n\nimage::{demo-image}[Newt Theme Demo]\n\n\n== Installation\n\nThis is a sample `.zshrc`. Your plugin manager may have features which\nautomate integrating prompt themes.\n\n    # Optional Newt theme settings\n    DEFAULT_USER=jdoe\n    : ${PROMPT_NEWT_LOOK=mono}\n    zstyle :prompt-theme:newt:\\* left time context dir\n\n    # This enables promptinit to find prompt_newt_setup\n    # See PROMPT THEMES in zshcontrib(1)\n    fpath+=~/path/to/repos/zsh-prompt-newt\n\n    autoload -Uz promptinit; promptinit\n    prompt newt\n\nPlease {issues}[open an issue] if you have installation tips that may help\nothers.\n\n\n== Looks\n\nNewt comes with these pre-defined looks:\n_default, denver, forest, meadow, mono_.\n\nUse a look with `prompt newt meadow`.\n\nimage::{preview-image}[Newt Theme Preview]\n\nThese looks are simply shorthand for the `zstyle` configuration, as\ndescribed in \u003c\u003cStyling\u003e\u003e. So the look can be used to get most\nthings as you like, and then individual elements can be refined further.\n\n=== Custom looks\n\nCreate an `adhoc` look with `prompt newt adhoc blue white magenta`,\ngiving a name and a list of colors. Each color can be\n\n- `black`, `red`, `yellow`, `green`, `blue`, `magenta`, `cyan`, `white`, or\n- a color number supported by your terminal, or\n- a truecolor specification as described in \u003c\u003cTruecolor support\u003e\u003e, or\n- `''` or `_`, meaning the terminal's default background / foreground, or\n- `none`, meaning do not set the color, use whatever is already active\n\n=== Colors indexes\n\nThe list of colors is\n\n. Primary background\n. Primary foreground\n. Secondary background\n. Secondary foreground\n. Alert background\n. Alert foreground\n. Red\n. Green\n. Yellow\n. Blue\n. Magenta\n. Cyan\n. Black\n. White\n\nSince the _forest_ look specifies 4 colors, the following will\nchange the Alert (colors 5 \u0026 6) to pale yellow on a hot pink\nbackground:\n\n    prompt newt forest 161 227\n\n=== Re-running `prompt newt`\n\nWhen `prompt newt` is run with no arguments, or if the first argument\nis `--`, it uses the value of `$PROMPT_NEWT_LOOK` in the environment.\nAnd it always sets `PROMPT_NEWT_LOOK` to the current settings.\n\nIt also takes a snapshot of any zstyle settings that have been set.\n\nThis means that, for example, `sudo -Es` will inherit the current look.\nIt is possible to add more colors to the current look by following the\n`--` with colors. For example\n\n    prompt newt example blue white\n    prompt newt -- green black\n    prompt newt -- red yellow\n\nThat is equivalent to\n`prompt newt example blue white green black red yellow`.\n\n\n== Styling\n\nThis theme uses the ZSH configuration system, called _zstyle_, to specify\nthe look and behavior of the prompt. It is documented in the `zshmodules(1)`\nmanual page. Briefly, a _style_ is a configuration setting, which is looked\nup in a _context_. In the English phrase \"Give me the background color for\nthe `time` segment in the `default` state, using the `forest` look,\" the\n_style_ being requested is \"background color\", and the _context_ is the\n`forest`, `time` segment, `default` state.\n\nWhen you specify a style, often the context you provide will be a pattern\nwith wildcards in it. For example, you can specify the background color\nfor the time segment's default state in _any_ look with:\n\n    zstyle :prompt-theme:newt:*:time:default bg yellow\n\nSo, in general, segments can be configured with the context\n`:prompt-theme:newt:LOOK:SEGMENT:STATE`.\n\n_Look_ can be any word you like, except for a color name (`red`, `_`,\netc.). You can call `prompt newt LOOK` to use a particular look.\n\nIf just `prompt newt` is run, the look is inherited from the\n`$PROMPT_NEWT_LOOK` environment variable, or is `default`.\n\n_Segment_ is the name of the segment, e.g., `dir` or `time`.\n\n_State_ is segment-specific, and is `default` for most segments\nmost of the time.\n\nRun `prompt_newt_defaults` to show the built-in settings.\nYour custom overrides can be shown with `zstyle -L ':prompt-theme:newt:*'`.\nTo remove an override, run\n`zstyle -d ':prompt-theme:newt:*:the:pattern' [look]`.\n\n=== Examples\n\n    zstyle ':prompt-theme:newt:*:vcs:*'          bg blue\n    zstyle ':prompt-theme:newt:*:vcs:*'          fg yellow\n    zstyle ':prompt-theme:newt:*:vcs:clobbered'  bg yellow\n    zstyle ':prompt-theme:newt:*:vcs:clobbered'  fg red\n    # Revert the first two changes\n    zstyle -d ':prompt-theme:newt:*:vcs:*'\n\n    zstyle ':prompt-theme:newt:forest:dir:*'     bg green\n    zstyle ':prompt-theme:newt:forest:dir:*'     fg blue\n\n    # Only use the left prompt\n    zstyle ':prompt-theme:newt:*' left time context status jobs vcs dir\n    zstyle ':prompt-theme:newt:*' right none\n\n\n== Segments\n\nThe segments used for left and right prompts can be set with:\n\n    zstyle ':prompt-theme:newt:*' left  history time context dir\n    zstyle ':prompt-theme:newt:*' right vi_mode status exec_time jobs vcs\n\nThis change requires the prompt to be set up again. Run `prompt newt`\nfor the change to take effect.\n\nThe values shown above are default. It is also possible to modify the\ndefault settings, adding or removing individual segments, with:\n\n----\n# left gets: time context dir vcs\nzstyle ':prompt-theme:newt:*' left  -history +vcs\n\n# right gets: prompt_time vi_mode status vcs exec_time\nzstyle ':prompt-theme:newt:*' right '+prompt_time -jobs * +exec_time'\n----\n\n=== `context`: User and host name\n\nUser name is hidden unless it is different from `$DEFAULT_USER`.\n\nHost name is hidden unless `$SSH_CLIENT` is set.\n\n=== `dir`: Current directory\n\nIt uses the `'%4~'` zsh format by default, which shows nested directories\nto four levels. Set the format with\n\n    zstyle :prompt-theme:newt:\\*:dir default '%/'\n\n=== `exec_time`: Execution time\n\nThe states are `default` and `long`.\n\nThe threshold from `default` to `long` can be set with\n\n    zstyle ':prompt-theme:newt:*:exec_time' threshold 30\n\nThe default is 5 seconds. It can be fractional, for example `0.75`.\n\nThe precision can be set with\n\n    zstyle ':prompt-theme:newt:*:exec_time' precision 3\n\nThe default is 1 if the execution time is below 10 seconds,\nand 0 otherwise.\n\nBy default, the `long` state shows times in a human-friendly format\nlike `間1h22m33s`. The `default` state is empty (so times below the\nthreshold are not shown). The format can be set with:\n\n    # %s: seconds\n    zstyle ':prompt-theme:newt:*:exec_time' long    '🕑%s'\n    # %t: human-friendly\n    zstyle ':prompt-theme:newt:*:exec_time' default '🕑%t'\n\n=== `history`: History number\n\n=== `jobs`: Background jobs\n\nStates are `default` and `zero`. The `zero` state defaults to empty, so\nwhen there are no background jobs, nothing is shown. The `default` state\nshows an icon and, if there is more than one job, the number of jobs.\nRun `prompt_newt_defaults` to see the full setting.\n\n=== `none`: Placeholder to do nothing\n\nThis might be used to disable the right side prompt, for example:\n\n    zstyle ':prompt-theme:newt:*' right none\n\n=== `prompt_time`: Prompt time\n\nDisplays how long it takes for the prompt itself to be drawn. This\nsegment is off by default. The precision can be set with\n\n    zstyle ':prompt-theme:newt:*:prompt_time' precision 3\n\n=== `status`: Exit status\n\nThe `status` segment states are `ok`, `error` and `suspended`. By default\nonly `error` status is shown. To always show a status, set:\n\n    zstyle ':prompt-theme:newt:*:status' ok        $'\\u2713' # ✓\n    zstyle ':prompt-theme:newt:*:status' suspended $'\\u25c6' # ◆\n\n=== `time`: Time\n\nShows the current time. The format can be set with\n\n    zstyle ':prompt-theme:newt:*:time' default '%*'  # HH:MM:SS\n\n=== `vcs`: Version control\n\nStates are `clobbered`, `root`, `action`, `dirty` and `default`. Most of\nthe display is controlled by _`vcs_info`_:\n\n    # See zshcontrib(1) for more options related to version control\n    zstyle ':vcs_info:*' enable git cvs svn bzr hg\n    zstyle -L ':vcs_info:*'\n\n=== `vi_mode`: Vi mode\n:zsh-vim-mode: https://github.com/softmoth/zsh-vim-mode[vim-mode]\n\nStates are `viins`, `vicmd`, `replace`, `isearch`, `visual` and `vline`.\n\nNOTE: Only `viins` and `vicmd` states are available by default.\nThe others require the {zsh-vim-mode} plugin.\n\nText and colors can be changed. For example:\n\n    zstyle ':prompt-theme:newt:*:vi_mode' vicmd NORMAL\n    zstyle ':prompt-theme:newt:*:vi_mode:vicmd' bg 202\n    zstyle ':prompt-theme:newt:*:vi_mode:vicmd' fg 235\n\n\n== Separators\n:nerd-fonts: https://nerdfonts.com/\n\nThe theme uses Powerline arrows to separate segments by default. It also has\nbuilt-in support for separator characters from the {nerd-fonts}[Nerd Fonts]\nPowerline Extended set. Request the round half-circle separators with:\n\n    zstyle ':prompt-theme:newt:*:*:*' separator nerd-round\n\nThe defined separators are: `powerline`, `fade`, `nerd-round`, `nerd-backward`,\n`nerd-forward`, `nerd-flame`, `nerd-pixel`, `nerd-waveform`.\n\nimage::{separators-demo}[Separators demonstration]\n\nSeveral of the separators may be drawn as two characters wide. If you are\nusing the \"Mono\" version of a Nerd font, this will create a severe gap after\nthe separator. Turn off the compensatory spacing with:\n\n    zstyle ':prompt-theme:newt:*' wide-separators 0\n\nA segment's separator can be reversed, so its arrow points in rather than\nout:\n\n    # Reverse all segments\n    zstyle ':prompt-theme:newt:*:*:*' direction reverse\n    # Or just one\n    zstyle ':prompt-theme:newt:*:history:*' direction reverse\n\n=== Defining a custom separator\n\nTo add your own separator, run `prompt_newt_add_separator` after loading\nthis theme:\n\n    prompt_newt_add_separator nerd-trapezoid \\\n                $'\\ue0d2' $'\\ue0d2' $'\\ue0d4' $'\\ue0d4'\n\nThe arguments are _name_, _left-to-right thick_, _left-to-right thin_,\n_right-to-left thick_, and _right-to-left thin_. Additionally, the options\n`--wide`, `--wide-ltr`, and `--wide-rtl` may be given. Each takes a\nspecification like `1:1` or `0:1`. The left-hand number is 1 if the padding\nspace from the preceding segment should be removed. The right-hand number is\n1 if an extra padding space should be added after the separator. Most wide\nseparators will want both set to 1.\n\n\n== Truecolor support\n:truecolor: https://gist.github.com/XVilka/8346728\n\nIf your terminal {truecolor}[supports Truecolor escape sequences],\nthen you can use them anywhere a color can be specified. That is,\neither in a `zstyle` to set a color, or directly in a `%K{...}` or\n`%F{...}` escape in the prompt text. The color must be given as\n`rrr;ggg;bbb`. For example:\n\n    zstyle ':vcs_info:*' stagedstr '%F{250;128;114}+'\n    zstyle ':prompt-theme:newt:*:vi_mode:search' bg '199;21;133'\n\n\n== Miscellaneous settings\n\n    # Remove spacing around segments\n    zstyle ':prompt-theme:newt:*' compact true\n\n    # Tell newt what colors the terminal uses; background is used to\n    # draw the arrow head of the segment separator when the default\n    # background (bg '') is used.\n    #\n    # Also used for the default looks's primary segment colors.\n    zstyle ':prompt-theme:newt' terminal-background 236\n    zstyle ':prompt-theme:newt' terminal-foreground 254\n\n    # Keep only the latest the right-side prompt\n    setopt TRANSIENT_RPROMPT\n\n\n== Bugs\n\nPlease {issues}[open an issue] if you run into any bugs or missing features.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftmoth%2Fzsh-prompt-newt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsoftmoth%2Fzsh-prompt-newt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsoftmoth%2Fzsh-prompt-newt/lists"}