LoginSignup
9
9

More than 5 years have passed since last update.

時間がかかるコマンドの完了に気づく

Last updated at Posted at 2016-09-06

パッケージのダウンロードとかビルドとか、時間がかかる処理をしているとき、
ほかの作業にとりかかっていて、気づいたらビルドが終わってた。
なんてことがしょっちゅうあります。

それぞれのタスクの優先度が同じならまあいいんですが
知らない間に優先度が逆転しちゃってると生産性が落ちますよね。

コマンドが終わったことを音で知らせる方法を思いつきました!

言わせる

shell
% bundle install; say 'おわりました'

サイバーな感じで気に入ってますが、残念ながらlinuxでは使えません。

システム音を鳴らす

shell
% bundle install; tpul bel

これでシステム音が鳴ります。

ターミナルでスクリプトを呼ぶたびにコマンド繋げるのが面倒であれば
スクリプト内に入れてしまうのも手です。
pythonからsubprocessでコールしてみました。

python
import subprocess

subprocess.call('tput bel', shell = True)
9
9
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
9