Yep.
I only use relative line numbers in normal mode. The snippet I posted switches back and forth automatically.