summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--emacs/.emacs.d/init.org15
1 files changed, 11 insertions, 4 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org
index 4917c4b..1529a6d 100644
--- a/emacs/.emacs.d/init.org
+++ b/emacs/.emacs.d/init.org
@@ -21,8 +21,11 @@ Open Emacs with just a plain window.  No graphics or messages, please!
 Are we running on Windows via the WSL?
 
 #+BEGIN_SRC emacs-lisp
-(when (string-match "Microsoft$" (file-to-string "/proc/sys/kernel/osrelease"))
-    (setq system-type 'gnu/linux/windows))
+(with-temp-buffer
+  (insert-file-contents-literally "/proc/sys/kernel/osrelease")
+  (decode-coding-region (point-min) (point-max) 'utf-8 t)
+  (when (string-match "Microsoft$" (buffer-string))
+    (setq system-type 'gnu/linux/windows)))
 #+END_SRC
 
 ** Compatibility
@@ -242,7 +245,7 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource
       (ap/set-fonts "Terminus" 18 "Lucida" 14 nil))
      ((and (eq window-system 'x)
            (eq system-type 'gnu/linux/windows))
-      (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil))))
+      (ap/set-fonts "Noto Mono" 12 "Sans" 12 nil))))
 
   (ap/set-fonts-according-to-system))
 #+END_SRC
@@ -399,9 +402,13 @@ read them automatically any more.  So, let’s use the
 [[https://github.com/purcell/exec-path-from-shell][exec-path-from-shell]] package to set up ~exec-path~ and similar
 variables from whatever my shell configuration is.
 
+On Windows, I like to run Emacs from the system tray menu of VcXsrv.
+It starts up without an environment in this case as well.
+
 #+BEGIN_SRC emacs-lisp
 (use-package exec-path-from-shell
-  :if (eq system-type 'darwin)
+  :if (or (eq system-type 'darwin)
+          (eq system-type 'gnu/linux/windows))
   :config (progn
             (setq exec-path-from-shell-arguments '("-l"))
             (exec-path-from-shell-initialize)))