Set font height in a host-specific way
This commit is contained in:
parent
ae1f3e3c6c
commit
13a412d81f
25
config.org
25
config.org
@ -54,6 +54,19 @@
|
||||
(setq use-package-always-ensure t)
|
||||
#+end_src
|
||||
|
||||
** Hostname
|
||||
It's useful to have the short hostname available in case we want to
|
||||
configure something differently on certain machines. The full
|
||||
hostname can be retrieved with [[help:system-name][system-name]], but this has the local
|
||||
domain on the end; we want to cut that off.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(defun cut-at (delimeter string)
|
||||
(substring string 0 (string-search delimeter string)))
|
||||
|
||||
(defvar hostname (cut-at "." (system-name)))
|
||||
#+end_src
|
||||
|
||||
* Emacs Server
|
||||
Start an Emacs server if one is not running already:
|
||||
|
||||
@ -98,13 +111,19 @@
|
||||
#+end_src
|
||||
|
||||
** Font
|
||||
I find serif fonts much nicer to read, so change the default face
|
||||
to a serif font:
|
||||
I find serif fonts much nicer to read, so definitely change the
|
||||
default face to a serif font. Font size seems inconsistent across
|
||||
different systems for some reason, so need to determine the font
|
||||
height based off the hostname.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(let ((font-height
|
||||
(pcase hostname
|
||||
("mandarax" 115)
|
||||
(_ 110))))
|
||||
(set-face-attribute 'default nil
|
||||
:family "Courier 10 Pitch"
|
||||
:height 100)
|
||||
:height font-height))
|
||||
#+end_src
|
||||
|
||||
I also like a little more line spacing than default, again makes
|
||||
|
Loading…
x
Reference in New Issue
Block a user