This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
other:tmux_terminal_multiplexing [2021/04/02 18:44] nanodano |
other:tmux_terminal_multiplexing [2022/03/23 16:27] (current) nanodano |
||
---|---|---|---|
Line 46: | Line 46: | ||
tmux list-commands | tmux list-commands | ||
# Within tmux press '' | # Within tmux press '' | ||
+ | </ | ||
+ | |||
+ | ===== Enabling mouse ===== | ||
+ | |||
+ | With mouse enabled, you can click between split windows and use the mouse to resize. You can also right click on panes and in the bottom left corner to switch windows and manage processes. It adds a lot of really nice functionality. | ||
+ | |||
+ | You must specify '' | ||
+ | |||
+ | <code - .tmux.conf> | ||
+ | # ~/ | ||
+ | |||
+ | # Enable mouse | ||
+ | set -g mouse on | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | # Then run tmux as normal | ||
+ | tmux | ||
+ | # OR to be explicit | ||
+ | tmux source-file ~/ | ||
</ | </ | ||
Line 91: | Line 111: | ||
===== Windows ===== | ===== Windows ===== | ||
+ | The top level object is a session. A session contains windows, and a window contains panes. Here are commands related to windows. Like most things in tmux, you can use the shell command, or the keybind. | ||
+ | |||
+ | <code bash> | ||
tmux new-window | tmux new-window | ||
tmux list-windows | tmux list-windows | ||
Line 100: | Line 123: | ||
tmux swap-pane -\[UDLR\] | tmux swap-pane -\[UDLR\] | ||
+ | </ | ||
+ | Most of these keybinds must be preceeded with the '' | ||
- | Create a new window - '' | + | * Create a new window - '' |
- | List window - '' | + | |
- | Select a window - (the number of the window) | + | |
- | Rename windows - , | + | |
- | Kill window - & | + | |
- | Next window - n | + | |
- | Previous window - p | + | |
- | Last window - l | + | |
- | Split window horizontally in two panes - " | + | |
- | Split window vertically in to two panes - % | + | |
- | + | | |
- | Set even split horizontally - ALT-1 | + | |
- | Set even split vertically - ALT-2 | + | |
===== Panes ===== | ===== Panes ===== | ||
+ | A pane is the lowest level of hierarchy in screen organizing. The top level is the session, then the session has windows, and a window is made up of panes. | ||
+ | |||
+ | Most of these need to be preceeded by '' | ||
- | Switch active pane - up/ | + | * Switch active pane - '' |
- | Next pane - o | + | |
- | Previous pane - ; | + | |
- | Kill pane - x | + | |
- | Break out pane in to window - ! | + | |
- | Resize pane 1 unit - CTRL- plus left/ | + | |
- | Resize pane 5 units - ALT- plus left/ | + | |
- | Swap pane up/down - { or } | + | |
- | Rotate pane up/down - CTRL-o or ALT-o | + | |
Line 151: | Line 178: | ||
* Toggle scrolling with '' | * Toggle scrolling with '' | ||
- | * Switch to next pre-defined layout: '' | + | * Switch to next pre-defined layout: '' |