(require 'use-package) (use-package evil-xkbswitch :if (featurep 'ns) :load-path "path/to/evil-xkbswitch/" :diminish evil-xkbswitch-mode :config (evil-xkbswitch-mode 1))
Remove ~:load-path~ if install via =package.el=.
** Doom emacs
(package! evil-xkbswitch :recipe (:host github :repo "linktohack/evil-xkbswitch"))
Configuration On Linux you may need to adjust US layout name. You can look it up with =xkb-switch -l=.
Limit Working under OS X and Linux for now, =xkb= version should take little to no modification. Despite the name Windows support is also feasible.
Binary For OS X =issw= can be got and compiled from [[https://github.com/vovkasm/input-source-switcher][here]] For Linux =xkb-switch= can be got and compiled from [[https://github.com/grwlf/xkb-switch][here]] or installed from AUR (if Arch Linux):
yay -S xkb-switch
** For GNOME Use [[https://github.com/lyokha/g3kb-switch][g3kb-switch]]. With GNOME 41 and newer you will also need to install and enable G3kbSwitch GNOME Shell extension. On Arch Linux (installs program and extension):
yay -S g3kb-switch
You will also need to customize those variables in your config:
(setq evil-xkbswitch-set-layout "g3kb-switch -s") (setq evil-xkbswitch-get-layout "g3kb-switch")
Contributors Thanks
[[https://github.com/Layerex][@Layerex]] for various improvment
License MIT