Monday, July 11, 2011

XXKB to the rescue

 I had problems with xfce keyboard layout switcher often dieing on suspend. Updating to newer and more stable version is cumbersome. So I did a quick search and found xxkb. It's very nice because I can have a language indicator on the window titlebar instead of filling the limited space in tray.

The only problem I had was that an indicator showed up in my tray. Fortunately xxkb is customizable so here's my config:
  • disable mainwindow (tray or a window indicator)
  • ignoring the tray/panel which is actually a window on it's own.
  • fixing indicator position
  • setting flag to be correct for my xkb configuration (yes, you need to configure xkb by other means, xkb only control its state)

One can use the xlsclients program to list all windows currently connected to the X11 server. I used it to find out the window name of the XFCE panel.

UPDATE: actually there is a better way, hold Ctrl, Shift or both and middle click the xxkb button you want to remove, that will update .xxkbrc automatically but will wipe all comments in the file. Unfortunately some windows don't have a name or class so still are a problem.

Below is my ~/.xxkbrc :
XXkb.mainwindow.enable: no
! XXkb.mainwindow.type:tray
! XXkb.button.enable: no
XXkb.app_list.wm_name.ignore: xfce4-panel
XXkb.button.geometry: 15x15-100+3
XXkb.button.image.2: bg15.xpm

Update: To ignore desktop use:
Xkb.app_list.wm_class_class.ignore: Xfdesktop

No comments:

Post a Comment