Skip to content

isuke/droolmaw

Repository files navigation

Droolmaw git-consistent friendly MIT

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

value option description
None none
Id id (user name)
Dir current directory name
DirPath max_length = 123 (default: 50) current directory path
DateTime date_time_format = "+%y/%m/%d %H:%M:%S" (default: "+%m/%d %H:%M:%S") date time
GitName git author name
GitCurrentBranchAndStatuses git current branch name and statuses
GitRemotesAndStatuses git remote name and statues
Langs langs = ["ruby", "node", "rust", "python"] The version of the language managed by mise in the current directory
ResultText ok_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.