In 2024, neither gsettings set org.gnome.desktop.input-sources current
, nor gdbus call … org.gnome.Shell.Eval …"
are working. They are deprecated. You could try to resurrect the Eval
with ramottamado/eval-gjs, but it is unsafe as well.
So, I've made my own GNOME Shell Extension and I'm sharing it with the world: Shyriiwook (also available @ GitHub: madhead/shyriiwook).
This is a very simple, minimalist extension. It doesn't have any GUI. After installing it, a new D-Bus interface would be exposed in your GNOME Shell session. You could query it for the current configuration or call a method to activate the desired layout:
$ gdbus introspect \
--session \
--dest org.gnome.Shell \
--object-path /me/madhead/Shyriiwook \
--only-properties
node /me/madhead/Shyriiwook {
interface me.madhead.Shyriiwook {
properties:
readonly as availableLayouts = ['us', 'de', 'jp'];
readonly s currentLayout = 'us';
};
};
$ gdbus call
--session
--dest org.gnome.Shell
--object-path /me/madhead/Shyriiwook
--method me.madhead.Shyriiwook.activate "de"
This is easily scriptable, and you can even put this command raw into a custom shortcut under the "Settings" → "Keyboard" → "Keyboard Shortcuts" → "View and Customise Shortcuts" → "Custom Shortcuts".
Set "X" KeyboardBoard Map is already for the U.I. we are talking about. And the console U.I. alternative of setxkbmap should be loadkeys. What do you mean by saying "Breaks the UI"
– Hilmi Erdem KEREN Oct 18 '12 at 14:08setxkbmap
this list is reset to include only the language you have just mentioned to setxkbmap. – Svarog Oct 18 '12 at 14:27IBus
. – saji89 Oct 21 '12 at 11:20