Created
July 1, 2019 10:33
-
-
Save tazjin/a95bde12429e2c583ee41a1643f898fb to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun set-xkb-layout (layout) | |
"Set the current X keyboard layout." | |
(shell-command (format "setxkbmap %s" layout)) | |
(message "Set X11 keyboard layout to '%s'" layout)) | |
(-map | |
(lambda (pair) | |
(exwm-input-set-key | |
(kbd (format "s-%s" (cadr pair))) | |
`(lambda () (interactive) (set-xkb-layout ,(car pair))))) | |
'(("no" "k n") | |
("no" "л т") | |
("ru" "k r") | |
("ru" "л к") | |
("us" "k u") | |
("us" "л г"))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment