On empty windows (could pane-less windows become possible?)

17 views
Skip to first unread message

Steffen Nurpmeso

unread,
May 23, 2020, 5:01:55 PM5/23/20
to tmux-...@googlegroups.com
Hello.

With tmux as a desktop environment i still struggle with things as
stated in 20191018201234.P5wXx%ste...@sdaoden.eu (which cannot be
found unless you only search for date, it was [1]), there i wrote

The nice thing on windows is that they have an entry in the
title line, for example here there is

0:mail* 1:edit 2:accu 3:doc 4:tmp- 5:vms 6:irc

and i have shortcuts to get there, and i can get to that neat
window overview tree with one shortcut too. I see from a glance
where i am.

What i really would like to have would be some kind of split-frame
that splits the layout so that multiple windows share the frame,
rather than split-window that splits a window into panes. I.e.,
a split on top level. For example, so that edit and doc are
visible in one go, or edit and irc (now on IRC, since a few
months!!).

[1] https://www.mail-archive.com/tmux-...@googlegroups.com/msg01054.html

So i do "the same" with panes:

bind-key M-1 rename-window -t 1 edit/#W\; join-pane -h -s 0 -t :1.0

joins X into the "edit" window, so i can see irc, or doc, or a VM
ssh session, or whatever, at the same glance as my vim session.

Unfortunately the edit window will be named edit/edit not
edit/(irc|doc|..) with this, and

i="#{W}"\; rename-window -t 1 "edit/$i"\; join-pane -h -s 0 -t :1.0

is not supported. I have found no way to carry over the data of
the window(/pane) that is active once i invoke the binding, would
be very cool to be able to do that!

bind-key M-2 break-pane -n accu -s 1 -t 2\; rename-window -t 1 edit
...
bind-key M-6 set-option history-limit 0\; \
break-pane -n irc -s 1 -t 6\; \
set-window-option -t 6 monitor-activity on\; \
set-option history-limit 42000\; \
rename-window -t 1 edit

then let me do "the reverse".

But. If i open a window while having joined a pane, the window
slot will be gone. Also, when recreating the window it seems all
options have been lost, i need to set them again, but that does
not reflect any option that i might have set in the meantime.
Being able to keep the window open, even if it does not have any
panes, that would be great!

Do i miss something? Is that already possible today, somehow
(tmux 3.1b)?

Thanks, and a nice Sunday from Germany i wish,

--steffen
|
|Der Kragenbaer, The moon bear,
|der holt sich munter he cheerfully and one by one
|einen nach dem anderen runter wa.ks himself off
|(By Robert Gernhardt)

Nicholas Marriott

unread,
May 23, 2020, 5:14:07 PM5/23/20
to tmux-users
Split the window to make a temporary pane (it could be empty) before you break pane to stop the window being killed, and then kill the temporary pane after you join the pane back.



--
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/20200523210153.0RRXQ%25steffen%40sdaoden.eu.

Steffen Nurpmeso

unread,
May 23, 2020, 5:21:04 PM5/23/20
to Nicholas Marriott, tmux-users
Nicholas Marriott wrote in
<CAEdLfcFyoq1bfOp3U+KG=qxet2KtQaD9CcS...@mail.gmail.com>:
|On Sat, 23 May 2020, 22:01 Steffen Nurpmeso, <[1]ste...@sdaoden.eu[/1]> \
|wrote:
||So i do "the same" with panes:
|
||  bind-key M-1 rename-window -t 1 edit/#W\; join-pane -h -s 0 -t :1.0
...
||Unfortunately the edit window will be named edit/edit not
...
|Split the window to make a temporary pane (it could be empty) before \
|you break pane to stop the window being killed, and then kill the tempor\
|ary pane after you join the pane back.

In parts i was being afraid of getting this answer :)
Yeah sure, thanks. ... and ... any hints on the name problem?
Ciao,

Nicholas Marriott

unread,
May 24, 2020, 12:04:14 AM5/24/20
to Nicholas Marriott, tmux-users
You can use run-shell to do the expansion instead of rename-window, eg run 'tmux rename "#{window_name}"'.


