Directly editing the files isn't ideal. You should use an addon. If you are a programmer then you can post in the Development Questions forum for help with this. Or post an Add-on Request and some one may be able to write this for you.