-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add leuven-theme #85
Open
fniessen
wants to merge
1
commit into
milkypostman:master
Choose a base branch
from
fniessen:leuven-theme-topic
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add leuven-theme #85
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
;;; powerline-themes.el --- Themes for Powerline | ||
|
||
;; Copyright (C) 2012-2013 Donald Ephraim Curtis | ||
;; Copyright (C) 2012-2015 Donald Ephraim Curtis | ||
;; Copyright (C) 2013 Jason Milkins | ||
;; Copyright (C) 2012 Nicolas Rougier | ||
|
||
|
@@ -260,6 +260,158 @@ | |
(powerline-fill nil (powerline-width rhs)) | ||
(powerline-render rhs))))))) | ||
|
||
(defface powerline-modified-face | ||
'((((class color)) | ||
(:background "#FFA335" :foreground "black" :weight bold)) | ||
(t (:weight bold))) | ||
"Face to fontify modified files." | ||
:group 'powerline) | ||
|
||
(defface powerline-normal-face | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please rename to 'unmodified' face. |
||
'((((class color)) | ||
(:background "#4F9D03" :foreground "black" :weight bold)) | ||
(t (:weight bold))) | ||
"Face to fontify unchanged files." | ||
:group 'powerline) | ||
|
||
(defface powerline-default-dictionary-active-face | ||
'((((class color)) | ||
(:background "#8A2BE2" :foreground "black" :weight bold)) | ||
(t (:weight bold))) | ||
"Face to fontify default dictionary in the active buffer." | ||
:group 'powerline) | ||
|
||
(defface powerline-default-dictionary-inactive-face | ||
'((((class color)) | ||
(:background "thistle" :foreground "black" :weight bold)) | ||
(t (:weight bold))) | ||
"Face to fontify default dictionary in inactive buffers." | ||
:group 'powerline) | ||
|
||
(defface powerline-other-dictionary-active-face | ||
'((((class color)) | ||
(:background "yellow" :foreground "black" :weight bold)) | ||
(t (:weight bold))) | ||
"Face to fontify another dictionary in the active buffer." | ||
:group 'powerline) | ||
|
||
(defface powerline-other-dictionary-inactive-face | ||
'((((class color)) | ||
(:background "LightYellow1" :foreground "black" :weight bold)) | ||
(t (:weight bold))) | ||
"Face to fontify another dictionary in inactive buffers." | ||
:group 'powerline) | ||
|
||
;;;###autoload | ||
(defun powerline-leuven-theme () | ||
"Setup the leuven mode-line." | ||
(interactive) | ||
(setq-default mode-line-format | ||
'("%e" | ||
(:eval | ||
(let* ((active (powerline-selected-window-active)) | ||
(mode-line (if active | ||
'mode-line | ||
'mode-line-inactive)) | ||
(face1 (if active | ||
'powerline-active1 | ||
'powerline-inactive1)) | ||
(face2 (if active | ||
'powerline-active2 | ||
'powerline-inactive2)) | ||
(default-dictionary-face | ||
(if active | ||
'powerline-default-dictionary-active-face | ||
'powerline-default-dictionary-inactive-face)) | ||
(other-dictionary-face | ||
(if active | ||
'powerline-other-dictionary-active-face | ||
'powerline-other-dictionary-inactive-face)) | ||
(separator-left | ||
(intern | ||
(format "powerline-%s-%s" | ||
powerline-default-separator | ||
(car powerline-default-separator-dir)))) | ||
(separator-right | ||
(intern | ||
(format "powerline-%s-%s" | ||
powerline-default-separator | ||
(cdr powerline-default-separator-dir)))) | ||
(lhs (list | ||
;; vc mode | ||
(when (and (fboundp 'vc-switches) | ||
buffer-file-name | ||
vc-mode) | ||
(if (eq (vc-state buffer-file-name) 'up-to-date) | ||
(powerline-vc 'powerline-normal-face 'r) | ||
(powerline-vc 'powerline-modified-face 'r))) | ||
|
||
(when (and (not (fboundp 'vc-switches)) | ||
buffer-file-name | ||
vc-mode) | ||
(powerline-vc face1 'r)) | ||
|
||
(when (and buffer-file-name | ||
vc-mode) | ||
(if (eq (vc-state buffer-file-name) 'up-to-date) | ||
(funcall separator-left 'powerline-normal-face mode-line) | ||
(funcall separator-left 'powerline-modified-face mode-line))) | ||
|
||
;; "modified" indicator | ||
(if (not (buffer-modified-p)) | ||
(powerline-raw "%*" nil 'l) | ||
(powerline-raw "%*" 'mode-line-emphasis 'l)) | ||
|
||
(powerline-raw mode-line-mule-info nil 'l) | ||
|
||
(powerline-buffer-id nil 'l) | ||
|
||
(when (and (boundp 'which-func-mode) which-func-mode) | ||
(powerline-raw which-func-format nil 'l)) | ||
|
||
(powerline-raw " ") | ||
(funcall separator-left mode-line face1) | ||
(when (boundp 'erc-modified-channels-object) | ||
(powerline-raw erc-modified-channels-object face1 'l)) | ||
(powerline-major-mode face1 'l) | ||
(powerline-process face1) | ||
(powerline-raw " " face1) | ||
(funcall separator-left face1 face2) | ||
(powerline-minor-modes face2 'l) | ||
(powerline-narrow face2 'l) | ||
(powerline-raw " " face2) | ||
(funcall separator-left face2 mode-line))) | ||
(rhs (list (powerline-raw global-mode-string mode-line 'r) | ||
(funcall separator-right mode-line face1) | ||
|
||
(powerline-raw "%l" face1 'l) | ||
(powerline-raw ", " face1 'l) | ||
(powerline-raw "%c" face1 'r) | ||
(funcall separator-right face1 mode-line) | ||
(powerline-raw " ") | ||
(powerline-raw "%4p" nil 'r) | ||
(funcall separator-right mode-line face2) | ||
(powerline-buffer-size face2 'l) | ||
(powerline-raw " " face2) | ||
|
||
(let ((dict (and (featurep 'ispell) | ||
(or | ||
ispell-local-dictionary | ||
ispell-dictionary)))) | ||
;; Add 2 spaces after the language indicator | ||
;; (for GNU/Linux). | ||
(cond (buffer-read-only | ||
(powerline-raw "%%%% " default-dictionary-face 'l)) | ||
((null dict) | ||
(powerline-raw "-- " default-dictionary-face 'l)) | ||
(t | ||
(powerline-raw (concat (substring dict 0 2) " ") other-dictionary-face 'l)))) | ||
|
||
;; (powerline-hud face2 face1) | ||
))) | ||
(concat (powerline-render lhs) | ||
(powerline-fill mode-line (powerline-width rhs)) | ||
(powerline-render rhs))))))) | ||
|
||
(provide 'powerline-themes) | ||
|
||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please update these comments to say that they are only relevant to the leuven theme?