feat(support): define replace-popup-rule!
This commit is contained in:
parent
d9be76416f
commit
2121324a54
1 changed files with 22 additions and 5 deletions
27
config.org
27
config.org
|
|
@ -857,6 +857,24 @@ If IMPURE is t, then allow impure builds."
|
||||||
path))
|
path))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
** Popup Rules
|
||||||
|
|
||||||
|
#+call: confpkg("Support: Popup")
|
||||||
|
|
||||||
|
Doom Emacs has a system to tame secondary windows called the /popup system/. To use the popup system, the config can set rules to match certain buffers and automatically place them in convenient locations as they pop up, or set other nice properties, such as removing the modeline for a cleaner look.
|
||||||
|
|
||||||
|
Doom also includes its own default popup rules. Most of these are inoffensive, but there are some that I need to replace with my own. This function does that by deleting the default rules from the alist where they are stored, ~+popup--display-buffer-alist~.
|
||||||
|
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(defun replace-popup-rule! (predicate &rest args)
|
||||||
|
"Remove the popup rule with the predicate PREDICATE and replace it with this one.
|
||||||
|
|
||||||
|
See `set-popup-rule!' for the arguments this function should take."
|
||||||
|
(setq +popup--display-buffer-alist
|
||||||
|
(assoc-delete-all predicate +popup--display-buffer-alist))
|
||||||
|
(apply #'set-popup-rule! predicate args))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Doom Modules
|
* Doom Modules
|
||||||
|
|
||||||
One of Doom Emacs's most useful features is its modular configuration system, allowing configuration code to be sectioned into modules that can be enabled or customized individually. Doom provides a full suite of prewritten modules to enable.
|
One of Doom Emacs's most useful features is its modular configuration system, allowing configuration code to be sectioned into modules that can be enabled or customized individually. Doom provides a full suite of prewritten modules to enable.
|
||||||
|
|
@ -2347,10 +2365,9 @@ I don't like the default placement of =undo-tree= on the left side of the window
|
||||||
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(after! undo-tree
|
(after! undo-tree
|
||||||
(setq undo-tree-visualizer-diff nil))
|
(setq undo-tree-visualizer-diff nil)
|
||||||
|
(replace-popup-rule! "^ \\*undo-tree\\*"
|
||||||
(set-popup-rule! "^ \\*undo-tree\\*"
|
:slot 2 :side 'right :size 30 :select t :quit nil))
|
||||||
:slot 2 :side 'right :size 30 :select t :quit nil)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** VTerm
|
** VTerm
|
||||||
|
|
@ -2715,7 +2732,7 @@ I use the standard Unix-style password management system, [[https://www.password
|
||||||
|
|
||||||
;; Move to right side
|
;; Move to right side
|
||||||
(after! pass
|
(after! pass
|
||||||
(set-popup-rule! "^\\*Password-Store" :side 'right :size 0.25 :quit nil))
|
(replace-popup-rule! "^\\*Password-Store" :side 'right :size 0.25 :quit nil))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Tweaks
|
*** Tweaks
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue