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, which allows you to more efficiently and conveniently manage your computer and applications using the mouse pointer. This is especially important for working with the graphical interface, games, editors and other applications, where using the mouse significantly increases the speed and accuracy of performing actions.

Instructions for activating the mouse

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

set-option -g mouse on

to the file `~/.tmux.conf` (if this file has not been created yet, then it needs to be created). After you make changes to the configuration file, you need to restart Tmux (close all session windows and restart it).

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

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

Also, if you have a vertical split, then you can use a 2x2 pixel matrix to the left of the scroll.

Save the changes, press Ctrl+b :, and then run the following command to restart tmux:

source ~/.tmux.conf

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