Is there a way to enable proper mouse support in GNU screen so that I can switch the focus between split windows using my mouse?
In other words, I'm looking for a mouse-driven alternative to typing 'C-a Tab'.
Thanks,
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityI believe that GNU Screen's upstream may have proper mouse support. See Mouse in screen(1) on the Linux console?.
Also check Debian Sid (unstable), since according to the first answer found for the said post, Debian Unstable has the latest version/release thingy of GNU Screen.
This, however, may mean that you'll have to build Screen from source, which in of itself shouldn't be too difficult, but if you've never done this kind of thing before it can be a bit intimidating.
mousetrack on
in ~\.screenrc.
Nov 13, 2013 at 19:07
mousetrack on
instead of whatever the other options where, in order to get it work.
Nov 13, 2013 at 21:34
I realize this question is a little old, but I'd like to add that mousetrack seems to swallow the mouse events used for drag-select, at least on my installation of Ubuntu 16.04. So you have a choice: click-to-focus, or drag-select to highlight/copy text.
The workaround I've found for this is to bind a pair of keys to toggle mouseselect on & off. In ~/.screenrc
:
# Click region to focus, toggled by Alt-[ / Alt-]
# (When on, swallows mouse events for drag-select)
bindkey "^[[" mousetrack off
bindkey "^[]" mousetrack on
GNU screen does not use the mouse in any way.
If you want that behaviour, you could try tmux instead.
To enable that behaviour in tmux, add the following line to ~/.tmux.conf :
set -g mouse-select-pane on