Issues getting .xprofile (edited from .xinitrc) doing everything I want

I’ve got xfce manjaro (with i3 window manager), and trying to get my .xinitrc file to do stuff. I’m able to get it swap my caps lock for escape, so I know it must be working to some degree. But for example, if I enter the commands picom -b or redshift -O 4000 next to the caps/escape swap command (setxkbmap -option "caps:swapescape"), it doesn’t do either when it boots. Any idea why?

(originally posted on r/ManjaroLinux, but without a reply, thought I’d post here)

Did you tried ~/.xprofile instead? Eg, I start picom from here and works as expected.

That’s some kind of custom setup.

… it did before, and now it doesn’t?
perhaps look for how and where that file is called from and how it is included (or not) in your Xfce session setup

and look for how these things are done (maybe differently) in Xfce …

fixing .xprofile is what I needed, thank you!

Perhaps I should open a new thread, but now I’m wondering two things

(1) when I put redshift -O 4000 in .xprofile, it does the command, but then undoes it (so the screen blue light is briefly filtered, but changes back to no filtering)

(2) How would I run something that requires sudo permissions? I want to, for example, run sudo nordvpn connect, but it doesn’t connect when I put the command in .xprofile. My guess is it’s because it needs sudo permission, but not sure.

edit: I changed the title to be more appropriate