I am not sure whether similar questions were asked, but I did't find in SO.
I am using gnome-terminal + tmux. I've add if [ "$TMUX" = "" ]; then tmux; fi
in my .zshrc
so when I start terminal, I enter tmux automatically. Every time I press Ctrl-D
and quit from the tmux, I have to press Ctrl-D
again to quit from the terminal.
Now, what can I put in my .zshrc
or tmux.conf
so as to quit my tmux and terminal with only one press.
What I thought is that I can add a listener to capture tmux exiting event. And if that event occurs, let me quit from the window. But I have no idea how to achieve this. Any help will be appreciated!