# HG changeset patch # User ht # Date 1526481647 -3600 # Node ID e59705180efaf8bc8ab33b05e5a915041a65e9b9 # Parent 0e2183025318687b57854744bd92a6e2df264978 device/frame stuff diff -r 0e2183025318 -r e59705180efa pers-init.el --- 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)