mattfidler / tabbar-ruler.el

Tabbar Ruler Mode
54 stars 10 forks source link

custom colouring of tabs? #42

Open boudiccas opened 8 years ago

boudiccas commented 8 years ago

Is it possible to have my own customisation of tabbar-ruler/tabbar with regard to colouring of the tabs please? For instance -

 '(tabbar-key-binding ((t (:inherit variable-pitch :background "gray12" :foreground "gainsboro" :weight bold))))
 '(tabbar-ruler-selected ((t (:inherit tabbar-ruler-default :background "black" :foreground "red"))))

is in my 'custom.el' and it would really enhance the view of tabbar-ruler/tabbar to have it being harmonious with the rest of my theme and emacs.

mattfidler commented 8 years ago

I think this should work for you now.

Please let me know.

boudiccas commented 8 years ago

Unfortunately it doesn't. This is what is in my 'inet.el'

(setq tabbar-ruler-global-tabbar t)
(require 'tabbar-ruler)
(setq tabbar-buffer-groups-function 'tabbar-buffer-groups)
(global-set-key (kbd "C-c t") 'tabbar-ruler-move)
(mode-icons-mode -1)

(setq tabbar-ruler-background-color "gray12") ;; the color of the tabbar background
'(tabbar-key-binding ((t (:inherit variable-pitch :background "gray12" :foreground "gainsboro" :weight bold))))
'(tabbar-ruler-default ((t (:inherit variable-pitch :background "gray12" :foreground "gainsboro" :weight bold))))
'(tabbar-ruler-button ((t (:inherit tabbar-ruler-default :foreground "dark red" :style released-button))))
'(tabbar-ruler-button-highlight ((t (:inherit tabbar-ruler-default))))
'(tabbar-ruler-highlight ((t (:underline t))))
'(tabbar-ruler-selected ((t (:inherit tabbar-ruler-default :background "black" :foreground "red"))))
'(tabbar-ruler-separator ((t (:inherit tabbar-ruler-default :background "#95CA59" :weight bold :line-width 7 :height 25))))
'(tabbar-ruler-unselected ((t (:inherit tabbar-ruler-default))))

But it still remains with all tabbar tabs showing as white with black text, and selected tab showing as black with white text

djangoliv commented 8 years ago

I have the same problem... From my theme:

(custom-set-faces
 '(tabbar-default ((t (:height 0.85))))
 '(tabbar-unselected ((t (:inherit tabbar-default :foreground "DarkGray" :background "#1f4f4f" :bold t))))
 '(tabbar-button ((t (:inherit tabbar-default :foreground "WhiteSmoke" :background "#1f4f4f"))))
 '(tabbar-separator ((t (:background "gray50"))))
 '(tabbar-selected ((t (:inherit tabbar-default :foreground "WhiteSmoke" :background "#1f4f4f" :bold t)))))

And at the end of my init.el

(require 'tabbar-ruler)
  (setq tabbar-buffer-groups-function 'tabbar-buffer-groups)
  (set-face-attribute 'tabbar-unselected nil :foreground "DarkGray" :background "#1f4f4f" :bold t)

But it works if I do : M-x eval: (set-face-attribute 'tabbar-unselected nil :foreground "DarkGray" :background "#1f4f4f" :bold t)

Regards

mattfidler commented 8 years ago

I cannot figure out how to tag to see if the user changed the face attributes. If someone knows, I can fix this issue.

djangoliv commented 8 years ago

I think, you can check if (face-differs-from-default-p 'tabbar-unselected) is nil.

mattfidler commented 8 years ago

This may be fixed using face-differs-from-default-p. Sorry for the delay in response.

djangoliv commented 8 years ago

No worries for the delay,

The correction is necessary but not sufficient. I also need to comment the instruction line 911. (invert-face 'tabbar-selected) in tabbar-install-faces function.

Thanks a lot for your work

mattfidler commented 8 years ago

This should be sufficient to not have to comment 911. Please reopen if it doesn't work for you.

djangoliv commented 8 years ago

All works. Thanks a lot.

mattfidler commented 8 years ago

Unfortunately, it makes all the rest of the customizations not work correctly :(

I have tried another method; Perhaps this will work for you...?

djangoliv commented 8 years ago

The new version doesn't work for me. I will keep the older one for the moment.

boudiccas commented 8 years ago

Matthew Fidler notifications@github.com writes:

Unfortunately, it makes all the rest of the customizations not work correctly :(

I have tried another method; Perhaps this will work for you...?

I've upgraded to 'tabbar-ruler-20160801.2007' and its completely got rid of the incomprehensible blue text in the current tab, its now legible again. And also the tabs are a lot more compressed which suits me fine. By that I mean that the text itself seems more compressed, and fits in with my custom theme, which on the current tab is white/red text on a black background, and all other unselected text being black/orange text on a white back ground, but I would still like to be able to have all unselected tabs to have a custom-colored background which would fit in with my theme.

Thanks

Sharon.

A taste of linux = http://www.sharons.org.uk TGmeds = http://www.tgmeds.org.uk Debian 8.4, fluxbox 1.3.7, emacs 25.1.1

mattfidler commented 8 years ago

@boudiccas can are you using custom-set-faces?

boudiccas commented 8 years ago

Matthew Fidler notifications@github.com writes:

@boudiccas can are you using custom-set-faces?

I'm using my own theme called 'darkest-midnight'. Does this help?

Thanks

Sharon.

A taste of linux = http://www.sharons.org.uk TGmeds = http://www.tgmeds.org.uk Debian 8.4, fluxbox 1.3.7, emacs 25.1.1

djangoliv commented 8 years ago

I had this in my theme for using the latest version

(dolist (face '(tabbar-default
                tabbar-button
                tabbar-selected
                tabbar-selected-modified
                tabbar-unselected
                tabbar-unselected-modified))
  (put face 'saved-face-comment "modify"))

Everything is working, except for tabbar-unselected-modified which appear green instead-of orange despite

(custom-set-faces
'(tabbar-unselected-modified nil :foreground "DarkOrange3" ))

I don't understand why for the moment. Regards

mattfidler commented 8 years ago

This issue has always baffled me. I was goING to create a hash of default values to compare against, but haven't got to it yet