Skip to content

Instantly share code, notes, and snippets.

@reasonset
Last active August 31, 2017 10:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reasonset/2fcda7e632fd59a355c3d91ab9b83ff0 to your computer and use it in GitHub Desktop.
Save reasonset/2fcda7e632fd59a355c3d91ab9b83ff0 to your computer and use it in GitHub Desktop.
#!/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