So it started when I was really low on gas, my rpm would drop to 500 ish (a bit higher) and go up and down and occasionally the truck would rattle, but after filling up it would go away but now its idling low always. What do.
Check fuel pressure, and if the fuel filter hasn't been changed in a while, change it.
When you got so low on fuel you might've sucked up dirt or sludge in the tank, and clogged up the "sock" in the tank. Try the easy stuff before you have to go into the fuel module.
I had the same problem recently and it turned out to only be that I needed to replace my fuel filter. Additionally however, one of the plastic retaining clips had come lose and was restricting the flow as well. After that, idle returned to normal.
While you're at it why not test the FPR = fuel pressure regulator as well with a fuel pressure gauge and see if it's at 37 psi engine off cranking and 40 psi engine running with the vaccum line disconnected and if it's off then replace that as well, they're not that expensive, maybe $25.00 at O'Reillys, etc.......