Hi I'm asking this question because this;: Different theme for -nw (terminal) and few others didn't work for me. Allright, first of all I am not a programmer/devoloper, and I don't know lisp (thinking about learning it, but too busy). The problem I encountered is when I use emacs on gui with standart theme, it hurts my eyes, and the theme is just ugly. But when I use it on terminal (emacs -nw with no theme) it is beautiful because of the terminal theme/compton etc. Sometimes I have to use gui for a quick edit on desktop files or some other files, I'd like to ask you, how can I achive, to run emacs with some theme when on gui, and no theme on terminal.: https://www.gnu.org/software/emacs/manual/html_node/elisp/Display-Feature-Testing.html I've seen this part of gnu/emacs manual, I understood what the "display-graphic-p" and "if" codes do but not sure how to use it, because I don't want any other theme to load on emacs when I use it on terminal.
It sounds like you want the following?
(when (display-graphic-p) (enable-theme 'solarized))
You can replace
'solarized with another theme.
when expression is equivalent to an
if with a "do nothing" else clause:
(if (display-graphic-p) (enable-theme 'solarized) nil)
Emacs Lisp also lets you write a "one armed
(if (display-graphic-p) (enable-theme 'solarized))
But some people (like me) think it's clearer to use
when -- to
emphasize that the expression is "for effect" not "for result".