Set font height in a host-specific way
This commit is contained in:
parent
ae1f3e3c6c
commit
13a412d81f
29
config.org
29
config.org
@ -54,6 +54,19 @@
|
|||||||
(setq use-package-always-ensure t)
|
(setq use-package-always-ensure t)
|
||||||
#+end_src
|
#+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
|
* Emacs Server
|
||||||
Start an Emacs server if one is not running already:
|
Start an Emacs server if one is not running already:
|
||||||
|
|
||||||
@ -98,13 +111,19 @@
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Font
|
** Font
|
||||||
I find serif fonts much nicer to read, so change the default face
|
I find serif fonts much nicer to read, so definitely change the
|
||||||
to a serif font:
|
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
|
#+begin_src emacs-lisp
|
||||||
(set-face-attribute 'default nil
|
(let ((font-height
|
||||||
:family "Courier 10 Pitch"
|
(pcase hostname
|
||||||
:height 100)
|
("mandarax" 115)
|
||||||
|
(_ 110))))
|
||||||
|
(set-face-attribute 'default nil
|
||||||
|
:family "Courier 10 Pitch"
|
||||||
|
:height font-height))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
I also like a little more line spacing than default, again makes
|
I also like a little more line spacing than default, again makes
|
||||||
|
Loading…
x
Reference in New Issue
Block a user