binaryage/totalterminal

On restart, previous-session windows are killed

treyharris opened this issue · 1 comments

There are a number of other issues here that sound like they may be related, but I can't tell, so apologies if this is a dupe.

When I restart TotalTerminal (either by quitting Terminal and starting TotalTerminal again, or after a crash or reboot), the previous session's (ordinary, non-HUD) windows appear initially, with scrollback restored. But then when the HUD is initialized, these other windows are killed.

From one of the other issues, I tried setting TotalTerminalCloseWindowsOnStart (which previously did not exist in my defaults) as so:

% defaults write com.apple.Terminal TotalTerminalCloseWindowsOnStart -bool NO
% defaults read com.apple.Terminal TotalTerminalCloseWindowsOnStart 
0

This didn't change the behavior, however.

This is TotalTerminal 1.4.10 under OS X 10.9.3. I've been using TotalTerminal for years but this behavior is new (I can't say how new, though, as I wasn't using lots of non-HUD windows very often until recently).

I'm sorry this thing is confusing. The problem is that people have different workflows, some start TotalTerminal automatically during system launch, others launch it on-demand. In the first case they are annoyed that Terminal.app creates one initial window which pops after reboot. That is why I implemented closing existing windows, but this is annoying for second group, which could lose ordinary terminal windows, because of auto-closing after injection.

Current solution:
In the latest version(s) by default TotalTerminal attempts to close all existing windows if TotalTerminal injection happens into Terminal.app process which no older than 60 seconds (this timeout can be tweaked).

If TotalTerminalCloseWindowsOnStart is set to yes, it changes default behaviour and actively closes windows even in older Terminal.app.

What you want to set is this tweak:

defaults write com.apple.Terminal TotalTerminalDoNotTouchWindowsOnStart -bool yes

This will instruct TotalTerminal to leave all windows as they are.