https://github.com/zimfw/magicmace
A prompt theme inspired by xero's and eriner's themes.
https://github.com/zimfw/magicmace
prompt theme zim zimfw zsh zsh-plugin zsh-plugins zsh-prompt zsh-theme
Last synced: 4 months ago
JSON representation
A prompt theme inspired by xero's and eriner's themes.
- Host: GitHub
- URL: https://github.com/zimfw/magicmace
- Owner: zimfw
- License: mit
- Created: 2018-12-27T21:24:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-12-19T01:41:02.000Z (11 months ago)
- Last Synced: 2025-04-13T12:13:09.327Z (7 months ago)
- Topics: prompt, theme, zim, zimfw, zsh, zsh-plugin, zsh-plugins, zsh-prompt, zsh-theme
- Language: Shell
- Homepage:
- Size: 19.5 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - magicmace - Inspired by xero's ZSH prompt and [eriner's prompt](https://github.com/zimfw/eriner). Includes status codes for active python `venv`, exit status of last command, shortened working directory, `git` status decorations. (Themes / ZSH on Windows)
- fucking-awesome-zsh-plugins - magicmace - Inspired by xero's ZSH prompt and <b><code> 22â</code></b> <b><code> 16đ´</code></b> [eriner's prompt](https://github.com/zimfw/eriner)). Includes status codes for active python `venv`, exit status of last command, shortened working directory, `git` status decorations. (Themes / ZSH on Windows)
- awesome-zsh-plugins - magicmace - Inspired by [xero's zsh prompt](http://code.xero.nu/dotfiles) and [eriner's prompt](https://github.com/zimfw/eriner). Includes status codes for active python `venv`, exit status of last command, shortened working directory, `git` status decorations. (Themes / Zinit (nÊe zplugin))
README
magicmace
=========
Ideas and code taken from [xero's zsh prompt] and [eriner's prompt].

What does it show?
------------------
* Status segment:
* Status code in error color when there was an error.
* `b` when there are background jobs.
* `r` when in a [ranger] spawned shell.
* `v` when a python [venv] is activated.
* The current working directory.
* Git segment, only when you're in a git repo:
* Current branch name, or commit short hash when in ['detached HEAD' state].
* `*` when in a dirty working tree.
* `â` and/or `â` when there are commits ahead and/or behind of remote,
respectively.
Settings
--------
This theme can be customized with the following environment variables. If the
variable is not defined, the respective default value is used.
| Variable | Description | Default value |
| ------------ | ------------------------ | ------------- |
| COLOR_ROOT | Root-user mace color | red |
| COLOR_USER | Non-root-user mace color | cyan |
| COLOR_NORMAL | Normal text color | white |
| COLOR_ERROR | Error text color | red |
Advanced settings
-----------------
You can customize how the current working directory is shown with the
[prompt-pwd module settings].
The git indicators can be customized by changing the following git-info module
context formats:
| Context name | Description | Default format |
| ------------ | ----------------- | -------------- |
| branch | Branch name | `%b` |
| commit | Commit short hash | `%c...` |
| ahead | Ahead of remote | `â` |
| behind | Behind remote | `â` |
| dirty | Dirty state | `*` |
Use the following command to override a git-info context format:
zstyle ':zim:git-info:' format ''
For detailed information about these and other git-info settings, check the
[git-info documentation].
These advanced settings must be overridden after the theme is initialized.
Requirements
------------
Requires Zim's [prompt-pwd] module to show the current working directory, and
[git-info] to show git information.
[xero's zsh prompt]: https://github.com/xero/dotfiles
[eriner's prompt]: https://github.com/zimfw/eriner
[ranger]: https://github.com/ranger/ranger
[venv]: https://docs.python.org/3/library/venv.html
['detached HEAD' state]: https://git-scm.com/docs/git-checkout#_detached_head
[prompt-pwd module settings]: https://github.com/zimfw/prompt-pwd/blob/master/README.md#settings
[git-info documentation]: https://github.com/zimfw/git-info/blob/master/README.md#settings
[prompt-pwd]: https://github.com/zimfw/prompt-pwd
[git-info]: https://github.com/zimfw/git-info