3D size windows in Emacs at startup

I would like to configure Emacs to maximize (or a specific size) and split my window horizontally into three frames of the same size at startup.

I found other questions similar, but not quite, to Q1 and Q2 .

Thank.

EDIT: Maximize, not fullscreen.

+3
source share
2 answers

To have windows with the same size, you can use the command balance-windows(attached to C-x +for interactive use).

+6
source

Well, that’s what I came up with. There will be a more elegant way. Nevertheless, you need it.

  (defun split-windows-even-3 ()
    "split into 3 evenly"
    (interactive)
    (save-excursion
      (let ((ps (window-width)))
        (split-window-horizontally (/ ps 3))
        (other-window 1)
        (split-window-horizontally (/ ps 3)))))

  ;;; ADD HOOKS to startup
  ;;  split three
  (add-hook 'emacs-startup-hook 'split-windows-even-3)

  ;; Fullscreen 
  (add-hook 'emacs-startup-hook (lambda ()
                                  (set-frame-parameter nil 'fullscreen 'fullboth)))

UPDATE: now its working emacs23 and emacs24

+1
source

All Articles