colors.el 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. ;;; Color theme setup, with cycling
  2. ;;; -----
  3. (add-to-list 'load-path "~/.emacs.d/elisp/color-theme-6.6.0/")
  4. (require 'color-theme)
  5. (load-file "~/.emacs.d/elisp/color-theme-6.6.0/themes/color-theme-library.el")
  6. ;(setq color-theme-is-cumulative nil)
  7. (defun color-theme-ebony-gnome ()
  8. "`color-theme-gnome2' with a black background and a nice gray
  9. font."
  10. (interactive)
  11. (color-theme-gnome2)
  12. (let ((color-theme-is-cumulative t))
  13. (color-theme-install
  14. '(color-theme-ebony-gnome
  15. ((foreground-color . "lightgray")
  16. (background-color . "black"))))))
  17. (defun color-theme-emacs-21-black ()
  18. "`color-theme-emacs-21' with a black background and a nice gray
  19. font."
  20. (interactive)
  21. (color-theme-emacs-21)
  22. (let ((color-theme-is-cumulative t))
  23. (color-theme-install
  24. '(color-theme-emacs-21-black
  25. ((foreground-color . "lightgray")
  26. (background-color . "black"))))))
  27. (defun color-theme-snow-better ()
  28. "Because `color-theme-snow' is so awesome, except for when it
  29. isn't."
  30. (interactive)
  31. (color-theme-snow)
  32. (let ((color-theme-is-cumulative t))
  33. (color-theme-install
  34. '(color-theme-snow-better
  35. ((background-color . "snow2")
  36. (background-mode . light)
  37. (border-color . "black")
  38. (cursor-color . "cadet blue")
  39. (foreground-color . "black")
  40. (mouse-color . "black"))
  41. (emacs-wiki-link-face ((t (:bold t :underline "BlueViolet" :foreground "BlueViolet"))))
  42. (muse-link-face ((t (:bold t :underline "BlueViolet" :foreground "BlueViolet"))))
  43. (info-xref ((t (:bold t :foreground "BlueViolet"))))
  44. (region ((t (:background "light steel blue"))))
  45. (cursor ((t (:background "cadet blue"))))
  46. (fringe ((t (:background "white"))))
  47. (planner-high-priority-task-face ((t (:foreground "red"))))
  48. (planner-medium-priority-task-face ((t (:foreground "green"))))
  49. (planner-low-priority-task-face ((t (:foreground "blue"))))
  50. (planner-canceled-task-face ((t (:foreground "gray" :strike-through t))))
  51. (org-todo ((t (:foreground "red2" :bold t))))
  52. (org-done ((t (:foreground "SpringGreen3" :bold t))))
  53. (org-special-keyword ((t (:foreground "sienna"))))
  54. (org-column ((t (:background "gray85"))))
  55. ; (py-pseudo-keyword-face ((t (:foreground:
  56. (erc-input-face ((t (:foreground "brown"))))
  57. (erc-notice-face ((t (:foreground "SlateBlue" :bold t))))
  58. (erc-current-nick-face ((t (:foreground "DarkTurquoise" :bold t))))
  59. (erc-prompt-face ((t (:foreground "Black" :bold t :background "lightBlue2"))))
  60. (planner-note-headline-face ((t (:bold t :foreground "azure3"))))))))
  61. (setq my-color-themes
  62. (list 'color-theme-snow-better
  63. 'color-theme-ebony-gnome
  64. 'color-theme-emacs-21-black))
  65. ;; 'color-theme-taming-mr-arneson 'color-theme-gray30
  66. ;; 'color-theme-hober 'color-theme-clarity
  67. ;; 'color-theme-arjen 'color-theme-dark-laptop
  68. ;; 'color-theme-subtle-hacker 'color-theme-deep-blue))
  69. (defun my-theme-set-default () ; Set the first row
  70. (interactive)
  71. (setq theme-current my-color-themes)
  72. (if window-system (funcall (car theme-current))))
  73. (defun my-describe-theme () ; Show the current theme
  74. (interactive)
  75. (message "%s" (car theme-current)))
  76. (defun my-theme-cycle () ; Set the next theme
  77. (interactive)
  78. (setq theme-current (cdr theme-current))
  79. (if (null theme-current)
  80. (setq theme-current my-color-themes))
  81. (funcall (car theme-current))
  82. (my-describe-theme))
  83. (defun my-refresh-current-theme (&optional frame)
  84. (interactive)
  85. (funcall (car theme-current)))
  86. (defun cwebber/load-primary-theme (&optional frame)
  87. (interactive)
  88. (when window-system
  89. (if frame
  90. (select-frame frame))
  91. ; guess I shouldn't tack this in here, but meh...
  92. (set-default-font "mono-9")
  93. (funcall (car my-color-themes))))
  94. (setq theme-current my-color-themes)
  95. ;(my-theme-set-default)
  96. ;(global-set-key [f12] 'my-theme-cycle)
  97. ;(global-set-key [f11] 'my-refresh-current-theme)
  98. ;(add-hook 'after-make-frame-functions 'cwebber/load-primary-theme)
  99. ;; (remove-hook 'after-make-frame-functions 'cwebber/load-primary-theme)
  100. ;; (defadvice make-frame (after possibly-load-color-theme)
  101. ;; "Load the color theme if we are in x, but not if in a terminal"
  102. ;; (message "Hello thar")
  103. ;; (message ad-return-value)
  104. ;; (cwebber/load-primary-theme))
  105. ;; (ad-activate 'make-frame)
  106. ;;;; And now, set faces
  107. (custom-set-faces
  108. ;; custom-set-faces was added by Custom.
  109. ;; If you edit it by hand, you could mess it up, so be careful.
  110. ;; Your init file should contain only one such instance.
  111. ;; If there is more than one, they won't work right.
  112. '(column-marker-1-face ((t (:background "red" :foreground "black")))))
  113. (load-file "~/.emacs.d/themes/naquadah-theme.el")
  114. (require 'naquadah-theme)
  115. (when (not window-system)
  116. (set-face-attribute 'region nil :background "blue"))
  117. (load-file "~/.emacs.d/themes/dark-emacs-theme.el")
  118. (require 'dark-emacs-theme)
  119. (defun cwebber/fix-font-size (&optional frame)
  120. (interactive)
  121. (when window-system
  122. (if frame
  123. (select-frame frame))
  124. (set-default-font "mono-9")))
  125. ; Make the ansi-term blue not so painful
  126. (setq ansi-color-names-vector
  127. ["black" "red" "green" "yellow" "#729fcf"
  128. "magenta" "cyan" "white"])
  129. (setq ansi-color-map (ansi-color-make-color-map))
  130. (add-hook 'after-make-frame-functions 'cwebber/fix-font-size)