Can Plank dock be used to switch between keyboard layouts?


Plank can display folder contents as a stack.

The idea is to create a desktop file for each command to select a given keyboard layout.

The command is something like

setxkbmap us


setxkbmap us intl

Change us with the desired language and intl with variant if necessary.

(for example, for French it should be setxkbmap fr. A list of all possible keyboard layouts and other parameters can be found in: /usr/share/X11/xkb/rules/xorg.lst.)

The desktop file should be like so

[Desktop Entry]
Name=Keyboard US International dead Keys
Exec=setxkbmap us intl

So, create separate such desktop files for each keyboard layout you need and copy all those in a folder (let's say it is called MyKB).

To add the folder to Plank drag-and-drop should work.

If not, go to ~/.config/plank/dock1/launchers (dock1 may vary depending on the number of docks) and create a new .dockitem file with these lines


enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy