Reputation: 473
I would like to set up Emacs to maximize (or specific size) and split my window horizontally into three equally sized frames on start up.
I have found other questions that are similar but not quite, Q1 and Q2.
Thank you.
EDIT: Maximize, not fullscreen.
Upvotes: 3
Views: 601
Reputation: 5877
Okay here is what I come up, There will be more elegant way to it. Nonetheless this does you want.
(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
Upvotes: 1
Reputation: 9262
To have equally sized windows you can use the command balance-windows
(bound to C-x +
for interactive use).
Upvotes: 6