swdev
swdev

Reputation: 5147

How can I start Emacs with predefined window?

Is there a way to make my Emacs start with predefined frame as my attached screenshot? I am not familiar enough how to do it in my .emacs script...

Emacs with three frame

It is as simple as doing :

  1. split-window-horizontally (create two window side by side)
  2. split-window-vertically (split the first window in the left into two part).

And in the last window, I want it to upload a calendar. I make this arrangement mostly because my monitor have a broken LCD in the left part of it. So my code must be in the right side of the screen :)

EDIT 1 Based on Juanleon answer, I add another eshell window + open a specific *.org file (which is my assumption should I start emacs for project work) :

;my preferred working space                                                                                                                                                                                                       
(find-file "docs/steps.org")
(split-window-horizontally)
(other-window 1)
(calendar)
(other-window 2) ;main code                                                                                                                                                                                                       
(split-window-vertically)
(other-window 1)
(eshell)
(other-window 2)

Resulting this visual : enter image description here

Upvotes: 3

Views: 457

Answers (1)

juanleon
juanleon

Reputation: 9370

Put that at the end of your init file:

    (split-window-horizontally)
    (other-window 1)
    (calendar)
    (other-window 1)

Upvotes: 3

Related Questions