Is it possible to use terminal commands to switch between keyboard layouts in
ibus? I can't see any GUI way to do it in XFCE.
It's more related to
xkb than to
ibus (but I am not sure I completely understand the intricacy of the keyboard handling, as you can see in this post of mine) but you can detect the current configuration with
[romano:~] % setxkbmap -query rules: evdev model: pc105 layout: es,gb variant: standard_tlde, options: caps:none,compose:caps,terminate:ctrl_alt_bksp
note it down, and then use
setxkbmap -layout es -variant standard_tlde -option caps:none,compose:caps,terminate:ctrl_alt_bksp
that you can associate to a key. It should work in all Ubuntu flavors, at least X11-based (no idea about wayland).