@peccul is peccu

(love peccu '(emacs lisp cat outdoor bicycle mac linux coffee))

tmuxでGoogle翻訳の日英、英日を左右にまとめて開く

translate-shellを使ってGoogle翻訳で英語を勉強中。

github.com

f:id:peccu:20190815101152p:plain

  • 左のコマンド: rlwrap trans -brief
    • 英日翻訳で、考えた英文が思ってる日本語に翻訳されるか確認するのに使う
    • -briefオプションをつけてシンプルな出力に
  • 右のコマンド: rlwrap trans :en
    • 日英翻訳で、単語を調べるのに使っている
    • オプションをつけずに関連情報も出力している

2つのウィンドウに分割してそれぞれコマンドを叩くのをエイリアスで簡潔にした。

alias tl="tmux new-window -n translation \"echo 'en -> ja'; rlwrap trans -brief\" \\; split-window -h \"echo 'ja -> en'; rlwrap trans :en\""