mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-06 03:10:35 +01:00
add: hirakata plugin - hiragana and katakana in prompt + sound
This commit is contained in:
parent
3913106b2e
commit
0a35fcd7d5
94 changed files with 104 additions and 0 deletions
12
plugins/hirakata/hirakata.plugin.zsh
Normal file
12
plugins/hirakata/hirakata.plugin.zsh
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
p="$ZSH/plugins/hirakata/"
|
||||
f=$(cat $p"files/hk_symbols.txt")
|
||||
|
||||
function hirakata() {
|
||||
random_symbol=$(echo "$f" | shuf -n1)
|
||||
|
||||
symbol=$(echo $random_symbol | cut -d ' ' -f1)
|
||||
sound=$(echo $random_symbol | cut -d ' ' -f2)
|
||||
|
||||
( mpg321 $p'sounds/'$sound & ) > /dev/null 2>&1
|
||||
echo $symbol
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue