Feature suggestion: Centralize pane for large terminals

17 views
Skip to first unread message

Kleber Hugo Stangherlin

unread,
Nov 23, 2021, 3:56:45 PM11/23/21
to tmux-...@googlegroups.com
Hi,

Thank you all for the fantastic work with tmux!

I would like to suggest a new feature: pane centralization.

Context: I use full screen terminals to avoid getting distracted. This means that I am constantly looking at the bottom of my monitor when typing the next command - not ideal. If we a way to centralize the pane, with margins for bottom, left and right, it would be very comfortable. Something like what is displayed when I open a session of tmux that is already opened in another computer, and with different terminal sizes.

I hope you guys can consider it.

All the best,
Hugo

Anders Damsgaard

unread,
Nov 24, 2021, 5:11:16 AM11/24/21
to Kleber Hugo Stangherlin, tmux-...@googlegroups.com
Hi Hugo,

You can get close by splitting the window into three panes and using the
even-horizontal layout, e.g. with `tmux select-layout even-horizontal`.
You can resize the left and right pane dividers to your liking, and
script it if you wish.

Cheers, Anders

* Kleber Hugo Stangherlin <khstan...@uwaterloo.ca> [2021-11-23 20:38:54 +0000]:
>--
>You received this message because you are subscribed to the Google Groups "tmux-users" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to tmux-users+...@googlegroups.com.
>To view this discussion on the web, visit https://groups.google.com/d/msgid/tmux-users/YTBPR01MB3887491879C86C7FDF111800C2609%40YTBPR01MB3887.CANPRD01.PROD.OUTLOOK.COM.

Anders Damsgaard

unread,
Nov 24, 2021, 5:25:54 AM11/24/21
to Kleber Hugo Stangherlin, tmux-...@googlegroups.com
Hi again,

Here's a screenshot: https://adamsgaard.dk/tmp/center-pane-layout.png

The following bind for .tmux.conf configures this layout on a tmux window,
provided that it has a single pane to begin with:

bind F \
split-window -h \; \
split-window -h \; \
select-pane -L \; \
swap-pane -U \; \
select-pane -R \; \
select-layout even-horizontal

Best, Anders

* Anders Damsgaard <and...@adamsgaard.dk> [2021-11-24 11:11:10 +0100]:

Kleber Hugo Stangherlin

unread,
Nov 24, 2021, 8:28:47 AM11/24/21
to Anders Damsgaard, tmux-...@googlegroups.com
It works, thank you! 😄

From: Anders Damsgaard <and...@adamsgaard.dk>
Sent: Wednesday, November 24, 2021 5:25:50 AM
To: Kleber Hugo Stangherlin <khstan...@uwaterloo.ca>; tmux-...@googlegroups.com <tmux-...@googlegroups.com>
Subject: Re: Feature suggestion: Centralize pane for large terminals
 

Tobias Damisch

unread,
Nov 24, 2021, 10:09:35 AM11/24/21
to tmux-...@googlegroups.com
This would also do the trick. I use it all the time.
Fullscreen an empty pane and then press F4 for the desired effect.
I think changing the size of the popup is self-explanatory.
 
add to .tmux.conf:
 
bind-key -N "Toggle persistent popup shell" \
-n F4 if-shell -F '#{==:#{session_name},float}' { detach-client } \
{ popup -E -w60% -h60% \
'tmux attach -t float || tmux new -s float; \
display-message "Press F4 to toggle floating popup or Ctrl-D to kill it"' \
}
 
 
 
Gesendet: Dienstag, 23. November 2021 um 21:38 Uhr
Von: "Kleber Hugo Stangherlin" <khstan...@uwaterloo.ca>
An: "tmux-...@googlegroups.com" <tmux-...@googlegroups.com>
Betreff: Feature suggestion: Centralize pane for large terminals
--
Reply all
Reply to author
Forward
0 new messages