?

Log in

No account? Create an account
entries friends calendar profile Elf Sternberg's Pendorwright Projects Previous Previous Next Next
I should have added these years ago to me .emacs file! - Elf M. Sternberg
elfs
elfs
I should have added these years ago to me .emacs file!

I added the following two items to my .emacs file, and they have changed my life:


(defun night-mode ()
  (interactive)
  (color-theme-initialize)
  (color-theme-lawrence)
  (menu-bar-mode -1)
  (scroll-bar-mode -1))

(defun daylight-mode ()
  (interactive)
  (color-theme-initialize)
  (color-theme-emacs-21)
  (menu-bar-mode 1)
  (scroll-bar-mode 1))

Both of these rely on the emacs “color themes” handler, but really, when working late at night when my eyes are tired, green on black seems to have a nice bit of contrast, whereas when working with a lot of light, the more traditional black-on-light-grey works well for me.  By banishing the menu bars and scroll bar, I eliminate further sources of distracting contrast.


Which makes working with Emacs a heck of a lot more pleasant.  I used to issue these commands by hand, but macro-izing them makes switching modes a much happier and more productive experience.


 

Leave a comment