1

I'm using base16-theme package to load my GUI theme and it works fine. However my console theme is completely random (launched with emacs -nw).

It doesn't match (not even close) with the GUI theme and frankly I'm not sure what theme it is. Pic 1 shows the console theme and pic 2 the GUI theme.

terminal theme

GUI theme Except custom-safe-themes there's nothing in my custome-set-variable that might interfere with themes settings. Things I've tried so far:

  • adding this line to my .zshrc file export TERM=xterm-256color -> no effect
  • adding conditional statement that should load theme if not in terminal (from this question and here)
(unless (display-graphic-p)                                                  
    (load-theme 'base16-monokai t)) 

and

(unless (window-system)                                                      
  (load-theme 'base16-monokai t)) 

I've also tried load-theme and customize-theme from terminal buffer it also didn't work. My .emacs configuration for my GUI theme is this:

(use-package base16-theme
  :ensure t
  :config
  (load-theme 'base16-monokai t))

What could be the problem???

gccallie
  • 21
  • 3

1 Answers1

1

I think I solved the problem. A few things were involved: first off, the if condition was compiled after the theme configuration for GUI, therefore wasn't taken into consideration. I fixed by including both GUI and console theme in the same conditional statement:

(if (window-system)
    (load-theme 'base16-monokai t)
  (load-theme 'tango-dark t))

Apart from this (which solved most of the problems) I disabled line numbers modeand soft line highlighting because they messed up the colous in terminal mode.

;; Enable line numbers globally
(if (window-system)
    (global-linum-mode t)
  (global-linum-mode 0))

;; softly highlight the current line
(if (window-system)
    (global-hl-line-mode 1)
  (global-hl-line-mode 0))
gccallie
  • 21
  • 3