Droolmaw [](https://github.com/isuke/git-consistent) [](https://raw.githubusercontent.com/isuke/droolmaw/main/LICENSE)

November 5, 2024 · View on GitHub

Droolmaw is zsh theme.

You need Nerd Fonts.

The following fonts are recommended for Japanese.

How to Install

1. Prepare Setting File

Put the following file in your home directory as '.droolmaw.toml'.

l_separator = ""
r_separator = ""

[[l_components_first]]
name = "Id"
color = "Magenta"

[[l_components_first]]
name = "DirPath"
color = "Blue"

[[l_components_second]]
name = "DateTime"
color = "White"
ng_color = "Red"

[[l_components2]]
name = "None"
color = "White"

[[r_components]]
name = "Langs"
color = "Blue"
langs = ["rust"]

2. Download and Set

A. By zinit

zinit ice from"gh-r" as"program"
zinit load "isuke/droolmaw"

prompt_precmd() {
  export DROOLMAW_RETVAL=$?
  PROMPT=`droolmaw`
  PROMPT2=`droolmaw --2`
  RPROMPT=`droolmaw --right`
}
add-zsh-hook precmd prompt_precmd

B. Compile by Yourself

git clone https://github.com/isuke/droolmaw.git
cd droolmaw
cargo build --release
export PATH="$PATH:/your/path/droolmaw/target/release"

prompt_precmd() {
  export DROOLMAW_RETVAL=$?
  PROMPT=`droolmaw`
  PROMPT2=`droolmaw --2`
  RPROMPT=`droolmaw --right`
}
add-zsh-hook precmd prompt_precmd

Spec of Setting File

key: l_separator and r_separator

  • hard_divider
    • l_separator: "" (U+E0B0)
    • r_separator: "" (U+E0B2)
  • triangle1
    • l_separator: "" (U+E0B8)
    • r_separator: "" (U+E0BE)
  • triangle2
    • l_separator: "" (U+E0BC)
    • r_separator: "" (U+E0BA)
  • half_circle_thick
    • l_separator: "" (U+E0B4)
    • r_separator: "" (U+E0B6)
  • flame_thick
    • l_separator: "" (U+E0C0)
    • r_separator: "" (U+E0C2)
  • ice_waveform
    • l_separator: "" (U+E0C8)
    • r_separator: "" (U+E0CA)

key: name

valueoptiondescription
Nonenone
Idid (user name)
Dircurrent directory name
DirPathmax_length = 123 (default: 50)current directory path
DateTimedate_time_format = "+%y/%m/%d %H:%M:%S" (default: "+%m/%d %H:%M:%S")date time
GitNamegit author name
GitCurrentBranchAndStatusesgit current branch name and statuses
GitRemotesAndStatusesgit remote name and statues
Langslangs = ["ruby", "node", "rust", "python"]The version of the language managed by mise in the current directory
ResultTextok_text = "ok" ng_text = "ng"if prev command's exit code is 0 => print ok_text else => print ng_text

key: color and ng_color

value
Black
Blue
Cyan
Green
Magenta
Red
White
Yellow

The color is background color. Background color is the ng_color instead of the color if prev command's exit code is not 0.