33
38

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

tmuxで新しいwindowを開いて4分割し、それぞれコマンドを実行させる

Last updated at Posted at 2012-04-06
#!/bin/zsh
tmux new-window -n name # 新しいwindowを開きたくない場合は以下
# tmux rename-window name
tmux split-window -h
tmux split-window -v -t name.0
tmux split-window -v -t name.1

tmux send-keys -t name.0 'echo 0' C-m
tmux send-keys -t name.1 'echo 1' C-m
tmux send-keys -t name.2 'echo 2' C-m
tmux send-keys -t name.3 'echo 3' C-m

nameはwindowの名前。好きなのでOK。
echoのところをそれぞれ実行させたいコマンドに。

33
38
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
33
38

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?