- First Time-Cannon 700D, What gear do I need for Portrait and Landscape photography?
- What is wrong with this photo?
- Solving a recursive problem in the geometry (or any other) shader
- How to store shader output to VRAM?
- handling buffers in OpenGL
- Is the C or the Android code a problem?
- Is pickled herring cooked?
- How can you keep a stack of Swedish pancakes fresh?
- Why does this recipe call for so much yeast?
- Are there any WordPress themes optimized as a “starting point” for custom theme development?
- Should a page with adsense be viewed at least once for adsense crawler to crawl?
- Hreflang for separate domains?
- Search engine pessimisation: Can I tell search engines to not to rank legacy pages above live ones?
- Duke fishron help!
- How to create in-game build/guide Dota 2
- Why are end cities not generated in survival, though in creative they are?
- Need help. No voodoo demons spawning!
- Why is the victory/defeat screen sometimes in color and sometimes desaturated?
- Afterglow Prismatic Xbox One Controller Gamma
- Stream games from PC to TV (no cable) at more than 60 frames per second
Different themes for terminal and graphical frames when using Emacs daemon
I'm trying to achieve the following behavior in Emacs24:
I like to use a different theme (solarized-dark vs. solarized-light) depending on whether I connect to the running
server with a terminal frame
% emacsclient -t
or with a gtk frame
% emacsclient -c
This seems to have worked in older Emacs, but the current Emacs I couldn't find a way. I alreday checked SO (e.g., https://stackoverflow.com/q/18904529/152439 and answers) and the mailing lists (e.g., https://lists.gnu.org/archive/html/help-gnu-emacs/2012-02/msg00227.html and https://lists.gnu.org/archive/html/help-gnu-emacs/2012-02/msg00237.html).
My current setup looks like this:
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/solarized")
(if (display-graphic-p frame)
(load-theme 'solarized-light t)
(load-theme 'solarized-dark t)
(load-theme 'solarized-light t)
You cannot do this using different themes. The solution is to create a theme that has different face definitions depending on the terminal. If you look at an example like font-lock-comment-face, you'll see how it works. Instead of specifying ((class color) (min-colors 88) (background dark)) you could also specifcy (type tty) or (type graphic) etc. The manual has more info.
'((((class grayscale) (background light))
:foreground "DimGray" :weight bold :slant italic)
(((class grayscale) (background dark))
:foreground "LightGray" :weight bold :slant italic)
(((class color) (min-colors 88) (background light))
(((class color) (min-colors 88) (background dark))
(((class color) (min-colors 16) (background light))
(((class color) (min-colors 16) (background dark))
(((class color) (min-colors 8) (background light))
(((class color) (min-colors 8)2018-05-23 00:18:53
color-theme-buffer-local provides buffer-local theme support for both color-theme and the Emacs 24 theme systems. My version of the solarized theme also supports both systems, if you decide to go this route.2018-05-23 00:49:41
You can define conditions for face customizations, like "terminal mode" or "minimal colors" in the customization editor:
When customizing a face, click the [State] button and select "Show all display specs". Then you can set up the conditions for further specialization of the face.2018-05-23 01:36:05