@sampleuserhere Can you please clarify exactly what the issue with {fg_app_name} is?
My bad, I didn't leave any details about the screen record I attached here.
{fg_app_name} doesn't get refreshed when any of non application window exits focus.
This is legacy behaviour, idk since when.
The floating text on the top right shows {fg_app_name} as the content. I started the floating text individually by running the action directly with "test action".
As you can see at the beginning, It displayed Vivaldi, which is the browser that was opening two tabs. Then when I opened up the keyboard it displayed Gboard.
The odd behaviour started when Gboard was not "foreground" any more, out of focus. The floating kept displaying "Gboard", while I think it should be "Vivaldi".
The same behaviour occured when I interacted with Everywhere Launcher (side gesture app), It didn't revert back to Vivaldi either even when I already interacted with Vivaldi afterwards.
Is this explanation sufficient?