I too find myself fighting boredom from time to time when playing online. While I know that it's best to be focused when playing, I have a hard time forcing it. When I try to, I find myself playing with an "I don't care" kind of attitude, which only lasts long enough for me to make a bad decision. Then I remember that I do care and that I don't so much mind losing, as much as I hate to not play my best.
Music is an old go to. Not just listening to it, but building playlists of different kinds of music to fit my particular mood at the time. The actual listening doesn't actually require any effort. I actually watch T.V. in the same sort of way that you might listen to music. I tend to watch shows or movies that I've already seen several times. That way, I don't have to really pay full attention. I can focus on hands when I'm playing hands. When I go card dead, I can glance over to the T.V. and pick it up where it is. I don't usually watch new movies when I'm playing. I record them and watch them later. But for some reason I did try to watch Cloud Atlas three times, while I was playing, before I went "what the hell am I doing?". After all, you have to watch that movie a couple of times from start to finish, with no distraction, in order to piece it together. I will also actually surf the web while playing. But I do it from my laptop, while I play poker on my desktop. One of the things that I do remain disciplined about is that I keep my poker tables in the foreground and don't open any windows on top them. This way if I'm googling something on my laptop and I hear the audio cues that indicate a big pot building, I can push my laptop to the side and pay attention to the action.
The key for me is enough distraction to keep me from getting sick of sitting at my desk, in front of my computer, but not so much that it hinders my ability play. When I get into the zone, I don't see the T.V. or hear the music at all. It's like having the T.V. on as you fall asleep to keep your brain distracted enough that it doesn't get wound up thinking about a bunch of stuff. But if it's too loud then your brain will start trying to process the sounds coming from it. So you want to keep it at a level where you can tune it in or tune it out if you want to.