Put grep down and make side windows not selectable with other-window
This commit is contained in:
parent
4a0eaa1f9b
commit
0cc4aad979
1 changed files with 17 additions and 1 deletions
|
|
@ -42,12 +42,28 @@
|
||||||
'(5 1 5 2)))
|
'(5 1 5 2)))
|
||||||
|
|
||||||
(add-to-list 'display-buffer-alist
|
(add-to-list 'display-buffer-alist
|
||||||
`("\\*Help\\*"
|
`("\\*Help"
|
||||||
(display-buffer-in-side-window)
|
(display-buffer-in-side-window)
|
||||||
(side . ,(if (equal system-type 'android) 'bottom 'right))
|
(side . ,(if (equal system-type 'android) 'bottom 'right))
|
||||||
(slot . ,(if (equal system-type 'android) 0 4))
|
(slot . ,(if (equal system-type 'android) 0 4))
|
||||||
(window-height . 0.2)))
|
(window-height . 0.2)))
|
||||||
|
|
||||||
|
(add-to-list 'display-buffer-alist
|
||||||
|
`("\\*grep\\*"
|
||||||
|
(display-buffer-in-side-window)
|
||||||
|
(side . bottom)
|
||||||
|
(slot . 1)))
|
||||||
|
|
||||||
|
(defun mark-side-window-as-no-other (orig-fun &rest args)
|
||||||
|
"Set `no-other-window' to t for any window being displayed as a side window."
|
||||||
|
(let ((window (apply orig-fun args)))
|
||||||
|
(when (window-live-p window)
|
||||||
|
(set-window-parameter window 'no-other-window t))
|
||||||
|
window))
|
||||||
|
|
||||||
|
(advice-add 'display-buffer-in-side-window :around #'mark-side-window-as-no-other)
|
||||||
|
|
||||||
|
(setq windmove-allow-all-windows t)
|
||||||
(provide 'window-utils)
|
(provide 'window-utils)
|
||||||
|
|
||||||
;;; window-utils.el ends here
|
;;; window-utils.el ends here
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue