Pink eye cannot be spread through a fart or a fart on a pillow or anything else.
Pink eye is caused by a bacterial infection that can be spread through hand contact if you touch your eye and have pink eye and then touch somebody else's hand and they touch their eye with that hand then the pink eye virus can spread that way.
Pink eye can also be spread other ways but it's an urban myth that you can get pink eye from a fart on a pillow.