17

Since I installed 17.10, when switching language with the assigned keyboard shortcut I get this switcher "window" that obstructs me from typing for a couple of seconds. And yes, a couple of seconds is a huge amount of time when switching languages a lot.

huge focus-grabbing language-switching indicator

This happens both in X11 and Wayland but doesn't happen (the obstructive window will not appear) when I switch language by clicking on the lang indicator on top bar. Is there any way to tell this window "please go away"?

pomsky
  • 70,557
nikosal
  • 181
  • 1
  • 7

5 Answers5

5

I've built the Quick Lang Switch Gnome-shell extension exactly to avoid the switcher popup - now switching languages happens instantly. Plus, it does not require a custom-shortcut (the regular one changes behavior), so login-screen is not affected.

Disclaimer: I am the developer of the Quick Lang Switch...

andrew.46
  • 39,359
ankostis
  • 255
4

The overlay appears if you press and hold a bit longer. A quick press and release should change the layout without showing the overlay.

As a workaround you may set another keyboard shortcut to switch layouts, see this for reference: Ubuntu 17.10 can't change the input switching shortcut to alt+shift.

pomsky
  • 70,557
2

It is possible by querying gnome-shell via its JS interface with gdbus call (src).

The following script will alternate between two configured input sources. Easy to modify if you have more.

#!/usr/bin/env bash

cur_idx=$(
        gdbus call \
                --session \
                --dest org.gnome.Shell \
                --object-path /org/gnome/Shell \
                --method org.gnome.Shell.Eval \
                "imports
                        .ui.status
                        .keyboard
                        .getInputSourceManager()
                        .currentSource
                        .index" |
        cut -d"'" -f2
)

next_idx=$(( 1 - $cur_idx ))

gdbus call \
        --session \
        --dest org.gnome.Shell \
        --object-path /org/gnome/Shell \
        --method org.gnome.Shell.Eval \
        "imports
                .ui
                .status
                .keyboard
                .getInputSourceManager()
                .inputSources[$next_idx]
                .activate()" \
        &> /dev/null

Make it executable with chmod a+x </path/to/script> and you may then bind it to a custom shortcut key:

Open Settings -> Devices -> Keyboard and click the '+' choice-button at the bottom to assign the script to some shortcut

(For Gnome < 3.x: Settings -> Devices -> Keyboard -> Custom Shortcuts).

ankostis
  • 255
1

I know this is a very delayed answer and it might not be useful. But I wanted to share this with you guys. I'm using Kubuntu 22.04 and I chose Wayland. I get the same thing here but I disabled it by right clicking the language icon in the taskbar. Configure > Configure Layout. Uncheck the option that says: OSD on layout change. And you are good to go. No need to alter the shortcut, or do any scripting.enter image description here

I hope this helps.

0

It's a bug and not a typical behaviour. The popup disapears immediatelly after unpressing a shortcut, by default it's: super + space

It could be possible if you are using one key for switching a language, in my case it was right Shift
If you want a thrill it you can try to reproduce it:
gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['Shift_R']"

akpp
  • 171
  • 1
  • 5