Mercurial > hg > xemacs
diff pers-init.el @ 29:e59705180efa laptop
device/frame stuff
author | ht |
---|---|
date | Wed, 16 May 2018 15:40:47 +0100 |
parents | 0e2183025318 |
children | 6324d06c5a32 |
line wrap: on
line diff
--- a/pers-init.el Tue Nov 28 11:08:51 2017 +0000 +++ b/pers-init.el Wed May 16 15:40:47 2018 +0100 @@ -420,30 +420,39 @@ (site-caseq (laptop (message (format "pw: %s" (device-pixel-width (selected-device)))))) (if (fboundp 'device-pixel-width) - (let ((pw (device-pixel-width (selected-device)))) + (let ((pw (device-pixel-width (selected-device))) + (ph (device-pixel-height (selected-device)))) (cond ((>= pw 1680) ;; we're on a big external monitor + (require 'font-menu) + (font-menu-set-font nil nil 10) (set-frame-pixel-size (selected-frame) 900 960) - (set-frame-position (selected-frame) -3 -20) - ((= (device-pixel-height (selected-device)) 768) - ;; we're on a narrow cinema-ratio laptop - (set-frame-pixel-size (selected-frame) 690 710) - (set-frame-position (selected-frame) -5 -26)) - ((= (device-pixel-height (selected-device)) 900) - ;; we're on a cinema-ratio laptop - (set-frame-pixel-size (selected-frame) 800 820) - (set-frame-position (selected-frame) -3 -20)) - ((= pw 1600) - ;; we're on a big external monitor - (set-frame-pixel-size (selected-frame) 900 1120) - (set-frame-position (selected-frame) -3 -20)) - ((= pw 1280) - (cond ((eq (device-pixel-height) 720) - (set-frame-pixel-size (selected-frame) 700 655) - (set-frame-position (selected-frame) -3 -30)) - (t - (set-frame-pixel-size (selected-frame) 700 960) - (set-frame-position (selected-frame) -3 -20))))))))) + (set-frame-position (selected-frame) -3 -20)) + ((= pw 1097) + ;; we're on an XPS 13 + (require 'font-menu) + (font-menu-set-font nil nil 9) + (set-frame-pixel-size (selected-frame) 583 583); 39 x 80 + (set-frame-position (selected-frame) -5 -26)) + ((= ph 768) + ;; we're on a narrow cinema-ratio laptop + (set-frame-pixel-size (selected-frame) 690 710) + (set-frame-position (selected-frame) -5 -26)) + ((= ph 900) + ;; we're on a cinema-ratio laptop + (set-frame-pixel-size (selected-frame) 800 820) + (set-frame-position (selected-frame) -3 -20)) + ((= pw 1600) + ;; we're on a big external monitor + (set-frame-pixel-size (selected-frame) 900 1120) + (set-frame-position (selected-frame) -3 -20)) + ((= pw 1280) + (cond ((= ph 720) + (set-frame-pixel-size (selected-frame) 700 655) + (set-frame-position (selected-frame) -3 -30)) + (t + (set-frame-pixel-size (selected-frame) 700 960) + (set-frame-position (selected-frame) -3 -20)))))))) (ht-custom-size)