Mercurial > hg > xemacs
comparison pers-init.el @ 26:5d2492e352cc laptop
define ht-custom-size
author | ht |
---|---|
date | Wed, 22 Nov 2017 15:25:19 +0000 |
parents | 0e4eb9db8a93 |
children | 0e2183025318 |
comparison
equal
deleted
inserted
replaced
25:0e4eb9db8a93 | 26:5d2492e352cc |
---|---|
413 (site-caseq (laptop (defun system-name () "francis.markup.co.uk"))) | 413 (site-caseq (laptop (defun system-name () "francis.markup.co.uk"))) |
414 | 414 |
415 (cd (if (fboundp 'user-home-directory) | 415 (cd (if (fboundp 'user-home-directory) |
416 (user-home-directory) | 416 (user-home-directory) |
417 (getenv "HOME"))) | 417 (getenv "HOME"))) |
418 (site-caseq (laptop | 418 (defun ht-custom-size () |
419 (if (fboundp 'device-pixel-width) | 419 (interactive) |
420 (let ((pw (device-pixel-width (selected-device)))) | 420 (site-caseq (laptop |
421 (cond ((= pw 1680) | 421 (message (format "pw: %s" (device-pixel-width (selected-device)))) |
422 ;; we're on a big external monitor | 422 (if (fboundp 'device-pixel-width) |
423 (set-frame-pixel-size (selected-frame) 900 960) | 423 (let ((pw (device-pixel-width (selected-device)))) |
424 (set-frame-position (selected-frame) -3 -20)) | 424 (cond ((>= pw 1680) |
425 ((= (device-pixel-height (selected-device)) 768) | 425 ;; we're on a big external monitor |
426 ;; we're on a narrow cinema-ratio laptop | 426 (set-frame-pixel-size (selected-frame) 900 960) |
427 (set-frame-pixel-size (selected-frame) 690 710) | 427 (set-frame-position (selected-frame) -3 -20) |
428 (set-frame-position (selected-frame) -5 -26)) | 428 ((= (device-pixel-height (selected-device)) 768) |
429 ((= (device-pixel-height (selected-device)) 900) | 429 ;; we're on a narrow cinema-ratio laptop |
430 ;; we're on a cinema-ratio laptop | 430 (set-frame-pixel-size (selected-frame) 690 710) |
431 (set-frame-pixel-size (selected-frame) 800 820) | 431 (set-frame-position (selected-frame) -5 -26)) |
432 (set-frame-position (selected-frame) -3 -20)) | 432 ((= (device-pixel-height (selected-device)) 900) |
433 ((= pw 1600) | 433 ;; we're on a cinema-ratio laptop |
434 ;; we're on a big external monitor | 434 (set-frame-pixel-size (selected-frame) 800 820) |
435 (set-frame-pixel-size (selected-frame) 900 1120) | 435 (set-frame-position (selected-frame) -3 -20)) |
436 (set-frame-position (selected-frame) -3 -20)) | 436 ((= pw 1600) |
437 ((= pw 1280) | 437 ;; we're on a big external monitor |
438 (set-frame-pixel-size (selected-frame) 700 960) | 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) | |
441 (cond ((eq (device-pixel-height) 720) | |
442 (set-frame-pixel-size (selected-frame) 700 655) | |
443 (set-frame-position (selected-frame) -3 -30)) | |
444 (t | |
445 (set-frame-pixel-size (selected-frame) 700 960) | |
446 (set-frame-position (selected-frame) -3 -20)))))))))) | |
447 | |
448 (ht-custom-size) | |
440 | 449 |
441 ;;; make dired list directories first | 450 ;;; make dired list directories first |
442 (defadvice dired-insert-directory (before my-dired-insert-directory | 451 (defadvice dired-insert-directory (before my-dired-insert-directory |
443 (dir-or-list switches &optional wildcard full-p)) | 452 (dir-or-list switches &optional wildcard full-p)) |
444 (setq switches (concat switches " --group-directories-first"))) | 453 (setq switches (concat switches " --group-directories-first"))) |
521 jde-jdk '("1.6.0") | 530 jde-jdk '("1.6.0") |
522 jde-jdk-registry '(("1.6.0" . "/c/Program Files/Java/jdk1.6.0_23") | 531 jde-jdk-registry '(("1.6.0" . "/c/Program Files/Java/jdk1.6.0_23") |
523 ("1.5.0" . "/c/Program Files/j2sdk1.5.0")) | 532 ("1.5.0" . "/c/Program Files/j2sdk1.5.0")) |
524 fill-indent-according-to-mode t | 533 fill-indent-according-to-mode t |
525 ) | 534 ) |
535 (message (format "fh: %s" (frame-pixel-height (selected-frame)))) | |
536 |