I have secondary user account on my Mac that I use in parallel with my primary user account. I would like to run a small script when I fast user-switch into the secondary, and another script (or same script with arguments) when switching out of the secondary account.
Note that I am not talking about logging out of the primary and into the secondary, but rather being simultaneously logged into both the primary and secondary and switching between them.
Does the concept of "fast user switch hooks" exist on macOS, in the sameway that Linux ~/.bashrc and similar help with login management?