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

(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"

Here archkicad is the name of my laptop, which will not use any theme.



Entry filed under: Emacs.

Hello world! Ssh tunnel for security web access in insecure web connection

2 Comments Add your own

  • 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.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

Recent Posts


Blog Stats

  • 1,262 hits

%d bloggers like this: