When I want to close a window I type
mbp-thomas in ~ ○ → exit logout [Opération terminée]
Then cmd + w to close the window.
Is there a way to do it with a little script like if I type
quit it exit the session then close the window ?