From 146b3f5c28f6026c463939841bd44102d0513c59 Mon Sep 17 00:00:00 2001 From: Peng Li Date: Fri, 19 Jun 2015 14:19:01 +0800 Subject: [PATCH] emacs: color theme powerline-evil todo --- emacs.d/config/init-color-theme.el | 22 ++++++++++++++++--- emacs.d/init.el | 44 ++++++++++++++++++++++++++++++++------ 2 files changed, 56 insertions(+), 10 deletions(-) diff --git a/emacs.d/config/init-color-theme.el b/emacs.d/config/init-color-theme.el index d464d8f..0f45336 100644 --- a/emacs.d/config/init-color-theme.el +++ b/emacs.d/config/init-color-theme.el @@ -178,6 +178,21 @@ (concat (replace-regexp-in-string "[<>]" "" (powerline-evil-tag)) " ") ) +;; ----------------------------------------------------------------------------- + +;; ----------------------------------------------------------------------------- +;; |evil| buffer_name | major-mode | vc | | position | pwd | time | +;; ----------------------------------------------------------------------------- +;; +;; ToDo: +;; position and pwd only shows in some mode, such as programming mode +;; using workgroup instead of pwd +;; some other modes such as eshell, package, help, don't need the posittion and +;; pwd +;; + +;; ----------------------------------------------------------------------------- + (defun powerline-ha-theme () "A powerline theme that removes many minor-modes that don't serve much purpose on the mode-line." (interactive) @@ -241,12 +256,13 @@ (rhs (list (funcall separator-right face1 mode-line) + ;; position (powerline-raw (concat "%3c, %l/" (format "%d" (count-lines (point-min) (point-max))) " %4p ") mode-line) (funcall separator-right mode-line face-blue) - (powerline-raw " [" face-blue) - (powerline-raw (powerline-format-default-directory default-directory) face-blue ) - (powerline-raw "] " face-blue) + ;; pwd/workgroups + (powerline-raw (concat " [" (powerline-format-default-directory default-directory) "] ") face-blue ) (funcall separator-right face-blue face1) + ;; date and time (powerline-raw (format-time-string " %m-%d") face1 'r) (funcall separator-right face1 face-yel) (powerline-raw (format-time-string " %I:%M %p %a ") face-yel 'r))) diff --git a/emacs.d/init.el b/emacs.d/init.el index 14ffd19..db66bf7 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -44,6 +44,12 @@ ;; elscreen should be placed begin of https://github.com/knu/elscreen/issues/6 ;(elscreen-start) ;(require 'init-elscreen) +;(require 'elscreen) +;(custom-set-faces +; '(elscreen-tab-current-screen-face ((t (:background "Yellow" :foreground "black")))) +; '(elscreen-tab-other-screen-face ((t (:background "gray22" :foreground "black"))))) + + (require 'init-color-theme) @@ -146,8 +152,6 @@ ;(require 'eyebrowse) ;(eyebrowse-mode t) -(require 'workgroups2) -;;;;(workgroups-mode 1) ;;(require 'minibuffer-line) @@ -218,15 +222,16 @@ ;; --------------------------------- ;; linum-relative - (require 'linum-relative) (custom-set-variables '(fringe-mode (quote (4 . 0)) nil (fringe))) +;; maybe better to fix the size of line number rather scaled 0.8 +;; https://github.com/howardabrams/dot-files/blob/master/emacs.org (custom-set-faces '(highlight-current-line-face ((t (:background "gray22")))) - '(linum ((t (:background "#000000" :foreground "gray40" :height 0.8)))) + '(linum ((t (:background "#000000" :foreground "gray40" :height 0.8 :slant italic :weigth light)))) '(linum-relative-current-face ((t (:inherit linum :foreground "Yellow" :weight light :height 0.8))))) @@ -235,10 +240,35 @@ (add-hook 'prog-mode-hook 'linum-mode) - - -;(require 'highli +;; hight current line (require 'highlight-current-line) (highlight-current-line-on t) + +;(defun pl-fringe-mode () +; "jfoewoif" +; (if linum-mode +; (fringe-mode '(4 . 0)) +; (fringe-mode '(0 . 0)))) + + +;(add-hook 'eshell-mode-hook 'pl-fringe-mode) +;(add-hook 'prog-mode-hook 'pl-fringe-mode) + + + + + +(require 'workgroups2) + + +(setq wg-prefix-key (kbd "C-c z")) +(setq wg-session-file "~/.emacs.d/.emacs_workgroups") +(setq wg-mode-line-display-on t) ; Default: (not (featurep 'powerline)) +(setq wg-flag-modified t) ; Display modified flags as well +(setq wg-mode-line-decor-left-brace "[" + wg-mode-line-decor-right-brace "]" ; how to surround it + wg-mode-line-decor-divider ":") +;(workgroups-mode 1) + -- 2.11.0