Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/zsh
#### Default Settings ####
hts_voicefile=/usr/share/open-jtalk/voices/mei_normal.htsvoice
mecab_dictdir=/usr/share/open-jtalk/dic/
jtalk_tuning=(-a 0.6 -r 0.8 -fm -2.0 -jf 1.5)
jtalk_tmpfile=$HOME/tmp/forcedtodo.wav
notify_interval=180
notify_time=15000
task_editor=mousepad
if [[ -f $HOME/.yek/forcedtodo/config.rc ]]
then
. $HOME/.yek/forcedtodo/config.rc
fi
(
while sleep $notify_interval
do
perl -pe 's/\n/。/g' ~/.yek/forcedtodo/todotext | open_jtalk "$jtalk_tuning[@]" -m $hts_voicefile -x $mecab_dictdir -ow $jtalk_tmpfile
play $jtalk_tmpfile >| /dev/null &|
notify-send -t $notify_time "TODO" "$(<$HOME/.yek/forcedtodo/todotext)"
done
) &
notifypid=$!
yad --notification --image=player-time --text="TODO NOW!" --command="yad --text-info -timeout=15 --title=TODO --width 300 --height 300 --filename=$HOME/.yek/forcedtodo/todotext" --menu='Edit!'"$task_editor $HOME/.yek/forcedtodo/todotext"'|Quit!quit' --tooptip="Immidiately Task"
kill $!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment