summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi R Kiran <aine.marina@gmail.com>2017-05-26 03:11:00 (GMT)
committerRavi R Kiran <aine.marina@gmail.com>2017-05-26 03:11:00 (GMT)
commite010a47e659c2885b60ec9b304b59a5505a75d96 (patch)
tree1a7df9d3836e80a6ab4a92061b88596c3e86a01d
parent56f0a635db31f90f7b103d3c76340a1b01de34ab (diff)
downloaddotemacs-e010a47e659c2885b60ec9b304b59a5505a75d96.zip
dotemacs-e010a47e659c2885b60ec9b304b59a5505a75d96.tar.gz
dotemacs-e010a47e659c2885b60ec9b304b59a5505a75d96.tar.bz2
Ergodox pass-through via RDP+XMing
-rw-r--r--init.el35
1 files changed, 23 insertions, 12 deletions
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 "<f9>" 'helm-find-files)
+ (bind-key "<f8>" 'helm-mini))
(progn
- (bind-key "<f9>" 'helm-find-files)
- (bind-key "<f8>" 'helm-mini))
- (progn
- (bind-key "<f9>" 'ido-find-file)
- (bind-key "<f8>" 'ido-switch-buffer)))
- (bind-key "<f12>" 'undo-tree-undo)))
+ (bind-key "<f9>" 'ido-find-file)
+ (bind-key "<f8>" 'ido-switch-buffer)))
+ (bind-key "<f12>" 'undo-tree-undo))))
(use-package free-keys
:ensure t