Created
December 6, 2012 15:12
-
-
Save sluchin/4225167 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; 画面の解像度によりフレームサイズを変化させる | |
(when window-system | |
(let ((height-gain)) | |
(cond ((>= (x-display-pixel-height) 900) | |
(setq height-gain 0.9)) | |
((>= (x-display-pixel-height) 768) | |
(setq height-gain 0.8)) | |
(t | |
(setq height-gain 0.7))) | |
(message "%f" height-gain) | |
(message "%f" (floor (/ (* (x-display-pixel-height) height-gain) | |
(frame-char-height)))) | |
(set-frame-size (selected-frame) | |
100 ; 幅は解像度に関係なく固定 | |
(floor (/ (* (x-display-pixel-height) height-gain) | |
(frame-char-height)))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment