Created
May 18, 2014 23:14
-
-
Save zflat/bcbf07fa39acde3d6ce6 to your computer and use it in GitHub Desktop.
emacs initialization file ( ~/.emacs.d/init.el)
This file contains 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
;; Configure emacs | |
;; Set font | |
;; http://askubuntu.com/questions/23603/how-to-change-font-size-in-emacs | |
(set-face-attribute 'default nil :height 120) | |
;; disable splash screen | |
(load "~/elisp/autoloads" 'install) | |
(custom-set-variables | |
;; custom-set-variables was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
'(ecb-options-version "2.32") | |
'(inhibit-startup-screen t)) | |
;; current buffer name in title bar | |
(setq frame-title-format "%b") | |
;;;;;;;;;;;;; | |
;; Start emacs to fill the screen | |
;; http://stackoverflow.com/questions/92971/how-do-i-set-the-size-of-emacs-window | |
(defun set-frame-size-according-to-resolution () | |
(interactive) | |
(if window-system | |
(progn | |
;; use 120 char wide window for largeish displays | |
;; and smaller 80 column windows for smaller displays | |
;; pick whatever numbers make sense for you | |
(if (> (x-display-pixel-width) 1280) | |
(add-to-list 'default-frame-alist (cons 'width 120)) | |
(add-to-list 'default-frame-alist (cons 'width 100))) | |
;; for the height, subtract a couple hundred pixels | |
;; from the screen height (for panels, menubars and | |
;; whatnot), then divide by the height of a char to | |
;; get the height we want | |
(add-to-list 'default-frame-alist | |
(cons 'height (/ (- (x-display-pixel-height) 200) | |
(frame-char-height))))))) | |
(set-frame-size-according-to-resolution) | |
(custom-set-faces | |
;; custom-set-faces was added by Custom. | |
;; If you edit it by hand, you could mess it up, so be careful. | |
;; Your init file should contain only one such instance. | |
;; If there is more than one, they won't work right. | |
) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment