Methods of payment Abuse

How to enable mouse support in Tmux

02.09.2024, 22:09

To enable the mouse to be used as an input device, allowing you to control your computer and applications more efficiently and conveniently with the mouse pointer. This is especially important for GUI work, games, editors, and other applications where using a mouse greatly improves the speed and accuracy of actions.

More about Tmux

Tmux is a terminal multiplexer that allows users to run multiple terminal sessions in a single window. It provides the ability to split the screen into multiple panels, switch between them and manage multiple terminal sessions simultaneously.

Some key features of Tmux:

  1. Multiplexing: you can create and manage multiple sessions that can run independently of each other.
  2. Split window support: you can split the screen into multiple panes (horizontally or vertically) and work in each of them.
  3. Disconnect and reconnect: you can disconnect a Tmux session and reconnect to it later, keeping all your processes active.
  4. Customization: there is also the possibility to customize using configuration files, allowing you to adapt it to your needs.

Tmux is particularly useful for developers and system administrators who work with remote servers or need to manage terminal sessions efficiently.

Mouse activation instructions

To enable mouse support in Tmux, you need to add the line:

set-option -g mouse on

`~/.tmux.conf` file (if this file is not already created, you need to create it). After you make changes to the configuration file, you need to restart Tmux (close all session windows and start it again).

How to enable mouse support in Tmux

After that you will be able to use the mouse in Tmux as follows:

  • to select text, you need to press the left mouse button and select the desired section of text;
  • to copy the selected text to the clipboard, right-click the mouse;
  • to paste text from the clipboard, press Ctrl+Shift+v.

Also, if you have a vertical split, you can use a 2x2 matrix with pixels on the left.

How to enable mouse support in Tmux

Save your changes, press Ctrl+b : and then run such command to reload tmux:

source ~/.tmux.conf

This completes the tmux setup, the mouse will now work.