Yes, actually that's a great way to quit. Find out what triggers you and avoid it. Changing your environment is incredibly beneficial.
"It may not be pleasant but being able to do that == being able to truly control the problem"
Who cares about controlling the problem? It's not a drug addiction where a single relapse can ruin your life. If a simple environment change allows me to spend 2 hours learning each night instead of on hackernews... Well that's a win.