User Tools

Site Tools


other:tmux_terminal_multiplexing

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
other:tmux_terminal_multiplexing [2021/04/02 18:45]
nanodano [Other common tasks]
other:tmux_terminal_multiplexing [2022/03/23 16:27] (current)
nanodano
Line 46: Line 46:
 tmux list-commands tmux list-commands
 # Within tmux press ''CTRL-b ?'' # Within tmux press ''CTRL-b ?''
 +</code>
 +
 +===== 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 ''setw -g mouse on'' in a tmux conf file. For example:
 +
 +<code - .tmux.conf>
 +# ~/.tmux.conf
 +
 +# Enable mouse
 +set -g mouse on
 +</code>
 +
 +<code bash>
 +# Then run tmux as normal
 +tmux
 +# OR to be explicit
 +tmux source-file ~/.tmux.conf
 </code> </code>
  
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\]
 +</code>
  
 +Most of these keybinds must be preceeded with the ''CTRL-b'' chord.
  
-Create a new window - ''c'' +  * Create a new window - ''c'' 
-List window - ''w'' +  List window - ''w'' 
-Select a window - (the number of the window) +  Select a window - (the number of the window) 
-Rename windows - , +  Rename windows - '','' 
-Kill window - & +  Kill window - ''&'' 
-Next window - n +  Next window - ''n'' 
-Previous window - p +  Previous window - ''p'' 
-Last window - l +  Last window - ''l'' 
-Split window horizontally in two panes - " +  Split window horizontally in two panes - ''"'' 
-Split window vertically in to two panes - % +  Split window vertically in to two panes - ''%'' 
- +  Set even split horizontally - ''ALT-1'' 
-Set even split horizontally - ALT-1 +  Set even split vertically - ''ALT-2''
-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 ''CTRL-b'' followed by one of the following keybinds:
  
-Switch active pane - up/down/left/right arrow +  * Switch active pane - ''up/down/left/right arrow'' 
-Next pane - o +  Next pane - ''o'' 
-Previous pane - ; +  Previous pane - '';'' 
-Kill pane - x +  Kill pane - ''x'' 
-Break out pane in to window - ! +  Break out pane in to window - ''!'' 
-Resize pane 1 unit - CTRLplus left/right/up/down arrow +  Resize pane 1 unit - ''CTRL'' plus ''left/right/up/down arrow'' 
-Resize pane 5 units - ALTplus left/right/up/down arrow +  Resize pane 5 units - ''ALT'' plus ''left/right/up/down arrow'' 
-Swap pane up/down - { or } +  Swap pane up/down - ''{'' or ''}'' 
-Rotate pane up/down - CTRL-o or ALT-o+  Rotate pane up/down - ''CTRL-o'' or ''ALT-o''
  
  
other/tmux_terminal_multiplexing.1617389135.txt.gz · Last modified: 2021/04/02 18:45 by nanodano