I'd like my Ubuntu to automatically switch my keyboard layout to English each time I lock the screen, so that I wouldn't have to do it manually each time to enter my password. How do I do that?
Also, I'd like that my keyboard layout also be English each time after I unlock the screen. Is it possible?
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()" && gnome-screensaver-command -l &
and make a keyboard shortcut to run that script. change inputSources[1] with your languages list starting from 0 – PRATAP Dec 29 '19 at 12:17