;;;; Couleurs par defaut (cond (window-system (set-foreground-color "wheat") (set-background-color "DarkSlateGray") (set-cursor-color "CornflowerBlue") (set-mouse-color "CadetBlue") (set-face-foreground 'menu "wheat") (set-face-background 'menu "DarkSlateGray") (set-face-background 'fringe "DarkSlateGray") (set-face-foreground 'region "white") (set-face-background 'region "SteelBlue") (set-face-background 'tool-bar "DarkSlateGray"))) ;;;; dired (custom-set-faces '(dired-filetype-common ((t (:foreground "White")))) '(dired-filetype-compress ((t (:foreground "thistle")))) '(dired-filetype-image ((t (:foreground "plum")))) '(dired-filetype-plain ((t (:foreground "light gray")))) '(dired-filetype-xml ((t (:foreground "white smoke"))))) ;;;; org-mode (custom-set-faces '(org-level-1 ((t (:inherit variable-pitch :height 1.11 :foreground "cyan3")))) '(org-level-2 ((t (:inherit outline-2 :height 1.03 :foreground "deep sky blue")))) '(org-level-3 ((t (:inherit outline-3 :height 1.02 :foreground "light sky blue")))) '(org-level-4 ((t (:inherit outline-4 :height 1.01 :foreground "light blue")))) '(org-level-5 ((t (:inherit outline-5 :height 1.00 :foreground "light steel blue")))) '(org-level-6 ((t (:inherit outline-6 :height 1.00 :foreground "thistle")))) '(org-level-7 ((t (:inherit outline-7 :height 1.00 :foreground "gray90")))) '(org-level-8 ((t (:inherit outline-8 :height 1.00 :foreground "white")))) '(org-link ((t (:foreground "cyan1" :underline t :background "#2e3436"))))) ;; block source faces (defface org-block-begin-line '((t (:foreground "firebrick")))"") (defface org-block-end-line '((t (:foreground "firebrick")))"") (setq org-todo-keyword-faces (quote (("TODO" :foreground "red" :weight bold) ("IN-PROGRESS" :foreground "orange" :weight bold) ("WAIT" :foreground "cornsilk" :weight bold) ("VALID" :foreground "coral" :weight bold) ("CANCELED" :foreground "blue" :weight bold)))) (setq org-todo-keywords (quote ((sequence "TODO(t)" "IN-PROGRESS(i)" "WAIT(w)" "VALID(v)" "|" "DONE(d!)" "CANCELED(c@)")))) ;;;; modeline (setq line-number-mode nil) ;; deja affiché (setq-default mode-line-format '(" " ;; Position, including warning for 200 columns (:propertize "%5l" face font-lock-constant-face) ":" (:eval (propertize "%3c" 'face (if (>= (current-column) 200) 'mode-line-80col-face 'mode-line-col-face))) ;;font-lock-constant-face))) ;; relative position, size of file " [" mode-line-position "/" (:propertize "%I" 'face 'font-lock-constant-face) ;; size "] " ;;emacsclient [default -- keep?] mode-line-client " " ;; read-only or modified status (:eval (cond (buffer-read-only (propertize " RO " 'face 'mode-line-read-only-face)) ((buffer-modified-p) (propertize " ** " 'face 'mode-line-modified-face)) (t " "))) " " ;; directory and buffer/file name (:propertize (:eval (shorten-directory default-directory 26)) face mode-line-folder-face) (:eval (propertize "%b" 'face (if (not (eq major-mode 'dired-mode)) 'mode-line-filename-face 'mode-line-dired-face))) " " (:eval (propertize "(admin)" 'face (if (string-match "^/su\\(do\\)?:" default-directory) '(:background "dark red" :foreground "white") '(:foreground "#1f4f4f")))) ;; narrow [default -- keep?] " %n " ;;" mode (:propertize "%m" face mode-line-mode-face 'help-echo buffer-file-coding-system) " " ;; mode indicators: vc, recursive edit, major mode, minor modes, process, global (vc-mode vc-mode) " " (:propertize (:eval (let* ((code (symbol-name buffer-file-coding-system)) (eol-type (coding-system-eol-type buffer-file-coding-system)) (eol (if (eq 0 eol-type) "UNIX" (if (eq 1 eol-type) "DOS" (if (eq 2 eol-type) "MAC" "???"))))) (concat code " " eol " "))) face mode-line-black-face) )) ;; Helper function (defun shorten-directory (dir max-length) "Show up to `max-length' characters of a directory name `dir'." (let ((path (reverse (split-string (abbreviate-file-name dir) "/"))) (output "")) (when (and path (equal "" (car path))) (setq path (cdr path))) (while (and path (< (length output) (- max-length 4))) (setq output (concat (car path) "/" output)) (setq path (cdr path))) (when path (setq output (concat ".../" output))) output)) ;; Extra mode line faces (make-face 'mode-line-read-only-face) (make-face 'mode-line-modified-face) (make-face 'mode-line-folder-face) (make-face 'mode-line-filename-face) (make-face 'mode-line-black-face) (make-face 'mode-line-mode-face) (make-face 'mode-line-80col-face) (make-face 'mode-line-dired-face) (make-face 'mode-line-col-face) (set-face-attribute 'mode-line-read-only-face nil :inherit 'mode-line-face :foreground "blue") (set-face-attribute 'mode-line-folder-face nil :inherit 'mode-line-face) (set-face-attribute 'mode-line-filename-face nil :inherit 'mode-line-face :foreground "whiteSmoke") (set-face-attribute 'mode-line-dired-face nil ;; permet de rendre le filename invisible sous dired :inherit 'mode-line-face :foreground "#1f4f4f") (set-face-attribute 'mode-line-black-face nil :inherit 'mode-line-face :weight 'bold :foreground "black") (set-face-attribute 'mode-line-mode-face nil :inherit 'mode-line-face :foreground "mediumBlue") (set-face-attribute 'mode-line-80col-face nil :inherit 'mode-line-black-face :foreground "black" :background "gray50") (set-face-attribute 'mode-line-col-face nil :inherit 'mode-line-face :foreground "cadetBlue") ;; defaut (set-face-attribute 'mode-line nil :foreground "gray60" :background "#1f4f4f" :inverse-video nil) (set-face-attribute 'mode-line-inactive nil :foreground "gray50" :background "#1f4f4f" :inverse-video nil) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; Fin mode line ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Date: 2015-10-02 ven. 15:47