{"id":15678090,"url":"https://github.com/patthemav/minimal2","last_synced_at":"2025-10-25T18:02:44.837Z","repository":{"id":101959642,"uuid":"117299224","full_name":"PatTheMav/minimal2","owner":"PatTheMav","description":"Adaption of subnixr's minimal zsh theme for zimfw","archived":false,"fork":false,"pushed_at":"2019-02-18T19:49:32.000Z","size":85,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-31T05:23:59.044Z","etag":null,"topics":["zim","zimfw","zsh","zsh-theme"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PatTheMav.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}},"created_at":"2018-01-12T23:54:40.000Z","updated_at":"2024-01-27T12:05:01.000Z","dependencies_parsed_at":"2023-07-16T18:01:00.591Z","dependency_job_id":null,"html_url":"https://github.com/PatTheMav/minimal2","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatTheMav%2Fminimal2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatTheMav%2Fminimal2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatTheMav%2Fminimal2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PatTheMav%2Fminimal2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PatTheMav","download_url":"https://codeload.github.com/PatTheMav/minimal2/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252799442,"owners_count":21805992,"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":["zim","zimfw","zsh","zsh-theme"],"created_at":"2024-10-03T16:16:26.801Z","updated_at":"2025-10-25T18:02:39.782Z","avatar_url":"https://github.com/PatTheMav.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# MINIMAL2\nA minimal and extensible zsh theme. Forked from [subnixr's original](https://github.com/subnixr/minimal) and adapted for [Zimfw](https://github.com/zimfw/zimfw).\n\n# Screencast\n[![asciicast](https://asciinema.org/a/RZthpXkg9b7KdKRGjySsC83wx.png)](https://asciinema.org/a/RZthpXkg9b7KdKRGjySsC83wx)\n\n# Installation\n\n1. Clone (or add as submodule) minimalzim to your `zimfw` modules directory:\n\n```\ncd ${ZIM_HOME}/modules; git clone https://github.com/PatTheMav/minimal2.git ./minimal2\n```\n\n2. Add `minimal2` to your `zmodules` inside your `.zshrc` (just before the `prompt` module).\n3. Set the prompt theme by setting `zprompt_theme` to `minimal2`\n\n# Changes from original `minimal.zsh`\n\n* Additional support for `git-info` module to display git branch\n* Additional colour for clean branches ahead or behind the remote branch\n* Uses `prompt_opts` and seperate setup routine for `zimfw` compatibility\n\n# Customization and extension\n## Architecture\nMinimal is mostly a collection of *components* (shell functions) on top of a thin layer to ease customization.\n\nThere are 3 areas where a component can be rendered:\n- left prompt\n- right prompt\n- infoline (shown when there is no command and user presses `Enter`)\n\nA component should work in any of the three areas (left, right, info)\n\n## Override default settings\nDifferent components can use these (global) settings:\n\n- `MNML_OK_COLOR`: Color for successful things (default: `green`)\n- `MNML_ERR_COLOR`: Color for failures (default: `red`)\n- `MNML_DIV_COLOR`: Color for diverted git status (default: `magenta`)\n- `MNML_USER_CHAR`: Character used for unprivileged users (default: `λ`)\n- `MNML_INSERT_CHAR`: Character used for vi insert mode (default: `›`)\n- `MNML_NORMAL_CHAR`: Character used for vi normal mode (default: `·`)\n\nThree global arrays handle the definition and rendering position of the components:\n\n```\n# Components on the left prompt\nMNML_PROMPT=(mnml_ssh mnml_pyenv mnml_status mnml_keymap)\n\n# Components on the right prompt\nMNML_RPROMPT=('mnml_cwd 2 0' mnml_git)\n\n# Components shown on info line\nMNML_INFOLN=(mnml_err mnml_jobs mnml_uhp mnml_files)\n```\n\nAn additional array is used to configure magic enter's behavior:\n\n```\nMNML_MAGICENTER=(mnml_me_dirs mnml_me_ls mnml_me_git)\n```\n\nThese values can be changed interactively or in any of the init files.\n\n`PROMPT` and `RPROMPT` should be left untouched, as minimal already takes care of them.\n\n## Available components\n### Status\n\n\u003e `λ`\n\n**Syntax**: `mnml_status`\n\nAn indicator displaying the following information:\n- user privilege: `#` is printed when root, `$MNML_USER_CHAR` otherwise.\n- last command success: indicator's color is set to `$MNML_OK_COLOR` when the last command was successful, `$MNML_ERR_COLOR` otherwise.\n- background jobs: indicator is underlined if at least one job is in background.\n\n### Keymap\n\n\u003e `›`\n\n**Syntax**: `mnml_keymap`\n\nAn indicator displaying the current keymap. `$MNML_INSERT_CHAR` is printed when in insert or default mode, `$MNML_NORMAL_CHAR` when in normal (vi) mode.\n\nIt reacts to keymap changes. It should work even if zsh bind mode is not set to `vi`\n\n### Current Working Directrory\n\n\u003e `~`\n\n**Syntax**: `mnml_cwd N LEN`\n\nDisplays the last `N` segments of the current working directory, each one trucated if `LEN` is exceded.\n\nIf `N` is not specified, it will take a default value of `2`. If is specified but `N \u003c= 0`, it will be set to `1`.\n\nIf `LEN` is not specified or `LEN \u003c= 0` no truncation will be performed on the segments. If `0 \u003c LEN \u003c 4` it will be set to `4`.\n\nWhen a segment length is greater than `LEN`'s value, the first `LEN / 2 - 1` characters are printed, followed by `..`, followed by the last `LEN / 2 - 1` characters.\nFor example, with `LEN = 8` and `0123456789` as segment, `012..789` is displayed.\n\n### Git branch status\n\n\u003e `master`\n\n**Syntax**: `mnml_git`\n\nDisplays the current git's branch, when inside a git repo. Color is set to `$MNML_OK_COLOR` if the branch is clean, `$MNML_ERR_COLOR` if the branch is dirty.\n\n#### Using git-info\n\n**Syntax**: `mnml_git_zimfw`\n\nSame functionality as `mnml_git`, but uses zimfw's built-in `git-info` to display and style git information. Uses the additional `$MNML_DIV_COLOR` if the branch is ahead or behind the remote branch.\n\n### User, Hostname \u0026 PWD\n\n\u003e `user@host:~`\n\n**Syntax**: `mnml_uhp`\n\nDisplays the current username, hostname and working directory.\n\n### SSH hostname\n\n\u003e `host`\n\n**Syntax**: `mnml_ssh`\n\nDisplays the hostname only if current session is through a SSH connection.\n\n### Python virtual environment\n\n\u003e `venv`\n\n**Syntax**: `mnml_pyenv`\n\nDisplays the current activated python virtualenv.\n\n### Last command error value\n\n\u003e `1`\n\n**Syntax**: `mnml_err`\n\nDisplays the last command exit status only if it is not `0`.\n\n### Background jobs counter\n\n\u003e `2\u0026`\n\n**Syntax**: `mnml_jobs`\n\nDisplays the number of background jobs only if there is at least one.\n\n### Files\n\n\u003e `[5 (2)]`\n\n**Syntax**: `mnml_files`\n\nDisplays the number of visible files, followed by the number of hidden files if any.\n\n## Magic enter functions\n### Directory stack\n\n**Syntax**: `mnml_me_dirs`\n\nPrints `dirs` output if there is more than `1` directory in the stack.\n\n### Colored `ls`\n\n**Syntax**: `mnml_me_ls`\n\nPrints colored `ls` output.\n\n### Condensed git status\n\n**Syntax**: `mnml_me_git`\n\nPrints a colored and concise `git status`, only when inside a git repo.\n\n\n## Custom components\n\nAdding functionality is as easy as writing a shell function and adding it to one of the arrays:\n\n```\nfunction awesome_component {\n  echo -n \"AWESOME\"\n}\n\nfunction awesome_magicenter {\n  figlet -f slant \"COOL\"\n}\n\nsource minimalplus.zsh\n\nMNML_PROMPT=(awesome_component $MNML_PROMPT)\nMNML_MAGICENTER+=awesome_magicenter\n```\n\nDue to minimal's architecture, if you need the value of the last command exit status (`$?`), `$MNML_LAST_ERR` must be used. `$?` can  still be used to check for errors inside the component.\n\n# Configuration examples:\n## no UTF-8\n\n```\nMNML_USER_CHAR='$'\nMNML_NOMRAL_CHAR='-'\nMNML_INSERT_CHAR='\u003e'\nsource minimalplus.zsh\n```\n\nResult (right omitted): `$ \u003e`\n\n## classic bash's prompt\n\n```\nMNML_PROMPT=(mnml_uhp mnml_status mnml_keymap)\nMNML_RPROMPT=()\nsource minimalplus.zsh\n```\n\nResult: `user@host:~ λ ›          `\n\n## good old days\n\n```\nMNML_PROMPT=(mnml_status)\nMNML_RPROMPT=()\nMNML_INFOLN=()\nMNML_MAGICENTER=()\nsource minimalplus.zsh\n```\n\nResult: `λ                        `\n\n# CREDITS\n\nOriginal minimal theme by subnixr on Github: https://github.com/subnixr/minimal","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatthemav%2Fminimal2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatthemav%2Fminimal2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatthemav%2Fminimal2/lists"}