Depending on the launcher and launch method you may need to set systemd variables. Look at the way 50-systemd-user.conf
works
https://wiki.archlinux.org/title/Sway#Configuration
I use the following fragment to make sure the cursor theme propagates to applications launched with wofi: https://github.com/StaticRocket/dotfiles/blob/main/dot_config/sway/systemd-user.conf
Bash, just because everything else already uses it. That and bashisms have infected nearly all of my scripts as I clumsily bump into the limitations of POSIX string manipulation.
I have found some very fun things with sed branching patterns as a result of these limitations though…
https://www.gnu.org/software/sed/manual/html_node/Branching-and-flow-control.html