You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
1.0 KiB
EmacsLisp
24 lines
1.0 KiB
EmacsLisp
2 years ago
|
(defvar config-display-buffer-gaps-width 20)
|
||
|
|
||
|
(defun config-display-buffer-which-side ()
|
||
|
(if (> (+ (frame-pixel-width) config-display-buffer-gaps-width) (/ (x-display-pixel-width) 2))
|
||
|
'right
|
||
|
'bottom))
|
||
|
|
||
|
(defun config-display-buffer-update-alist (_)
|
||
|
(let ((side (config-display-buffer-which-side)))
|
||
|
(setq display-buffer-alist `(("\\*Flymake diagnostics.*"
|
||
|
(display-buffer-in-side-window)
|
||
|
(side . ,side)
|
||
|
(window-height . 15)
|
||
|
(window-width . 75)
|
||
|
("\*Flycheck errors\*"
|
||
|
(display-buffer-in-side-window)
|
||
|
(side . ,side)
|
||
|
(window-height . 15)
|
||
|
(window-width . 75)))))))
|
||
|
|
||
|
(add-hook 'after-make-frame-functions 'config-display-buffer-update-alist)
|
||
|
|
||
|
(add-hook 'window-size-change-functions 'config-display-buffer-update-alist)
|