(setq split-width-threshold 100)
(setq split-height-threshold 60)
- (defun my/split-window-prefer-horizontally (window)
+ (defun my/split-window-prefer-vertically (window)
"If there's only one window (excluding any possibly active
minibuffer), then split the current window horizontally."
(if (and (one-window-p t)
(not (active-minibuffer-window))
- ( > (frame-width) (frame-height))
+ ( < (frame-width) (frame-height))
)
- (let ((split-height-threshold nil))
+ (let ((split-width-threshold nil))
(split-window-sensibly window))
(split-window-sensibly window)))
- (setq split-window-preferred-function #'my/split-window-prefer-horizontally)
+ (setq split-window-preferred-function #'my/split-window-prefer-vertically)
(setq window-combination-resize t)
#+END_SRC