0

I am trying to bind shortcuts for keyboard layouts. For example:

  • Shift+Alt+1 - change to US layout
  • Shift+Alt+2 - change to UA layout
  • Shift+Alt+3 - change to RU layout

instead of change it with Super+Space.

In Ubuntu I used to bind such shortcut to gsettings set org.gnome.desktop.input-sources current 1, but in opensuse it doesn't work.

It is possible to do somehow?

M0sTik
  • 1
  • 1
  • 3

1 Answers1

0

I have solved it with little trick.

I created script with such content (for each keyboard layout):

gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'ru')]" && gsettings set org.gnome.desktop.input-sources sources "[('xkb', 'us'), ('xkb', 'ru'), ('xkb', 'ua')]"

And bind custom shortcut that run this script.

This script changes list of layouts, left there only one layout, because of it system change layout, and then I change list of layout to initial state.

M0sTik
  • 1
  • 1
  • 3