Skip to content

ZackDibe/hiragana-katakana-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hiragana-katakana-zshprompt

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.

Dependencies

mpg321

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

Install

Download and extract the files in $HOME/.hiragana-katakana-prompt/

Easy install

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%}"
    }

ZSH only

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

Options can be combined

mute

$(hirakata mute)

Don't play the sound

romaji

$(hirakata romaji)

Displays the romaji translation right next to the character

hiragana

$(hirakata hiragana)

Only select an Hiragana character

katakana

$(hirakata katakana)

Only select a Katakana character

TO-DO

  • oh-my-zsh plugin
  • Chose from Hiragana or Katana, or both
  • List of H/K to ignore
  • Set frequency
  • BASH install
  • Install script

About

Simple Hiragan & Katakana zsh prompt to make you memorize them

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages