This shows you the differences between two versions of the page.
ii:labs:01:tasks:02 [2021/10/09 21:50] radu.mantu [02. [40p] tmux] |
ii:labs:01:tasks:02 [2024/10/18 12:14] (current) radu.mantu |
||
---|---|---|---|
Line 45: | Line 45: | ||
$ tmux source-file ~/.tmux.conf | $ tmux source-file ~/.tmux.conf | ||
</code> | </code> | ||
+ | </note> | ||
+ | |||
+ | <note important> | ||
+ | If you are working in a Virtual Machine, it may be unable to capture key combinations such as //<Ctrl + B>//. There are two alternatives to using these shortcuts. | ||
+ | - right click on the terminal (while running tmux) and drag the mouse. A menu should appear with some basic commands. Drag the cursor over the command and release the mouse button | ||
+ | - run ''tmux split-window''. This command shows all configured binds. We notice the ''split-window [-h]'' command being used, so try running ''tmux split-window'' with a **tmux** instance already running. This will send it a split screen request, just like //<Ctrl + B> "//. | ||
</note> | </note> | ||
Line 62: | Line 68: | ||
=== [10p] Task C - Start tmux by default === | === [10p] Task C - Start tmux by default === | ||
- | If you open a new terminal with //<Ctrl + Alt + T>// you will notice that **tmux** is not running. When **zsh** starts up, it automatically sources //.zshrc//, so lets make it execute **tmux** by adding the following at the end: | + | If you open a new terminal with //<Ctrl + Alt + T>// you will notice that **tmux** is not running. When **zsh** starts up, it automatically sources //.zshrc//, so let's make it execute **tmux** by adding the following at the end: |
<code> | <code> | ||
# start tmux session (only once!) | # start tmux session (only once!) | ||
- | if [ -z "$TMUX" ] && [[ "$USER" == "<YOUR_USERNAME_GOES_HERE>" ]]; then | + | if [ -z "$TMUX" ] && [[ "$USER" == "YOUR_USERNAME_GOES_HERE" ]]; then |
exec tmux | exec tmux | ||
fi | fi |