summaryrefslogtreecommitdiffstats
path: root/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'init.el')
-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