From e010a47e659c2885b60ec9b304b59a5505a75d96 Mon Sep 17 00:00:00 2001 From: Ravi R Kiran Date: Thu, 25 May 2017 20:11:00 -0700 Subject: Ergodox pass-through via RDP+XMing diff --git a/init.el b/init.el index 6634d80..216f4e6 100644 --- a/init.el +++ b/init.el @@ -71,20 +71,31 @@ (use-package dash :ensure t) (require 's) (require 'ravi-ergodox-mode) -(if (s-contains? "Ergodox" (shell-command-to-string "xinput")) +(let* ((xinput-string (shell-command-to-string "xinput")) + (xorg-ergodox (s-contains? "Ergodox" xinput-string)) + (under-xming (or xorg-ergodox + (s-contains? "vendor string: Colin Harrison" + (shell-command-to-string "xdpyinfo"))))) + (if (or xorg-ergodox under-xming) + (progn + (ravi-ergodox-mode) + (diminish 'ravi-ergodox-mode) + (unless xorg-ergodox + ;; We are in Windows remote desktop with XMing + (setq x-meta-keysym 'meta) + (setq x-super-keysym 'super) + (setq x-alt-keysym 'hyper) + (setq x-hyper-keysym 'alt))) (progn - (ravi-ergodox-mode) - (diminish 'ravi-ergodox-mode)) - (progn - ;; Temporary key-bindings - (if (and (boundp 'ravi/use-helm-instead-of-ido) ravi/use-helm-instead-of-ido) + ;; Temporary key-bindings + (if (and (boundp 'ravi/use-helm-instead-of-ido) ravi/use-helm-instead-of-ido) + (progn + (bind-key "" 'helm-find-files) + (bind-key "" 'helm-mini)) (progn - (bind-key "" 'helm-find-files) - (bind-key "" 'helm-mini)) - (progn - (bind-key "" 'ido-find-file) - (bind-key "" 'ido-switch-buffer))) - (bind-key "" 'undo-tree-undo))) + (bind-key "" 'ido-find-file) + (bind-key "" 'ido-switch-buffer))) + (bind-key "" 'undo-tree-undo)))) (use-package free-keys :ensure t -- cgit v0.10.1