![]() ![]() Present keyboard layouts and options: $ gsettings list-recursively -sources Using gsettings in 18.04+ with Gnome, you can both add keyboard layouts and switch between them from the command line or from the keyboard layout switcher on the desktop. To do that, you only need wrap it into a script hooking to dbus-monitor like discussed here. This was precisely my goal, so here's the answer: Right before my screensaver turns on, I want to switch to English so that it will be easy to type my password when I get back in. Then xkb-switch would only let you switch between the layouts in current group. Options=grp_led:scroll,grp:rwin_switch,compose:menu,lv3:ralt_switch, it is set to less than the total number of layouts listed in LayoutList), like this: LayoutList=us,ua,th,de If your ~/.config/kxkbrc uses LayoutLoopCount (e.g. ![]() This looks better than the other solutions because setxkbmap ruins all options, and setxkbmap -layout, while it preserves the options, it still fails to change the taskbar indicator nor the grp_led if set. $ xkb-switch -s us # switch to a named group Just tested it with Ubuntu 16.04.4 LTS and it works flawelessly. There seems to be no standard CLI tool, but xkb-switch is a small open-source tool to do the job.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |