I know that the current session name can be accessed with the
$STY environment variable, is there a way to get the session name of the parent screen session in case of nested screens?
I don't believe this is possible;
This would get you access to $PARENT_STY inside a nested screen, but it would only work for a single level of nesting. If you really wanted to you could get substantially more complicated (e.g., treating