1

Everytime I change an input language using grave accent key it doesnt change instantly. There will be a popup of languages to choose between and I have to hit enter to apply the change. How do I change input language in 1 click without having to confirm it? The screenshot of the problem is attached here

enter image description here

PRATAP
  • 22,460

1 Answers1

-2
#!/bin/bash

CURRENT=`gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().currentSource.index"`

if [ "$CURRENT" == "(true, '1')" ]; then
  gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[0].activate()"
else
  gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[1].activate()"
fi
user68186
  • 33,360
  • Welcome to Ask Ubuntu. I am happy that you found a solution to your question and posted the answer so that it will help others. Please explain what this code does, and how and where to save it, how to use it. – user68186 Jun 29 '21 at 15:19