News for hackers. Stuff that matters.
Re:Tmux 2.0 released by stormbrew on Thursday May 07, 2015 @11:06AM (#9505565)
The main thing that I wish I could have in tmux is the ability to disable other sessions attached to the current terminal without outright detaching them. I intend to go back to that other machine at some point, I just don't want its tiny screen making my current session tiny for no reason.

Maybe this is actually possible already and I just haven't found it?

Re:Tmux 2.0 released by jbnicolai on Thursday May 07, 2015 @11:13AM (#9505609)
Say you want to attach to session 0 (use `tmux list-sessions` to see available sessions).

A trick I've found is not attaching to that session, but starting a new session sharing all underlying windows. The model in tmux is [session]->[windows]->[panes], but something I did not realize until recently is that [session] can be multiple.

So rather than `tmux attach -t 0` use `tmux new-session -t 0`, allowing you to interact with the same windows without disturbing the other session.

Re:Tmux 2.0 released by pavel_lishin on Thursday May 07, 2015 @11:17AM (#9505651)
Is this a feature in 2.0? It doesn't seem to work for me - I still see a large part of my terminal window filled with the dots, since the other session's terminal window is much smaller.
Re:Tmux 2.0 released by jbnicolai on Thursday May 07, 2015 @11:22AM (#9505697)
Ah, I forgot to mention: the resize -if the terminal-window is smaller- will still happen, but as long as the two sessions are operating on a different window they can be of different size.
Re:Tmux 2.0 released by pavel_lishin on Thursday May 07, 2015 @11:33AM (#9505793)
I think I'm missing something.

Terminal A: 300x10 lines (long across, but short) Terminal B: 120x30 lines (standard new terminal size)

I have a tmux session running in A; I open terminal B, and attach to it with -new-session. My first pane is trimmed to the height of Terminal A.

If I do prefix-c (create new pane), the new pane is now the size of Terminal B - hurray!

But if I open Terminal C, which is yet another size, and attach to my existing session, it resizes every pane in Terminal B to the size of Terminal C; and when I disconnect from Terminal C, those panes do not appear to switch back to what they now should be, unconstrained by Terminal C.

(If I didn't explain this clearly, I can provide some screenshots later.)

Re:Tmux 2.0 released by jbnicolai on Thursday May 07, 2015 @12:17PM (#9506167)
> But if I open Terminal C, which is yet another size, and attach to my existing session [...]

I might be misunderstanding, but could you not use `tmux new-session -t 0` again for the third terminal?

> and when I disconnect from Terminal C, those panes do not appear to switch back to what they now should be, unconstrained by Terminal C.

Odd. Unrelated to your earlier issue, but that's not what I'd expect or am seeing when I try to reproduce is locally.

Re:Tmux 2.0 released by daurnimator on Thursday May 07, 2015 @09:11PM (#9509468)
you need to turn on aggressive resizing.
Re:Tmux 2.0 released by pavel_lishin on Friday May 08, 2015 @12:16PM (#9512507)
Aha, thanks!

(Also, good to see you again, digitally - how's your hemisphere?)

Re:Tmux 2.0 released by daurnimator on Saturday May 09, 2015 @02:45AM (#9515736)
Pretty good; working from a co-working space here. Just bought an apartment.
Re:Tmux 2.0 released by stormbrew on Thursday May 07, 2015 @12:21PM (#9506209)
I don't have any issue with the session itself being shared. It's actually the desired behaviour almost all the time. I just don't want to be dependent on the frame sizing of a terminal no one's even looking at.
Re:Tmux 2.0 released by function_seven on Thursday May 07, 2015 @12:54PM (#9506480)
jbnicolai's method kinda solves this for me. The upshot is the set of windows is mirrored between both clients, but they can each be looking at different windows. You still have a problem if the other client is looking at the same window that you're on, though.
Re:Tmux 2.0 released by aphistic on Thursday May 07, 2015 @01:43PM (#9506865)
Would doing <bind>D (note the casing) help? It will list all the currently attached sessions and allow you to remotely disconnect them. I use it when I forget to detach at home and I'm at work or vice versa.
Re:Tmux 2.0 released by stormbrew on Thursday May 07, 2015 @03:30PM (#9507652)
That's exactly what I do. First of all, it's annoying that I have to go and choose each one to detach it. Second, I usually invoke tmux directly with mosh or ssh -t, so detaching also disconnects them, which I don't really want.

I basically want an untouched session to go into a screensaver mode where it no longer controls the terminal size.

It's certainly not the end of the world to detach them, but I'd rather not. And detaching before I leave a session is just busywork.

Re:Tmux 2.0 released by Jaepa on Thursday May 07, 2015 @11:16AM (#9505637)
Just send it to a different session then switch back when you're ready.
Re:Tmux 2.0 released by stormbrew on Thursday May 07, 2015 @12:22PM (#9506222)
Could you explain in more detail? I don't understand the practical meaning of what you're suggesting.