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

Blue background in iTerm on MacOS El Capitan #2

Closed
Marschelloss opened this issue Jun 3, 2016 · 6 comments
Closed

Blue background in iTerm on MacOS El Capitan #2

Marschelloss opened this issue Jun 3, 2016 · 6 comments

Comments

@Marschelloss
Copy link

I get the known blue background in any Terminal App on MacOS El Capitan (tested on multiple devices). $TERM is set to xterm-256color. In iTerm2 i also set the colorsheme to dracula but i still get the blue background.

Blue_Background

@apierz
Copy link
Contributor

apierz commented Jun 12, 2016

This is not a perfect solution, but it works fairly well.

comment out
(bg1 #282a36)

in the list of color definitions and add

(if (display-graphic-p) (setq bg1 "#282a36") (setq bg1 "#000000"))

between

(deftheme dracula)

and

(let ((class '(class color) (min-colors 89)))

This checks to see if you are using on a graphical display. If so, it sets the bg color to the standard Dracula color, if not (like when you are in a terminal) it sets it to plain black. Unfortunately, I think black is the closest color to the standard Dracula background in the 256 color set. Other colors I have tried all end up looking like the blue in your screen shot.

I think something like this is the best solution, but because it adds a new color I don't want to issue a pull request for it unless whoever is in charge of that says it's ok.

@apierz
Copy link
Contributor

apierz commented Jun 23, 2016

Using

(if (display-graphic-p) (setq bg1 "#282a36") (setq bg1 nil))

works even better. This will have terminal Emacs use your default terminal background, so if you have Dracula for iTerm installed it will use that color instead of turning blue.

screen shot 2016-06-22 at 7 50 37 pm

@pauley-unsaturated
Copy link

Should someone create a PR for this?

@film42
Copy link
Contributor

film42 commented Dec 5, 2016

Just wanted to ping this thread about the open PR around this: #15

@benreyn
Copy link
Contributor

benreyn commented Mar 1, 2017

With #19 in, I think we can close this now?

@benreyn
Copy link
Contributor

benreyn commented Mar 1, 2017

Trying this out locally, it looks like the fix in #19 did resolve this issue when starting a new emacs session via emacs --no-window-system from the terminal, but this is still and issue when connecting to a running emacs server from the terminal using emacsclient --tty

milouse added a commit that referenced this issue Feb 9, 2020
As reported in #32 and others, having a black background may be
disturbing. This commit apply proposal by @apierz¹.

¹ #2 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

5 participants