English 中文(简体)
我如何能够在3场用短片把我的屏幕从印巴片分开。
原标题:How can I split my screen in 3 using tmux from a bash script

I m 书写一只双管齐下3台的双管,每台一线都有指挥。

我基本上想管理双面文字,而双面文字本应在3个时把我的屏幕分开,在另一个起平线上排在顶上,在另一个起平线上排在顶上,在第三个起线上,例如,在每台铺设一个灯。

任何帮助或点人都得到回报!

最佳回答

这样做的直接途径是设立一个附带条件的会议,设立会议附属的会期then

# -d says not to attach to the session yet. top runs in the first
# window
tmux new-session -d top
# In the most recently created session, split the (only) window
# and run htop in the new pane
tmux split-window -v htop
# Split the new pane and run perl
tmux split-pane -v perl re.pl
# Make all three panes the same size (currently, the first pane
# is 50% of the window, and the two new panes are 25% each).
tmux select-layout even-vertical
# Now attach to the window
tmux attach-session

你们也可以用警钟来做到这一点,但也许没有理由用文字来做到这一点:

tmux new-session -d top ; split-window -v htop ; split-window -v perl re.pl ; select-layout even-vertical ; attach-session
问题回答

我正在为此使用tmuxinator。 它请你在组合档案中确定每个窗口的窗口和星号,然后可以使用:

tmuxinator start <some-name>

这真是 ne!

(我确信,也可以用纯粹的ash子这样做。)

如果你有不同规模的横向和纵向组合,如左边有4个横向单位的垂直分裂,右边有3个(例如,我通过sh看所有机器的更新),那么,你就可以在分窗口指挥上使用——l国旗来说明线,或者如果你增加一个百分比的话。

你们只需要记住的是,根据以往分裂遗留下来的大小。 我的上述例子就是:

#!/bin/sh

clear

tmux split-window -h  figlet Raspberry1; ssh -t Raspberry1 "sudo apt update -y;sudo apt upgrade -y" 

tmux split-window -v -l 33% -d  figlet Raspberry2; ssh -t Raspberry2 "sudo apt update -y;sudo apt upgrade -y" 

tmux split-window -v -d  figlet Raspberry3; ssh -t Raspberry3 "sudo apt update -y;sudo apt upgrade -y" 

tmux select-pane -t 1

tmux split-window -v -l25% -d  figlet MyServer; ssh -t MyServer "sudo dnf update -y" 

tmux split-window -v -l33% -d  figlet Laptop; ssh -t Laptop "sudo dnf update -y" 

tmux split-window -v -d  figlet MyNAS; ssh -t MyNAS "sudo dnf update -y" 

figlet Desktop
sudo dnf update -y

说明我何时分成4个,我需要把1/4的空间分开,然后是1/3的空间,最后是1/2(这是缺席)。





相关问题
Signed executables under Linux

For security reasons, it is desirable to check the integrity of code before execution, avoiding tampered software by an attacker. So, my question is How to sign executable code and run only trusted ...

encoding of file shell script

How can I check the file encoding in a shell script? I need to know if a file is encoded in utf-8 or iso-8859-1. Thanks

How to write a Remote DataModule to run on a linux server?

i would like to know if there are any solution to do this. Does anyone? The big picture: I want to access data over the web, using my delphi thin clients. But i´would like to keep my server/service ...

How can I use exit codes to run shell scripts sequentially?

Since cruise control is full of bugs that have wasted my entire week, I have decided the existing shell scripts I have are simpler and thus better. Here is what I have so far svn update /var/www/...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

热门标签