mina86 / auto-dim-other-buffers.el

Visually makes non-selected windows less prominent
GNU General Public License v3.0
93 stars 13 forks source link

Don't Dim Helm Menus #29

Closed rnikoopour closed 3 years ago

rnikoopour commented 3 years ago

Hello,

Would it be possible to not dim the menu's created by Helm?

For example it'd be nice if using helm-M-x dimmed everything but the minibuffer and the helm completion menu.

I haven't started digging into how to achieve this, but I'd be happy to contribute.

mina86 commented 3 years ago

There’s an auto-dim-other-buffers-never-dim-buffer-functions hook which can be used for that. I’ve never used helm but the following might work:

;; Never dim helm menu buffers, i.e. buffers whose name starts
;; with "*helm"
(defun mpn-never-dim-helm (buf)
  (string-prefix-p "*helm" (buffer-name buf)))
(add-hook 'auto-dim-other-buffers-never-dim-buffer-functions
          #'mpn-never-dim-helm)
rnikoopour commented 3 years ago

Awesome that definitely works.

If you're open to it I'd like to submit an MR to expose this more readily through auto-dim-other-buffers by exposing (defcustom auto-dim-other-buffers-ignore-helm...

If not feel free to close this issue :D Thanks for the help

mina86 commented 3 years ago

To be honest I’d rather not end up having dozens of auto-dim-other-buffers-ignore-foo variables. For example Magit has similar issue from what I understand and it would end up needing another customise. And there are likely many more examples. It’d be great if the defaults worked for majority of cases, but I’d prefer something that doesn’t fan out so much.