Add a Hiragana or Katakana in your zsh prompt, and plays the sound, to make you memorize them. The Hiragana or Katakana is changed after each command.
apt-get install mpg321
###Enable Japanese Characters
Install Japanese fonts :
apt-get install 'fonts-takao*'
Add the following to your Xdefaults or Xressources
xterm*utf8: 1
xterm*faceNameDoublesize: TakaoExMincho
xterm*faceSize: 10
Run xrdb -merge [$HOME/.Xdefaults|$HOME/.Xressources]
to have your changes take effect
Download and extract the files in $HOME/.hiragana-katakana-prompt/
Run the configure
script
Add $(hirakata)
in your prompt
Done !
ZSH and oh-my-zsh
Move the files
and sounds
directories in the hirakata
plugin (located in oh-my-zsh/plugins
)
Move the hirakata
plugin to your .oh-my-zsh/custom/plugins
directory
Add hirakata in your plugins list in the ZSHrc
plugins=(hirakata ...)
You can now add $(hirataka)
in your prompt where you want it to be displayed.
Don't forget to use precmd()
in your theme, like so :
$ZSH/themes/mawuena.zsh-theme
precmd() {
PROMPT="${CL_BROWN}%(!.#.❆)%{$reset_color%} $CRUNCH_DIR_$(hirakata)$CRUNCH_PROMPT%{$reset_color%}"
}
Add the following in your $HOME/.zshrc
HK="$HOME/.hiragana-katakana-prompt"
source $HK/bin/gen_random_sym
Wrap your prompt in precmd()
and add $(hirataka)
where you want it to be displayed, such as :
precmd() {
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ $(hirataka)'
}
Options can be combined
$(hirakata mute)
Don't play the sound
$(hirakata romaji)
Displays the romaji translation right next to the character
$(hirakata hiragana)
Only select an Hiragana character
$(hirakata katakana)
Only select a Katakana character
oh-my-zsh pluginChose from Hiragana or Katana, or both- List of H/K to ignore
- Set frequency
BASH installInstall script