I'm writing this thread to talk about the "show whole scene transparent" (x-ray) option: I bet we all agree on the fact that it's fairly similar to the "limit selection to visible" that we had in 2.79's Edit mode (with a big upgrade of course).
The thing is that I only use that when I'm in Edit mode and I prefer having it turned off when I'm in object mode. Yet, the way it works now is that toggling Edit/Object mode does not change the state of the "x-ray" and vice versa.
I would like to know how I could bind the toggle of that visibility option to "tab".
Explanation --> I don't like that I have to do "Alt"+"Z" in addition to "tab" each time I switch between Edit & Object modes. I would like to be able to do both just by tapping "tab".
Is it possible to keep the action that "tab" does (toggle Edit/Object)... And add to that the toggle of the "limit selection to visible"?
I am totally aware that this might only be convenient for me. I'm not asking for it to be implemented by default or so. I just want to know how I can do it locally (maybe some Python lines could help?).
Thanks for reading,