Skip to content

Instantly share code, notes, and snippets.

@rawsyntax
Created June 17, 2011 18:50
Show Gist options
  • Save rawsyntax/1032030 to your computer and use it in GitHub Desktop.
Save rawsyntax/1032030 to your computer and use it in GitHub Desktop.
function that sets the gui up just like I like it
;;default display position/size based on display resolution
;;warning: assumption that the 24/22 " displays are oriented
;; above the laptop's display
;; Haven't found a way to check multiple monitor
;; relative orientation via emacs yet...
;; NOTE: try integrating with applescript for this?
(defun reset-ui ()
(interactive)
(delete-other-windows)
(color-theme-merbivore)
(set-cursor-color "deeppink")
(set-face-background 'modeline-inactive "gray10")
(set-face-background 'hl-line "gray20")
(cond
((= 1050 (display-pixel-height)); 22" display
(set-frame-size (selected-frame) 165 71)
(set-frame-position (selected-frame) 0 -1050))
((= 1200 (display-pixel-height)); 24" display
(set-frame-size (selected-frame) 165 78)
(set-frame-position (selected-frame) 0 -1200))
(t ; laptop runs 1440x900
(set-frame-size (selected-frame) 165 53)
(set-frame-position (selected-frame) 150 0)))
(split-window-horizontally))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment