Enabling mouse support in tmux makes it possible to click a window in the status line, move focus between panes, resize pane borders, and scroll through pane history without leaving the multiplexer. It is useful when a session has several panes open or when occasional pointer control is faster than reaching for another key binding.
Current tmux releases use one mouse option for mouse handling. The tmux server reads its config from ~/.tmux.conf or an XDG config path when the server starts, and the source-file command reloads later changes into an already running server so the new setting applies to current sessions.
Mouse support changes how scroll and selection events are divided between tmux, the terminal emulator, and programs inside a pane. Full-screen tools such as vim, less, or man may keep mouse events for themselves, and terminal-emulator scrollback or text selection may behave differently until mouse mode is turned off again.
Related: How to reload the tmux config
Related: How to use copy mode in tmux
$ vi ~/.tmux.conf
tmux also reads $XDG_CONFIG_HOME/tmux/tmux.conf or ~/.config/tmux/tmux.conf when those paths are used instead of ~/.tmux.conf.
set -g mouse on
Current tmux releases use this single option instead of older settings such as mode-mouse, mouse-select-pane, or mouse-resize-pane.
$ tmux source-file ~/.tmux.conf
If no tmux server is running yet, start a new session instead because the config file is read when the server starts.
Related: How to reload the tmux config
$ tmux show-options -g mouse mouse on
The same check works after starting a new session when the config was not reloaded into an existing server.
The default mouse bindings let tmux select and resize panes, copy text, and change windows from the status line when mouse is on.
Applications running inside a pane can enable their own mouse handling, so wheel and drag events may go to the program instead of tmux until that program exits or its mouse mode is disabled.
Related: How to use copy mode in tmux