comparison pers-init.el @ 28:0e2183025318 laptop

parens???
author ht
date Tue, 28 Nov 2017 11:08:51 +0000
parents 5d2492e352cc
children e59705180efa
comparison
equal deleted inserted replaced
27:803e4156c7a0 28:0e2183025318
416 (user-home-directory) 416 (user-home-directory)
417 (getenv "HOME"))) 417 (getenv "HOME")))
418 (defun ht-custom-size () 418 (defun ht-custom-size ()
419 (interactive) 419 (interactive)
420 (site-caseq (laptop 420 (site-caseq (laptop
421 (message (format "pw: %s" (device-pixel-width (selected-device)))) 421 (message (format "pw: %s" (device-pixel-width (selected-device))))))
422 (if (fboundp 'device-pixel-width) 422 (if (fboundp 'device-pixel-width)
423 (let ((pw (device-pixel-width (selected-device)))) 423 (let ((pw (device-pixel-width (selected-device))))
424 (cond ((>= pw 1680) 424 (cond ((>= pw 1680)
425 ;; we're on a big external monitor 425 ;; we're on a big external monitor
426 (set-frame-pixel-size (selected-frame) 900 960) 426 (set-frame-pixel-size (selected-frame) 900 960)
427 (set-frame-position (selected-frame) -3 -20) 427 (set-frame-position (selected-frame) -3 -20)
428 ((= (device-pixel-height (selected-device)) 768) 428 ((= (device-pixel-height (selected-device)) 768)
429 ;; we're on a narrow cinema-ratio laptop 429 ;; we're on a narrow cinema-ratio laptop
430 (set-frame-pixel-size (selected-frame) 690 710) 430 (set-frame-pixel-size (selected-frame) 690 710)
431 (set-frame-position (selected-frame) -5 -26)) 431 (set-frame-position (selected-frame) -5 -26))
432 ((= (device-pixel-height (selected-device)) 900) 432 ((= (device-pixel-height (selected-device)) 900)
433 ;; we're on a cinema-ratio laptop 433 ;; we're on a cinema-ratio laptop
434 (set-frame-pixel-size (selected-frame) 800 820) 434 (set-frame-pixel-size (selected-frame) 800 820)
435 (set-frame-position (selected-frame) -3 -20)) 435 (set-frame-position (selected-frame) -3 -20))
436 ((= pw 1600) 436 ((= pw 1600)
437 ;; we're on a big external monitor 437 ;; we're on a big external monitor
438 (set-frame-pixel-size (selected-frame) 900 1120) 438 (set-frame-pixel-size (selected-frame) 900 1120)
439 (set-frame-position (selected-frame) -3 -20)) 439 (set-frame-position (selected-frame) -3 -20))
440 ((= pw 1280) 440 ((= pw 1280)
441 (cond ((eq (device-pixel-height) 720) 441 (cond ((eq (device-pixel-height) 720)
442 (set-frame-pixel-size (selected-frame) 700 655) 442 (set-frame-pixel-size (selected-frame) 700 655)
443 (set-frame-position (selected-frame) -3 -30)) 443 (set-frame-position (selected-frame) -3 -30))
444 (t 444 (t
445 (set-frame-pixel-size (selected-frame) 700 960) 445 (set-frame-pixel-size (selected-frame) 700 960)
446 (set-frame-position (selected-frame) -3 -20)))))))))) 446 (set-frame-position (selected-frame) -3 -20)))))))))
447 447
448 (ht-custom-size) 448 (ht-custom-size)
449 449
450 ;;; make dired list directories first 450 ;;; make dired list directories first
451 (defadvice dired-insert-directory (before my-dired-insert-directory 451 (defadvice dired-insert-directory (before my-dired-insert-directory