Is it possible make tmux status bar float over the terminal content (instead of push it)? - tmux

I recently changed my tmux config to toggle the status bar when I press a key map.
When the status bar is displayed, it pushes the terminal content up and the flick effect is annoying.
Is it possible to display the status bar over the terminal content?
(tmux prompt have this 'floating behavior', so I was thinking if there is some option to also apply it to status bar)

I found a workaround!
Instead of displaying the status, I'm using a display-message and recreating my status line inside the message. The display-message have the wanted float behavior.
Something like
tmux display-message -d 3000 "#{E:status-format[0]}"

Related

tmux within guake eats my scrollback buffer

I want to run tmux within guake, then start a long command, hide guake, and bring it back to access the whole output.
But when I hide guake then show it back, I can no longer scroll to the beginning : I seem to scroll up only to the point where the output was when I brought back the guake window.
I do not have this scrolling issue when running my command in guake alone, or when running tmux through a basic terminal like gnome-terminal.
How can I toggle tmux visibility with guake, while still preserving my scrollback?
my tmux settings:
set -g mouse on
bind -n Pageup copy-mode -u

How does one set the mouse on a remote HPC?

I am running tmux on a remote HPC but the mouse scrolling for history does not work. I know it usually works if one does:
C-b :
to get into command mode. Then:
setw -g mouse on
to turn the mouse on. But when I do that it doesn't like it:
Ambiguous option: mouse
Is this not possibel? How do I do it?
related: https://superuser.com/questions/210125/scroll-shell-output-with-mouse-in-tmux
For me, on tmux v1.8, the following command worked:
set -g mode-mouse on
Other mouse related excerpts from man tmux :
mouse-resize-pane [on | off]
If on, tmux captures the mouse and allows panes to be resized by dragging on their
borders.
mouse-select-pane [on | off]
If on, tmux captures the mouse and when a window is split into multiple panes the
mouse may be used to select the current pane. The mouse click is also passed
through to the application as normal.
mouse-select-window [on | off]
If on, clicking the mouse on a window name in the status line will select that win‐
dow.
mouse-utf8 [on | off]
If enabled, request mouse input as UTF-8 on UTF-8 terminals.
.
.
.
mode-mouse [on | off | copy-mode]
Mouse state in modes. If on, the mouse may be used to enter copy mode and copy a
selection by dragging, to enter copy mode and scroll with the mouse wheel, or to
select an option in choice mode. If set to copy-mode, the mouse behaves as set to
on, but cannot be used to enter copy mode.

How can I enter the copy mode when I scroll the mouse while using Tmux in MinTTY?

Scrolling the mouse while using Tmux in MinTTY, the command history is scrolled.
It seems that MinTTY converts mouse scroll event to up/down key.
In the past, I tried the following terminal with tmux2.1 or later,
the terminal was automatically set to copy mode.
iTerm2
WindowsTerminal
The .tmux.conf options are all the same.
set -g mouse on
I want to stop sending up/down key when I scroll the mouse while using Tmux in MinTTY.
And if possible, I want to enter copy mode automatically like other terminals.
Current Environment:
Ubuntu20.04 on WSL2
MinTTY3.06(WslTTY,GitBash)
temporary solution:
I want to stop sending up/down key when I scroll the mouse while using Tmux in MinTTY.
add this line to ~/.mintty
SuppressMouseWheel=scrollapp
I want to enter copy mode automatically like other terminals.
Shift + MousuWheel worked.
Shift may depend on the [Options->Mouse->Modifier for overriding default] setting.

Tmux current pane indicator when focus regained

I'm trying to create a visual indicator of which pane is currently focused in tmux when my terminal (iterm2, OSX) window gains focus. I have found that iterm2 sends a focus gained escape sequence (^[[I) so now I am trying to find how I can capture that and fire the prefix q command which shows pane numbers with the active pane in red.
Any ideas on how to capture the escape sequence in tmux OR in iterm2?
I have a partial solution to my issue which takes a different approach. Since I usually have vim and one terminal pane open, dimming vim when it is not focussed is a good indicator which pane is active. In order to achieve this I have modified the vim-diminactive plugin to react to focus events (https://github.com/blueyed/vim-diminactive/pull/8), this requires the Vitality.vim plugin as well as enabling (focus-events) in tmux options.
In order to completely solve my issue I am working on changing the background colour of terminal panes when they lose focus. I use zsh so I can capture the focus event with bindkey (I have verified this works) to issue a background colour change escape code to iterm2, however this seems to have no effect in tmux.

In zsh within a tmux, how do you make page up/down scroll up/down

With my current zsh and tmux (byobu) configuration, typing the page up/down keys will enter ~ in the prompt. What I would like is that
within a simple shell, page up/down scroll using the terminal history/scrollbar
within tmux, page up/down make the escape command and use the tmux history navigation for the current window
within a pager/editor, page up/down scroll up/down use the pager/editor scroll function
Actually after some research it happens that my current configuration already provide all I need :
shift+<page up/down> will send the corresponding scroll command to the terminal
alt+<page up/down> will send the corresponding scroll command to tmux
<page up/down> will send the corresponding scroll command to the foreground process

Resources