jonathanchu / emacs-powerline

Powerline for Emacs
497 stars 37 forks source link

Support for Solarized theme? #11

Closed dansondergaard closed 9 years ago

dansondergaard commented 12 years ago

Powerline with Solarized

As you see, it's not very pretty. Is there a way to make emacs-powerline use the theme colors?

Thanks.

alanpearce commented 12 years ago

As a workaround, you can change the colours yourself.

Here's what I'm using with solarized-light, it looks okay on the dark variant, although you'll probably want to change #859000

(setq powerline-color1 "#657b83")
(setq powerline-color2 "#839496")

(set-face-attribute 'mode-line nil
                    :foreground "#fdf6e3"
                    :background "#859900"
                    :box nil)
(set-face-attribute 'mode-line-inactive nil
                    :box nil)

It seems to work better if you place that code after calling (load-theme) or (color-theme-solarized)

jonathanchu commented 12 years ago

Thanks @alanpearce. This is a good workaround for now. My goal in the near future is to refactor this so that it works for a core group of commonly used themes, Solarized being one of them.

marcinant commented 12 years ago

This is one of my questions... I just would like to know how to write a conditional that could load custom face settings depending on current theme. It could allow to write customizations suitable for various themes.

Solarized is for example pretty difficult because it uses inverse-video on mode-line-inactive. It's almost impossible (in my opinion) to set defaults for powerline that could also look good in themes without inverse-video.

liangzan commented 11 years ago

subtle solarized powerline

(setq powerline-color1 "#073642")
(setq powerline-color2 "#002b36")

(set-face-attribute 'mode-line nil
                    :foreground "#fdf6e3"
                    :background "#2aa198"
                    :box nil)
(set-face-attribute 'mode-line-inactive nil
                    :box nil)

Here's my version of solarized powerline on the solarized dark theme. I prefer the status bar not to stand out.

tfogo commented 11 years ago

Hey,

I'm using the solarized theme from Marmalade. In order to get a mode line similar to @liangzan I had to add :inverse-video nil to the set-face-attribute functions.

marcinant commented 11 years ago

@TimFogarty

  1. Ekhmm - which one? There are three solarized themes in Marmelade repo.
  2. I think that you should try this fork https://github.com/milkypostman/powerline This fork is actively developed and is much more extended than this one.
tfogo commented 11 years ago

@marcinant

  1. Oh you're correct, I didn't see the others. I believe this is the one I'm using: https://github.com/sellout/emacs-color-theme-solarized
  2. Thanks for the tip. I've now tried that package out and it works better.
marcinant commented 11 years ago

@TimFogarty This solarized theme: https://github.com/bbatsov/solarized-emacs is better than sellout's as well.

tfogo commented 11 years ago

@marcinant Thanks!

jonathanchu commented 9 years ago

Closing out as there seems to have been some great suggestions by all. Still on lookout if this is an issue and I'm open to any and all suggestions on how to fix for one of these more popular themes.

:beers:

tdupes commented 9 years ago

I have the same problem, and none of the suggestions seem to change anything. I can change the leftmost and rightmost colors, but the center text always has an ugly white block background color

tmerten commented 7 years ago

just FYI I had the same issue just now, too and it was due to a problem with the SRGB implementation of the OSX homebrew version. I worked around it with (setq ns-use-srgb-colorspace nil)

derDere commented 4 years ago

so my solution actualy was quite easy. Just add

(powerline-reset)

to the end of your .emacs file (or to be more specific after your theme gets activated) and this will rematch your powerline to the current color theme.