11

When I run emacs in a terminal (using the -nw option) my theme is broken and some key-bindings don't work.

So, I need to disable the theme and some keybindings when running in a tty.

Is there a way to do that?

Constantine
  • 9,072
  • 1
  • 34
  • 49
Nishant
  • 113
  • 1
  • 6

1 Answers1

21

You can use display-graphic-p to determine if you are running in a terminal or a windowing system.

For example, you could do your setup so that you only add those keybindings and theme if you know you're on a window system.

(when (display-graphic-p) 
    ;; Do any keybindings and theme setup here
  )

You can also do the reverse, and turn off your keybindings and theme.

(unless (display-graphic-p) 
    ;; Remove any keybindings and theme setup here
  )
Infiltrator
  • 223
  • 1
  • 4
Alan Shutko
  • 837
  • 7
  • 6