From 5216f41ddf542f3cebb530730b56bfb4acb9e7a8 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sun, 21 May 2017 11:07:50 +0200 Subject: Emacs: Don't set Linux fonts on Windows/WSL/X11 --- emacs/.emacs.d/init.org | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'emacs/.emacs.d') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 628c90ec..78c51e58 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -220,7 +220,8 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource (if (eq displays 1) (ap/set-fonts "Lekton" 20 "Lucida Grande" 16 t) (ap/set-fonts "Monaco" 14 "Lucida Grande" 14 nil 0.1)))) - ((eq window-system 'x) + ((and (eq window-system 'x) + (not (getenv "windows"))) (set-fontset-font "fontset-default" 'unicode (font-spec :name "Terminus" :size 14)) (ap/set-fonts "Fixed" 14 "Lucida" 14 nil)))) -- cgit 1.4.1 From e2cd7e8101cab293469deb21eb6758ba6b48a9dc Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 17:37:50 +0200 Subject: Emacs: Set fonts on Windows --- emacs/.emacs.d/init.org | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'emacs/.emacs.d') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index dbe38d64..a6aecc5a 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -229,7 +229,10 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource ((and (eq window-system 'x) (not (getenv "windows"))) (set-fontset-font "fontset-default" 'unicode (font-spec :name "Terminus" :size 18)) - (ap/set-fonts "Terminus" 18 "Lucida" 14 nil)))) + (ap/set-fonts "Terminus" 18 "Lucida" 14 nil)) + ((and (eq window-system 'x) + (getenv "windows")) + (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil)))) (ap/set-fonts-according-to-system)) #+END_SRC -- cgit 1.4.1 From d2347ab4129a975b226aaab0d1d3aba806c5a766 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 17:52:17 +0200 Subject: Emacs: Detect Windows even outside of zsh environment --- emacs/.emacs.d/init.org | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'emacs/.emacs.d') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index a6aecc5a..0719ad8c 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -18,6 +18,13 @@ Open Emacs with just a plain window. No graphics or messages, please! (remove-hook 'find-file-hooks #'vc-refresh-state) #+END_SRC +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)) +#+END_SRC + ** Compatibility #+BEGIN_SRC emacs-lisp @@ -227,12 +234,12 @@ because I manage those in my [[file:~/projects/dotfiles/tag-xresources/xresource (ap/set-fonts "Monaco" 16 "Lucida Grande" 16 t 0.2) (ap/set-fonts "Monoid" 12 "Helvetica Neue" 12 t 0.1)))) ((and (eq window-system 'x) - (not (getenv "windows"))) + (not (eq system-type 'gnu/linux/windows))) (set-fontset-font "fontset-default" 'unicode (font-spec :name "Terminus" :size 18)) (ap/set-fonts "Terminus" 18 "Lucida" 14 nil)) ((and (eq window-system 'x) - (getenv "windows")) - (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil)))) + (eq system-type 'gnu/linux/windows)) + (ap/set-fonts "Noto Mono" 15 "Sans" 15 nil))) (ap/set-fonts-according-to-system)) #+END_SRC -- cgit 1.4.1 From f2f351569ffac639d5773d52f7482e77528eeb2c Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Thu, 1 Jun 2017 17:53:52 +0200 Subject: Emacs: Add missing paren --- emacs/.emacs.d/init.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'emacs/.emacs.d') diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 0719ad8c..070f48c2 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -239,7 +239,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" 15 "Sans" 15 nil)))) (ap/set-fonts-according-to-system)) #+END_SRC -- cgit 1.4.1