Skip to content

Commit

Permalink
[prot] Window splitting direction - remove separate helm settings
Browse files Browse the repository at this point in the history
  • Loading branch information
pkryger committed Jan 21, 2025
1 parent 7bebd02 commit 7ee0777
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 22 deletions.
9 changes: 3 additions & 6 deletions modules/init-helm.el
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,16 @@
(helm-split-window-default-side 'other)

(helm-split-width-threshold
(when (eq exordium-split-window-preffered-direction
'longest)
(when (eq exordium-split-window-preffered-direction 'longest)
split-width-threshold))

(helm-split-window-state
(if (memq exordium-split-window-preffered-direction
'(horizontal longest-horizontal))
(if (eq exordium-split-window-preffered-direction 'horizontal)
'horizontal
'vertical))

(helm-split-window-other-side-when-one-window
(if (memq exordium-split-window-preffered-direction
'(horizontal longest-horizontal))
(if (eq exordium-split-window-preffered-direction 'horizontal)
'right
'below))

Expand Down
10 changes: 1 addition & 9 deletions modules/init-prefs.el
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,6 @@ on the frame shape: in landscape orientation it will be like
`horizontal', but in portrait it will be like `vertical'.
Basically, the longest of the two dimension is split first.
When set `longest-vertical' or `longest-horizontal' then Helm
will use vertical/below or horizontal/right respectively for
window splitting.
If both `split-width-threshold' and `split-height-threshold'
cannot be satisfied, it will fallback to split vertically."
:group 'exordium
Expand All @@ -71,11 +67,7 @@ cannot be satisfied, it will fallback to split vertically."
(const :tag "Try to split horizontally first"
horizontal)
(const :tag "Try to split along the longest edge"
longest)
(const :tag "Try to split along the longest edge or vertically in Helm"
longest-vertical)
(const :tag "Try to split along the longest edge or horizontally in Helm"
longest-horizontal)))
longest)))

(defcustom exordium-line-mode t
"Whether the current line is highlighted or not."
Expand Down
9 changes: 2 additions & 7 deletions modules/init-window-manager.el
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,7 @@
(use-package window
:ensure nil
:custom
(split-window-preferred-direction
(if (memq exordium-split-window-preffered-direction
'(longest longest-vertical longest-horizontal))
'longest
exordium-split-window-preffered-direction))
(split-window-preferred-direction exordium-split-window-preffered-direction)
:functions (exordium--window-try-vertical-split
exordium--window-try-horizontal-split
exordium-split-window-sensibly)
Expand All @@ -61,8 +57,7 @@
(let ((window (or window (selected-window))))
(or (if (or
(eq exordium-split-window-preffered-direction 'horizontal)
(and (memq exordium-split-window-preffered-direction
'(longest longest-horizontal longest-vertical))
(and (eq exordium-split-window-preffered-direction 'longest)
(> (frame-width) (frame-height))))
(or (exordium--window-try-horizontal-split window)
(exordium--window-try-vertical-split window))
Expand Down

0 comments on commit 7ee0777

Please sign in to comment.