Great work! That's pretty interesting. One of the things that always annoyed me is having to switch my language layout to write Arabic while I'm doing something else around (coding or whatever). This seems to be a great idea, I will go through the repo soon and maybe map it with some setxkbmap configuration.