Open iTerm Tab with a Directory in Current Session I am working in

Weil, it does here.

Just to make sure: “active” means ‘frontmost’, right?

Yes, frontmost.

Just checked it again:

When not frontmost it opens a new tab and goes fullscreen & frontmost.
When frontmost (iTerm fullscreen window covers the whole screen) it opens a new tab and stays frontmost and fullscreen.

Here is a small screencast I made : http://quick.as/VjBbS2vek

It doesn’t trigger the hotkey when not in other apps.

In the screencast you are saying the contrary, no? (When in Safari, the macro brings iTerm to the front, but not fullscreen.)

Or did I get this completely wrong?

OK, here step by step what I’m doing and what I get:

  1. I launch iTerm
  2. I make it go fullscreen (⌘Return)
  3. I’m in fullscreen & frontmost iTerm now and press the macro hotkey
  • → I get a new tab with the cd command, and I’m still in fullscreen.
  1. I leave iTerm with ⌃⌥⇧⌘W.
  2. Another program is now frontmost, e.g Safari.
  3. I press the macro hotkey
  • → iTerm goes fullscreen & frontmost with a new tab with the cd command in.


Edit:
Have you checked if your ⌃⌥⇧⌘W hotkey conflicts with other hotkeys of other apps?

mm this is strange

Yes, I don’t have that hotkey mapped to anything else, so no conflicts.

It’s strange, that I don’t have the same behaviour as you :frowning:

EDIT:
It seems that this if frontmost condition never activates.

When does ⌃⌥⇧⌘W not work now? When iTerm is frontmost, or when another app is frontmost?

Well the hotkey itself, always works, it’s just that the macro, never seems to send that key code. It doesn’t work when another application (not iTerm) is frontmost.

OK. You have tried it with different applications, yes?

Yes, I have. :frowning:

Just to be make sure it isn’t the hotkey: Have you tried it with another one? For example ⌃⌥⇧⌘9. (You have to change it in iTerm’s prefs and in the script.)

Yep, just changed it, and changed it in the script too. It doesn’t activate full screen and activate the hotkey.

If I got it right, ⌃⌥⇧⌘W does not activate fullscreen. ⌘Return does activate fullscreen. If not in fullscreen mode, ⌃⌥⇧⌘W brings only that large, transparent window up, right?

Yep, you got it right.

⌃⌥⇧⌘W only shows my iTerm window whether it is in full screen or not.

Yep.

Do we have the same iTerm version? I have Build 3.0.10. Are you on Sierra or El Capitan?

Yep, same version. And I am on El Captain

I’m going to test it on my old MacBook Air, which still has El Capitan. May take a while, that thing is painfully slow…

Thank you so much Tom. I would be using this macro very often.

It works the same on El Capitan here.

Weird.