LoginSignup
68
65

More than 5 years have passed since last update.

tmux でマトリックスっぽいスクリーンセーバーを表示する

Last updated at Posted at 2013-09-09

tmux 上で一定時間操作しないとこんな感じになります。
画像だと分かりづらいですが文字もちゃんと動きます。

tmux-screensaver.png

cmatrix をインストール

まずは、cmatrix コマンドをインストールします。

Mac の場合

$ brew install cmatrix

tmux の設定

以下の設定を .tmux.conf に追加して下さい。

~/.tmux.conf
# Screensaver
set -g lock-after-time 600
set -g lock-command "cmatrix -s -b"

スクリーンセーバーからの復帰は、任意のキーを入力するだけです。

lock-after-time はロックまでの時間(秒)です。
適当に変更して下さい。

lock-command に設定したコマンドは tmux lock コマンド時などにも使用されます。
tmux lock でマニュアルでスクリーンセーバーを起動することもできます。
(デフォルト値は lock -np です)

コマンドが存在しなくてもエラーが出たりはしないようです。

68
65
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
68
65