Moving window placement around
This commit is contained in:
102
home.org
102
home.org
@@ -827,6 +827,61 @@ move backward / forward through history.
|
|||||||
"<right>" #'tab-bar-history-forward))
|
"<right>" #'tab-bar-history-forward))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
** Window Placement
|
||||||
|
This section contains rules about where ~display-buffer~ should place windows. I guess I'm currently
|
||||||
|
going for an IDE-style layout, with one main editor window, and auxiliary bottom and right side
|
||||||
|
windows. I place windows in the bottom or on the right mostly depending on how wide I expect their
|
||||||
|
content to be.
|
||||||
|
|
||||||
|
#+BEGIN_SRC elisp :noweb no :noweb-ref emacs_config
|
||||||
|
(cl-flet ((defbottom (&optional (slot 1))
|
||||||
|
(lambda (rule)
|
||||||
|
`(,rule
|
||||||
|
(display-buffer-reuse-window display-buffer-in-side-window)
|
||||||
|
(side . bottom)
|
||||||
|
(slot . ,slot)
|
||||||
|
(window-height . 0.33)
|
||||||
|
(window-parameters (no-delete-other-windows . t)))))
|
||||||
|
(defright (&optional (slot 0))
|
||||||
|
(lambda (rule)
|
||||||
|
`(,rule
|
||||||
|
(display-buffer-reuse-window display-buffer-in-side-window)
|
||||||
|
(side . right)
|
||||||
|
(slot . ,slot)
|
||||||
|
(window-width . 0.5)
|
||||||
|
(window-parameters (no-delete-other-windows . t)))))
|
||||||
|
(defall (def &rest rules)
|
||||||
|
(mapcar (lambda (rule) (funcall def rule)) rules)))
|
||||||
|
(let* ((bottom-window-params '((side . bottom)
|
||||||
|
(slot . 1)
|
||||||
|
(window-height . 0.33)
|
||||||
|
(window-parameters (no-delete-other-windows . t))))
|
||||||
|
(right-window-params '((side . right)
|
||||||
|
(window-width . 0.5)
|
||||||
|
(window-parameters (no-delete-other-windows . t))))
|
||||||
|
(right-window-slot-1-params (cons '(slot . 1) right-window-params)))
|
||||||
|
(setopt display-buffer-alist
|
||||||
|
(append
|
||||||
|
(defall (defbottom)
|
||||||
|
"\\*Flymake diagnostics *"
|
||||||
|
"\\*Embark Export *"
|
||||||
|
"\\*Embark Collect *"
|
||||||
|
"\\*xref*"
|
||||||
|
"\\*compilation\\*"
|
||||||
|
"\\*sly-mrepl *"
|
||||||
|
"\\*Messages\\*"
|
||||||
|
"\\*lispy-message\\*"
|
||||||
|
"\\*EGLOT connections\\*"
|
||||||
|
"\\*trace-output\\*"
|
||||||
|
"\\*occur\\*")
|
||||||
|
(defall (defright)
|
||||||
|
"magit: *"
|
||||||
|
"magit-revision: *"
|
||||||
|
"\\*eldoc\\*"
|
||||||
|
"\\*Help\\*")
|
||||||
|
(defall (defright -1)
|
||||||
|
"\\*Embark Actions\\*")))))
|
||||||
|
#+END_SRC
|
||||||
** Editing
|
** Editing
|
||||||
|
|
||||||
This configuration affects general text editing, across all modes. First, some packages:
|
This configuration affects general text editing, across all modes. First, some packages:
|
||||||
@@ -1171,53 +1226,6 @@ available? It seems to work for now anyway...
|
|||||||
'eglot-list-connections-mode-hook))
|
'eglot-list-connections-mode-hook))
|
||||||
(add-hook hook 'tab-line-mode))
|
(add-hook hook 'tab-line-mode))
|
||||||
|
|
||||||
(cl-flet ((defbottom (&optional (slot 1))
|
|
||||||
(lambda (rule)
|
|
||||||
`(,rule
|
|
||||||
(display-buffer-reuse-window display-buffer-in-side-window)
|
|
||||||
(side . bottom)
|
|
||||||
(slot . ,slot)
|
|
||||||
(window-height . 0.33)
|
|
||||||
(window-parameters (no-delete-other-windows . t)))))
|
|
||||||
(defright (&optional (slot 0))
|
|
||||||
(lambda (rule)
|
|
||||||
`(,rule
|
|
||||||
(display-buffer-reuse-window display-buffer-in-side-window)
|
|
||||||
(side . right)
|
|
||||||
(slot . ,slot)
|
|
||||||
(window-width . 0.5)
|
|
||||||
(window-parameters (no-delete-other-windows . t)))))
|
|
||||||
(defall (def &rest rules)
|
|
||||||
(mapcar (lambda (rule) (funcall def rule)) rules)))
|
|
||||||
(let* ((bottom-window-params '((side . bottom)
|
|
||||||
(slot . 1)
|
|
||||||
(window-height . 0.33)
|
|
||||||
(window-parameters (no-delete-other-windows . t))))
|
|
||||||
(right-window-params '((side . right)
|
|
||||||
(window-width . 0.5)
|
|
||||||
(window-parameters (no-delete-other-windows . t))))
|
|
||||||
(right-window-slot-1-params (cons '(slot . 1) right-window-params)))
|
|
||||||
(setopt display-buffer-alist
|
|
||||||
(append
|
|
||||||
(defall (defbottom)
|
|
||||||
"\\*Flymake diagnostics *"
|
|
||||||
"\\*Embark Export *"
|
|
||||||
"\\*Embark Collect *"
|
|
||||||
"\\*xref*"
|
|
||||||
"\\*compilation\\*"
|
|
||||||
"\\*sly-mrepl *"
|
|
||||||
"\\*Messages\\*"
|
|
||||||
"\\*lispy-message\\*"
|
|
||||||
"\\*EGLOT connections\\*"
|
|
||||||
"\\*trace-output\\*")
|
|
||||||
(defall (defright)
|
|
||||||
"magit: *"
|
|
||||||
"magit-revision: *"
|
|
||||||
"\\*eldoc\\*"
|
|
||||||
"\\*Help\\*")
|
|
||||||
(defall (defright -1)
|
|
||||||
"\\*Embark Actions\\*")))))
|
|
||||||
|
|
||||||
(setq ediff-split-window-function 'split-window-horizontally)
|
(setq ediff-split-window-function 'split-window-horizontally)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user