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.

./default32.png

About these ads

Entry filed under: Emacs. Tags: .

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”).

    Reply
  • 2. vocalfolds  |  October 19, 2010 at 9:18 pm

    Yes, you are right. I didn’t know that. Thank you.

    Reply

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts

Archives

Blog Stats

  • 1,046 hits

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: