1

Whenever I click on the close window button (red), it closes my current iterm2 window, then when I click on iterm2 in my dock again, it opens a new one (I suppose), my entire iterm2 prompt is gone, and I don't want it.

I just want it (red button) to minimize my iterm2 window (yellow button behavior).

how do I do that ?

PS: no closing option is enabledenter image description here

5
  • 1
    Not really. This is macOS behaviour for those buttons. In this case I would use the keyboard cmd-h to hide the window
    – mmmmmm
    Commented Mar 7, 2023 at 21:46
  • it is not a macOS behavior, before i installed oh my zsh and p10k, when ever I did click on the red button to close the terminal, it just made it disapeared without the "effect", and when I clicked on it again on my dock, it would open it backup without refreshing it. but since I installed iterm2, it happens with my basic terminal too, and I don't now why.
    – hugo_HDSF
    Commented Mar 7, 2023 at 22:19
  • 1
    Red Button = close/quit process [not entire app]. That's how it's supposed to behave. There's a minimise button for minimising & Cmd/h or opt/click a new app to hide the frontmost app.
    – Tetsujin
    Commented Mar 8, 2023 at 9:38
  • The apple supplied startup zsh scripts will recover some of what the last zsh session did. Perhaps you aren't calling them. Delete your zsh srtup scripts and see
    – mmmmmm
    Commented Mar 8, 2023 at 9:41
  • Just a tought: why not set system-wide hotkey for iTerm? No need to hide or click anything, 100% keyboard. Commented Mar 8, 2023 at 10:03

1 Answer 1

1

To begin, it looks like you might not have the latest version. Since I have some options you don't (from your screenshot).

Screenshot of iTerm's Preferences > General > Closing

I believe to solve your problem you need to head over to your profile and go to the session tab. You'll see options at the top to adjust closing behavior.

Screenshot of iTerm's Preferences > Profiles > Session

If that doesn't work, you may need to uninstall iTerm and re-install it. I had an issue where iTerm would crash whenever the sudo password was needed. It would then open other iTerm windows and the terminal and get stuck in a loop until I force quit both of them. So I think sometimes the shell integration gets funky and out of whack.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .