forked from bbatsov/prelude
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Caleb Epstein
committed
Jul 16, 2014
1 parent
88ec0c8
commit d802311
Showing
3 changed files
with
23 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(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 140)) | ||
(add-to-list 'default-frame-alist (cons 'width 80))) | ||
;; 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) 350) | ||
(frame-char-height))))))) | ||
|
||
(set-frame-size-according-to-resolution) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(load-theme 'wheatgrass) |