6

I'd like to change the colours of the menu bar and the scroll bar of emacs 24.

The instructions of EmacsWiki (the above links) do not work. This might be because I am using emacs 24.

According to the page ColorTheme on EmacsWiki, emacs 24 has a new colour system, so I tried some colour themes and to modify them. (Menu bar→Options→Customize Emacs→Custom Themes) But I could not find the faces which I should customise.

Could you tell me how to change the colours of the menu bar and the scroll bar of emacs 24?

Environment: openSUSE 12.3, KDE 4.10.5, Emacs 24.2.1 (x86_64-suse-linux-gnu, GTK+ Version 3.6.4)

  • 1
    I'd been wondering about this myself actually. I've gotten as far as finding this. I'm pretty sure Emacs uses GTK 3 now, and it seems to want people to edit some CSS file to set specific properties. – wingedsubmariner Oct 20 '13 at 19:45
  • I've prepared gtk.css file, but emacs does not seem to read the file. (I've tried several file locations which are given in the page.) Where do you put gtk.css? – H. Shindoh Oct 25 '13 at 22:29
  • 2
    On Linux easiest way to find the location where emacs looks for the gtk.css file is to just use strace . See superuser.com/questions/1115820/… (answer detailing this procedure). – FooF Sep 20 '16 at 11:38
3
  1. Emacs 24 does not have a new color system. What it has that is new is a Customize interface for custom themes, which are different from but similar to the color themes of library color-theme.el.

  2. I think you mean the mode line and not the menu bar. (To change menu-bar appearance I think the only recourse might be Xresources.)

  3. The faces to customize are these:

    • scroll-bar

    • mode-line

    • mode-line-inactive

    • mode-line-emphasis

    • mode-line-buffer-id

    • mode-line-highlight

You can customize any of these using M-x customize-face. Or you can define a color theme or a custome theme that uses them.

1

Following the steps which Foof showed, I found the correct path for gtk.css.

1) start emacs by the following command, and quit it.

$ strace -o strace.log emacs &

2) following command will show the path

$ grep gtk.css strace.log | grep config
stat("/home/username/.config/gtk-3.0/gtk.css", 0x7fffc9981d50) = -1 ENOENT (No such file or directory)

So I put gtk.css at ~/.config/gtk-3.0/.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.