Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dimme background instead of foreground. #20

Closed
4goodapp opened this issue Mar 12, 2019 · 10 comments
Closed

dimme background instead of foreground. #20

4goodapp opened this issue Mar 12, 2019 · 10 comments
Assignees
Labels
enhancement new feature requested

Comments

@4goodapp
Copy link

Is it possible to dimme the background (to be darker or lighter) instead of dimming the text/foreground?

There is this package auto-dim-other-buffers.el that does that but you have to chose one unique background color instead of a darker/lighter background of the current theme's. So when you change theme, things don't look good. and there is no way to change the dimme level with it.

@gonewest818
Copy link
Owner

I seem to remember looking at this when I first wrote the package, and the challenge was exactly as you describe... what's the best way to mathematically compute a darker (or lighter) background color that is consistent with the rest of theme? At the time I wasn't able to come up with anything I liked.

@gonewest818 gonewest818 added the enhancement new feature requested label Nov 16, 2019
@gonewest818 gonewest818 self-assigned this Dec 2, 2019
@gonewest818
Copy link
Owner

This is a new feature on the master branch, will be picked up in MELPA in the next few hours whenever the next auto-build runs. Give it a try and see what you think?

@4goodapp
Copy link
Author

4goodapp commented Dec 3, 2019

Will test it once available on MELPA. Thanks.

@4goodapp
Copy link
Author

4goodapp commented Dec 3, 2019

It's working perfectly as expected 👍

I however use (setq dimmer-fraction 0.08) instead of (setq dimmer-fraction 0.3) with dimmer-adjustment-mode set to :background.

(use-package dimmer
  :config
  (setq dimmer-adjustment-mode :background)
  (setq dimmer-exclusion-regexp "^\\*helm.*\\|^ \\*Minibuf-.*")
  (setq dimmer-fraction 0.08)
  (dimmer-mode)
  )

@gonewest818
Copy link
Owner

Great! Yes, I agree, the background adjustment feels more aggressive than the foreground.

Note that the Minibuffer is now excluded by default and the dimmer-exclusion-regexp variable is now obsolete. In your case you can simplify your use-package setup like this:

(use-package dimmer
  :config
  (setq dimmer-adjustment-mode :background)
  (setq dimmer-fraction 0.08)
  (dimmer-configure-helm)
  (dimmer-mode t))

@4goodapp
Copy link
Author

4goodapp commented Dec 3, 2019

Yes, that, it's more aggressive.
I replaced helm with Ivy/counsel. So I think I can just comment that line.

Now let's suppose I want exclude certain buffer like *imenu-list*, How can I set it with dimmer-exclusion-regexp-list?

@gonewest818
Copy link
Owner

Try this:

(use-package dimmer
  :config
  (setq dimmer-adjustment-mode :background)
  (setq dimmer-fraction 0.08)
  (add-to-list 'dimmer-exclusion-regexp-list "^\\*imenu-list\\*$")
  (dimmer-mode t))

@4goodapp
Copy link
Author

4goodapp commented Dec 6, 2019

Perfect!

I think we need a dimmer-inclusion-regexp-listso that certain are always dimmed.

@gonewest818
Copy link
Owner

gonewest818 commented Dec 6, 2019 via email

@4goodapp
Copy link
Author

4goodapp commented Dec 6, 2019

Done #27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new feature requested
Projects
None yet
Development

No branches or pull requests

2 participants