Make your emacs init file know your machine
October 10, 2010 at 4:51 am 2 comments
My laptop screen is glossy, and so only light theme or default theme is
suitable, while all other machine is okay to run great dark theme. So
today I add following code into my .emacs file to do this
automatically.
(when (not (equal "archkicad\n" (shell-command-to-string "uname -n"))) (load-file "~/.emacs.d/color-theme-blackboard.el") (require 'color-theme) (eval-after-load "color-theme" '(progn (color-theme-initialize) (color-theme-blackboard))) )
Here archkicad is the name of my laptop, which will not use any theme.

Entry filed under: Emacs. Tags: .

1.
me | October 17, 2010 at 10:24 pm
Calling (system-name) is a little cleaner than running (shell-command “uname -n”).
2.
vocalfolds | October 19, 2010 at 9:18 pm
Yes, you are right. I didn’t know that. Thank you.