binaryage / totalterminal

Terminal.app plugin for quick access to terminal window (Quake-style)
http://totalterminal.binaryage.com
390 stars 36 forks source link

Feature Request: Show/activate TT when focus returns #48

Closed joshbetz closed 12 years ago

joshbetz commented 12 years ago

This mostly comes up when I'm committing to a git repo. I have an alias that automatically pull up my text editor with the diff and a place for me to type a commit message. When I save and close the the commit message, focus returns to the Terminal window, but TotalTerminal doesn't activate. So I have to manually activate it again. Ideally, it would just show the TotalTerminal window again automatically when focus returns.

uhlenbrock commented 12 years ago

+1 — I would love this feature as well.

daniels220 commented 12 years ago

1.2.3 fixes this if you have no other Terminal windows. It doesn't do quite what you want in this scenario though:

  1. Say debugging a Rails app or something else that needs a Terminal window dedicated to it. So you tab to Terminal and Cmd-N for a new window (note that using tabs in the TT window would solve this).
  2. Time to commit, something's still running, so you open TT and cd to the same dir and commit. That puts you in your editor, and then when you close the editor the normal Terminal window gets focus back but TT doesn't reactivate.

So actually, yeah, I agree it would be nice to extend the reactivate-on-refocus behavior to still work when there's another Terminal window open.

At the same time, for different workflows I would prefer if that behavior could be turned off entirely as per #50.

swidnikk commented 12 years ago

I believe this feature as implemented has some other unexpected behaviors in addition to #50, when I resume my laptop from sleep or log in, the visor frequently comes down, though I haven't worked out the precise pre-conditions for it to occur. This didn't happen in the previous version.

darwin commented 12 years ago

@joshbetz:

When Visor slides away, the visor's window gets effectively hidden (NSWindow's orderOut), see https://github.com/binaryage/totalterminal/blob/master/totalterminal-plugin/TotalTerminal%2BVisor.mm#L749. This is desirable for reasons described in the comments.

In your scenario. When you close your commit message. Windowing server returns focus to Terminal.app which leads to key focus to some classic Terminal window which is visible (not Visor window, because that's hidden). I cannot just slide down Visor when focus returns to some other Terminal window. This would be annoying in normal situations when you deliberately click/switch to particular classic Terminal window. And I don't know how to distinguish those two cases.

After sliding away I could keep Visor off-screen without hiding it. But this would open can of worms.

joshbetz commented 12 years ago

That's cool. It actually mostly works the way I want it to. Also, thanks for writing such an amazingly useful utility :)