Skip to content

Instantly share code, notes, and snippets.

@offby1
Created August 5, 2015 02:44
Show Gist options
  • Save offby1/2424df91182a9d6acaf1 to your computer and use it in GitHub Desktop.
Save offby1/2424df91182a9d6acaf1 to your computer and use it in GitHub Desktop.
(when (eq window-system 'ns)
(global-set-key (kbd "M-`") 'other-frame)
(defun set-appropriate-font (frame)
(interactive "i")
(setq frame (or frame (selected-frame)))
(cl-flet ((points (pix) (+ 20 (round (- pix 1440) 200 ))))
(set-frame-font
(format "Inconsolata-%s" (points (display-pixel-height)))
nil
(list frame))))
(global-set-key (kbd "<f3>") 'set-appropriate-font)
(set-appropriate-font (selected-frame))
(add-to-list 'after-make-frame-functions 'set-appropriate-font)
(add-to-list 'after-make-frame-functions 'wob t))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment