Looks to me like the op was trying to draft the truck that just passed. The op is obligated to stay as far to the right as possible I believe. Unless the op is doing the speed limit he is also impending traffic.
The pu should not have tried to pass on the right but I am laying the blame on the op for putting himself in that situation.
Him riding like that is a reason people dislike cyclists.