A zim module that randomly shows a cute kaomoji in your iTerm2 badge.
- On every prompt render (
precmd), it randomly picks one kaomoji from the built-inkaomojilist and writes it to the badge. - Before command execution (
preexec), it clears the badge when the command matches configured patterns. - Default clear patterns are:
nvim*,vim*,less*,man*.
You can override the default clear list using an environment variable:
export EMOBAGE_CLEAR_BADGE_CMDS='nvim* vim* less* man*'
This variable accepts space-separated patterns and supports zsh patterns.
For example, to also clear on bat and fzf:
export EMOBAGE_CLEAR_BADGE_CMDS='nvim* vim* less* man* bat* fzf*'
It is recommended to put this line in ~/.zshrc, before module initialization.
- iTerm2 (badge escape sequence:
\e]1337;SetBadgeFormat=...\a) base64command available (included by default on macOS)
Add this to ~/.zimrc:
zmodule aclgh/emobage
