Tuesday, November 27, 2012

Ubuntu - German Characters on English Keyboard

I have two keyboards - USA and UK. I prefer those over German keyboard due to brackets location. The idea is to access German characters with following key combinations:
  • Right ALT + s -> ß
  • Right ALT + a -> ä
  • Right ALT + o -> ö
  • Right ALT + u -> ü

This can be achieved with xmodmap. Just create in your home directory file called .Xmodmap and copy content below into it.


For USA keyboard:
keycode 108 = ISO_Level3_Shift ISO_Next_Group ISO_Level3_Shift ISO_Nexkt_Group
keycode  30 = u U u U udiaeresis Udiaeresis
keycode  32 = o O o O odiaeresis Odiaeresis
keycode  38 = a A a A adiaeresis Adiaeresis
keycode  39 = s S s S ssharp

For UK keyboard:
keycode 108 =  Mode_switch Mode_switch Mode_switch
keycode  30 = udiaeresis Udiaeresis u U udiaeresis Udiaeresis
keycode  32 = odiaeresis Odiaeresis o O odiaeresis Odiaeresis
keycode  38 = adiaeresis Adiaeresis a A adiaeresis Adiaeresis
keycode  39 = ssharp ssharp s S s S ssharp

You can also manually load key bindings by executing xmodmap .Xmodmap





Sunday, November 25, 2012

Ubuntu - Setup Kate Editor to Open Each Document in new Window

By default Kate opens documents within single editor. In order to open each document in new Kate editor execute following commands:

printf '#!/bin/bash\n/usr/bin/kate_org -n "$@"' > kate
chmod +x kate
sudo mv /usr/bin/kate /usr/bin/kate_org
sudo mv kate /usr/bin/