tmux:script
문서의 이전 판입니다!
tmux: script
작업마다 session 생성
tmux new-session -d -s {session0} tmux send-keys '{command1}' C-m tmux send-keys '{command2}' C-m tmux new-session -d -s {session1} tmux send-keys '{command1}' C-m tmux send-keys '{command2}' C-m tmux new-session -d -s {session2} tmux send-keys '{command1}' C-m tmux send-keys '{command2}' C-m tmux attach -t {session0}
작업마다 pane 생성(한 session 생성)
tmux new-session -d # detatch 상태로 시작 tmux split-window -v # pane 수직 분할 tmux split-window -v # tmux split-window -v -p 50 # tmux split-window -h -p 50 tmux select-layout tiled # 타일형태로 분할 tmux select-pane -t 0 # 0번 pane 선택 tmux send-keys 'top' C-m tmux select-pane -t 1 # 1번 pane 선택 tmux send-keys 'ls' C-m tmux select-pane -t 2 # 2번 pane 선택 tmux send-keys 'conda activate base' C-m # 마지막에 focus 맞추고 잇을 pane 선택 tmux setw synchronize-panes # 키입력 동기화 tmux -2 attach-session # 마지막 sesion에 attach
uv로 임시 환경 만들어 사용
tmux new-session -d # detach 상태로 시작 tmux split-window -h tmux split-window -v # tmux split-window -v # tmux select-layout tiled # global 환경변수 설정 tmux setenv -g UVRUN "uv run --python=3.10 \ --with=ipython \ --with=zmq \ --with=gym==0.25.1 \ --with=git+https://github.com/djcunningham0/multielo.git \ --with=matplotlib \ --with=visdom==0.1.8.9 \ --with=natsort \ --with=psutil \ --with=netifaces \ --with=tensorboard \ --with=torchinfo \ --with=faster_fifo \ --with=protobuf==3.20.3 \ --with=uvloop \ --with=mlflow \ --with=termcolor \ --with=torch-ema \ --with=einops \ --with=blosc2 \ --with=seaborn \ --with=scikit-image" tmux select-pane -t 0 # 1번 pane 선택 tmux send-keys '$UVRUN ipython' C-m tmux select-pane -t 1 # 0번 pane 선택 tmux send-keys '$UVRUN ipython' C-m tmux select-pane -t 2 # 1번 pane 선택 tmux send-keys '$UVRUN ipython' C-m # 마지막에 focus 맞추고 있을 pane 선택 # tmux setw synchronize-panes # 키입력 동기화 tmux -2 attach-session # 마지막 session에 attach
tmux/script.1744684298.txt.gz · 마지막으로 수정됨: 2025/04/15 02:31 저자 rex8312