Is there any way to detect how many levels of tmux I'm currently in? I've been able to hack it with 2 levels by simply checking
[[ -n "$SSH_CLIENT" && -n "$TMUX" ]], so I can have one level on the client and one on the server. I use that check to setup a different prefix (ctrl-a, ctrl-b).
But now I'm finding I want to ssh from inside the server shell, so would like even a third level, thus requiring a third prefix combination to be setup.