sellout / emacs-color-theme-solarized

Emacs highlighting using Ethan Schoonover’s Solarized color scheme
http://ethanschoonover.com/solarized
MIT License
1.16k stars 202 forks source link

Add support for Powerline #115

Closed dblarons closed 9 years ago

dblarons commented 10 years ago

Please add support for one of Emacs' most popular ports of powerline.

https://github.com/milkypostman/powerline

sellout commented 10 years ago

Hah – I just tried Powerline last week and thought, “yuck, Solarized needs to handle this better.”

dblarons commented 10 years ago

Here are some screenshots of Vim running on my Mac with the Solarized color scheme and "Inconsolata-dz for Powerline" font. It pains me to say it, but Vim has a nice look going.

Perhaps we can come close to this in Emacs? I'm no pro with Elisp, but I'd be happy to help out where possible. Where in the codebase would this patch be applied?

Normal Mode

powerlinenormalmode

Insert Mode

powerlineinsertmode

Visual Mode

powerlinevisualmode

dhaley commented 10 years ago

I've had good results with another mode-line customization package, smart-mode-line. It respects all of solarized faces with this setting:

(setq sml/theme 'respectful)

It even works toggling solarized light to dark.

https://github.com/Bruce-Connor/smart-mode-line

SML also looks more like emacs and less like vim, but the vim look is cool too.

dhaley commented 10 years ago

solarized light with SML

solarized_sml

arielschiavoni commented 9 years ago

+1 to support for powerline :-)

sellout commented 9 years ago

Ok, I found three bugs in Powerline’s handling of faces and I plan to submit a PR for it:

  1. when looking up colors, it doesn’t pay attention to face inheritance, so it may not get a color value;
  2. it doesn’t pay attention to :inverse-video, so if a mode-line is inverted (like Solarized’s) Powerline will grab the foreground color by accident; and
  3. when creating the XPM files for transitions, it doesn’t adjust for sRGB, so the colors are slightly off (at least, I think that’s what’s happening).

The first two seem pretty straightforward. I might just submit those first. I imagine the last one probably only affects Mac users, but I’m just guessing.

sellout commented 9 years ago

I see milkypostman/powerline#22 is the same issue. I have a fix for the first two points that I should get submitted today.

(As well as Solarized-friendly settings for the Powerline faces.)

sellout commented 9 years ago

Point 3 is covered by milkypostman/powerline#54, so I’ll commit some Solarized Powerline faces and consider this closed (but I am happy to take suggestions of other combinations for the Powerline display – not particularly excited with what I came up with, but at least everything is readable).

sellout commented 9 years ago

(But Powerline won’t look right yet unless you pull from git or wait for the next version to hit MELPA.)

sellout commented 9 years ago

Here is what Powerline looks like for me now, BTW:

cursor_and__eshell___ ___163_x_77__and__slamdata

The bottom mode-line is active, and I’m using UTF-8 separators (#x25ba / #x25c4) since XPM images on OS X don’t (yet?) handle the sRGB colorspace properly.