From 5d8a4d73db4cb9c514f77ae345625c40f6fabcad Mon Sep 17 00:00:00 2001 From: fpi Date: Mon, 9 Mar 2020 16:57:41 +0100 Subject: Add basic window rules with display-buffer-alist --- emacs-init.org | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/emacs-init.org b/emacs-init.org index 75f5127..750ebb1 100644 --- a/emacs-init.org +++ b/emacs-init.org @@ -1421,6 +1421,33 @@ on the amount of displayed text. (fit-window-to-buffer-horizontally t) :bind (:map fpi-map ("s" . fit-window-to-buffer))) #+end_src +*** Window rules +#+begin_src emacs-lisp +(use-package window + :init + (setq display-buffer-alist + '( + ("\\*\\(Backtrace\\|Warnings\\|Compile-Log\\|Messages\\)\\*" + (display-buffer-in-side-window) + (window-height . 0.16) + (side . top) + (slot . 0) + (window-parameters . ((no-other-window t)))) + (".*\\*Completions.*" + (display-buffer-in-side-window) + (window-height . 0.16) + (side . bottom) + (slot . 0)) + ("\\*Help.*" + (display-buffer-in-side-window) + (window-width . 0.2) + (side . left) + (slot . 0) + (window-parameters . ((no-other-window . t) + (mode-line-format . (" " + mode-line-buffer-identification))))) + ))) +#+end_src *** window-numbering This is a nice package for easy window focus switching. I prefer it over =windmove=, as it does not interfere with org keybindings. -- cgit v1.2.3