I have this right now in my ~/.Xmodmap
clear Lock keycode 66 = Hyper_L
xmodmap ~/.Xmodmap in ~/.bashrc.
This works alright for the first time but randomly the Caps Lock key goes back to working as a Caps Lock and I have to run the xmodmap command(generally by opening a terminal there by running ~/.bashrc) to map it back to windows key.
I am on Ubuntu 14.04 and using i3 window manager.
Is there a more robust way to do the mapping?