Steffen Nurpmeso

unread,
May 25, 2020, 10:36:35 AM5/25/20
to Nicholas Marriott, tmux-users
Nicholas Marriott wrote in
<CAEdLfcFWFdYVB_29CGiQUZRSbFxXTzTMRBOMJOQezZRF2pAk=Q...@mail.gmail.com>:
||Nicholas Marriott wrote in
||<CAEdLfcFyoq1bfOp3U+KG=[2]qxet2KtQaD9CcS...@mail.gmail.com[/\
||2]>:
|| |On Sat, 23 May 2020, 22:01 Steffen Nurpmeso, <[1][3]steffen@sdaoden.e\
||u[/3][/1]> \
|| |wrote:
|| ||So i do "the same" with panes:
|| |
|| ||  bind-key M-1 rename-window -t 1 edit/#W\; join-pane -h -s 0 -t :1.0
|| ...
|| ||Unfortunately the edit window will be named edit/edit not
|| ...
|| |Split the window to make a temporary pane (it could be empty) before \
|| |you break pane to stop the window being killed, and then kill the \
||tempor\
|| |ary pane after you join the pane back.
|
||In parts i was being afraid of getting this answer :)
||Yeah sure, thanks.  ... and ... any hints on the name problem?

|You can use run-shell to do the expansion instead of rename-window, \
|eg run 'tmux rename "#{window_name}"'.

That works fine, and i really did not think of that. Thank you!

Yes; Thankfully there is the -v mode, so i could find out in the
server part why this Monday's "tmux a" did not fly, for one
there was an "%:else" not "%else" typo, and then i toggled
a bind-key "{" to bind-key { because i first thought that was
the bug (was what i really introduced last week). I now also
added a display-message 'tmux.conf fully loaded', as shown in
the manual.

Thanks again, and Ciao! from Germany,

Steffen Nurpmeso

unread,
May 28, 2020, 9:31:22 AM5/28/20
to Nicholas Marriott, tmux-users
Hello one more time.

Steffen Nurpmeso wrote in
<20200525143632.u3D8Z%ste...@sdaoden.eu>:
|Nicholas Marriott wrote in
|<CAEdLfcFWFdYVB_29CGiQUZRSbFxXTzTMRBOMJOQezZRF2pAk=Q...@mail.gmail.com>:
|||Nicholas Marriott wrote in
|||<CAEdLfcFyoq1bfOp3U+KG=[2]qxet2KtQaD9CcS...@mail.gmail.com[/\
|||2]>:
||| |On Sat, 23 May 2020, 22:01 Steffen Nurpmeso, <[1][3]steffen@sdaoden.e\
|||u[/3][/1]> \
||| |wrote:
||| ||So i do "the same" with panes:
||| |
||| ||  bind-key M-1 rename-window -t 1 edit/#W\; join-pane -h -s 0 -t :1.0
||| ...
||| ||Unfortunately the edit window will be named edit/edit not
||| ...
||| |Split the window to make a temporary pane (it could be empty) before \
||| |you break pane to stop the window being killed, and then kill the \
|||tempor\
||| |ary pane after you join the pane back.
||
|||In parts i was being afraid of getting this answer :)
|||Yeah sure, thanks.  ... and ... any hints on the name problem?
|
||You can use run-shell to do the expansion instead of rename-window, \
||eg run 'tmux rename "#{window_name}"'.
|
|That works fine, and i really did not think of that. Thank you!

I just wanted to remark FYI that if i place

bind-key M-1 run-shell "tmux rename-window -t 1 edit/#{W}"\; \
split-window -d ''\; join-pane -h -s 0 -t :1\; select-pane -t 0

in my tmux.conf then that '' is not treated as the "empty shell
command", whereas

..split-window -d '' \;..

is.
Ciao!

Nicholas Marriott

unread,
May 28, 2020, 12:55:19 PM5/28/20
to Nicholas Marriott, tmux-users
Yes... I'm not sure what we can do about that. I'm not really that happy about using '' for empty pane, maybe I will make it accept - or something as an alternative.
Reply all
Reply to author
Forward
0 new messages