- What is Wisdom?
- Why did Ralbag's commentary to Leviticus take so much longer than the other books of the Torah?
- How to count polyrhythm 3 against 4 in common time?
- Responsive Excel Web Access (or equivalent for multi file dashboard)
- How To use GetAppOnlyAuthenticatedContext when accessing Sharepoint Online Site?
- how do you share Company Holidays across regions within a single Sharepoint calendar?
- Getting GUID of a document using REST
- SharePoint Designer create or update item to another list in subsite
- Hover Panel on Content Search Web Part
- Moving from the training potty to the toilet
- Black soot on exhaust manifold 2015 Ford KA 1.2
- How to clean spilled drink from dashboard and control buttons?
- Is engine flush safe and should I do it?
- How do I save a new field value for node without saving the node?
- Is there a way to do a bundle copy from D7 to D8?
- Upgrading core to 7.6 but update.php shows unresolved dependencies
- Node urls indexed by Google
- Do not include the number in the calculations if it is below 0
- Runner 1-bit game in Python like the offline chrome dino
- CLI helper in rust
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