totalterminal icon indicating copy to clipboard operation
totalterminal copied to clipboard

Clicking Terminal Icon in Dock

Open lucas-clemente opened this issue 13 years ago • 10 comments

Clicking the terminal icon in the dock when there's a normal terminal window open on another space first shows TotalTerminal, then hides it again and moves to the other space.

I don't know what behavior would be correct here (i suggest just showing the overlay and not moving at all), but the current looks flawed.

lucas-clemente avatar Jul 29 '11 11:07 lucas-clemente

I've changed the code a bit in d67fbee2fa3591026fa3dc8f9450325bdba6e3c4, but I was unable to find a solution for this.

In case of clicking the dock icon. Spaces simply return to the space with visible Terminal window prior I get chance to show the Visor window.

darwin avatar Aug 05 '11 20:08 darwin

Hm, that's strange. Didn't this work when you still used SIMBL?

Edit: Sorry, closed it by mistake.

lucas-clemente avatar Aug 05 '11 20:08 lucas-clemente

Didn't this work when you still used SIMBL?

You tell me. I'm using only the Visor window, not other classic Terminal windows with it - also I'm not using spaces.

darwin avatar Aug 05 '11 20:08 darwin

Maybe it would be an idea to make TotalTerminal.app show the Visor if it's already there. That way one could put only TotalTerminal into the Dock and not use the Terminal icon at all (even hide it using LSUIElement). But for that to be a proper solution TotalTerminal should also have an indicator light in the Dock, so it can completely replace the old terminal icon.

lucas-clemente avatar Aug 05 '11 20:08 lucas-clemente

The icon in the Dock is owned by Terminal.app. TotalTerminal.app does not run, it is just a launcher which does what would SIMBL do: it injects some code into Terminal.app.

I'm afraid your last comment does not have much common with this issue we are discussing here. Or am I missing something?

darwin avatar Aug 05 '11 20:08 darwin

Well, it's not a direct solution, more of a workaround. However if it doesn't fit into your plans I guess I can live with the current behavior. No hard feelings ;)

lucas-clemente avatar Aug 05 '11 20:08 lucas-clemente

I'm finding myself with a similar issue:

With TotalTerminal installed, clicking the Terminal icon in the Dock shows or hides the visor. I mentally divorce the visor and the Terminal icon, so my expectations are set by what Terminal would do were the visor not running.

Specifically:

  • If there were an open Terminal window in the current space, it would be raised and focused.
  • If there were an open Terminal window in another space, that space would be shown, with the Terminal window raised and focused.
  • If there were no open Terminal window in any space, a new Terminal window would be created in the current space.

There is currently an option to "Show on Reopen", and disabling it has the effect of not toggling visor visibility when clicking the Terminal icon, but no (other) Terminal windows open, this makes clicking the Terminal icon a no-op (excepting that it does change the menu bar).

pvande avatar Nov 30 '11 04:11 pvande

I have changed the behavior in for upcoming 1.1.5 release a bit in 5f67a029e7925ee14c60c3195efba68ed784684c

I have removed option Show on Reopen. With new auto-slide feature, Visor slides whenever you activate Terminal from ALT-TAB switcher or clicking on Dock icon.

@pvande I cannot implement exact the same behavior as with original Terminal.app, internally Terminal.app probably looks at number of terminal windows and if there is no open window, it opens one during applicationShouldHandleReopen call. I would need to somehow cloak Visor window so the rest of Terminal.app code is forced to think there is no terminal window available. Leaving it open for now.

darwin avatar Feb 18 '12 19:02 darwin

@pvande but new behavior is closer to your list, (1) and (2) work as you described, (3) just slides Visor down instead of opening new terminal window

darwin avatar Feb 18 '12 19:02 darwin

The current implementation (as described by darwin) does no longer have the flaw(s) described when opening this issue. Hence I feel this issue can be closed.

xeago avatar Apr 06 '12 18:04 xeago