Commits

kurtharriger committed 876b5b4

larger frame and font

Comments (0)

Files changed (2)

init.d/80-font.el

+(set-face-attribute 'default nil :height 160)

init.d/80-frame.el

-(require 'package)			
-(require 'frame-hooks)
-(require 'sr-speedbar)
+(require 'alpha)
 
-(dolist (p '(alpha color-theme-ir-black))
- (when (not (package-installed-p p))
-    (package-install p)))
+(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) 1440)
+           (add-to-list 'default-frame-alist (cons 'width 160))
+           (add-to-list 'default-frame-alist (cons 'width 120)))
+    ;; 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) 100)
+                             (frame-char-height)))))))
+
+(set-frame-size-according-to-resolution)
 
 
-(add-hook 'after-make-window-system-frame-hooks
-          '(lambda ()
-             (require 'alpha) ))