Add solarized theme extension files
This commit is contained in:
parent
57234bb2ce
commit
403226960b
104
spacemacs/extensions/solarized-theme/README.md
Normal file
104
spacemacs/extensions/solarized-theme/README.md
Normal file
|
@ -0,0 +1,104 @@
|
|||
# Solarized for Emacs
|
||||
|
||||
Solarized for Emacs is an Emacs port of the [Solarized theme for vim](http://ethanschoonover.com/solarized),
|
||||
developed by Ethan Schoonover.
|
||||
|
||||
Solarized for Emacs is tested only under Emacs 24, but should be
|
||||
working under Emacs 23 as well. The theme is implemented in terms of
|
||||
customizations and `deftheme` and does not require the
|
||||
`color-theme-package`.
|
||||
|
||||
# Installation
|
||||
|
||||
|
||||
Solarized for Emacs is available for installation via the
|
||||
[MELPA](http://melpa.milkbox.net) and
|
||||
[Marmalade](http://marmalade-repo.org/) `package.el`
|
||||
repositories. Assuming you've set one of the them up (I recommend
|
||||
MELPA) you can install solarized like this:
|
||||
|
||||
`M-x package-install solarized-theme`
|
||||
|
||||
Afterwards - business as usual, just load one of the theme variants with `M-x
|
||||
load-theme`.
|
||||
|
||||
(If you want to install manually that procedure is briefly documentet in the
|
||||
FAQ at the end of this document.)
|
||||
|
||||
# Customisations
|
||||
|
||||
## Theme specific settings
|
||||
If you don't like low-contrast modeline or fringe, you can `customize` them
|
||||
either by doing `M-x customize-group solarized` or setting the values using
|
||||
elisp code:
|
||||
|
||||
|
||||
```lisp
|
||||
;; make the fringe stand out from the background
|
||||
(setq solarized-distinct-fringe-background t)
|
||||
|
||||
;; make the modeline high contrast
|
||||
(setq solarized-high-contrast-mode-line t)
|
||||
|
||||
;; Use less bolding
|
||||
(setq solarized-use-less-bold t)
|
||||
|
||||
;; Use more italics
|
||||
(setq solarized-use-more-italic t)
|
||||
|
||||
;; Use less colors for indicators such as git:gutter, flycheck and similar.
|
||||
(setq solarized-emphasize-indicators nil)
|
||||
|
||||
```
|
||||
Note that these need to be set **before** `load-theme` is invoked for Solarized.
|
||||
|
||||
## Underline position setting for X
|
||||
|
||||
If you are using emacs under X you might like the following setting which puts
|
||||
the underline below the
|
||||
[font bottomline instead of the baseline](https://publib.boulder.ibm.com/infocenter/pseries/v5r3/topic/com.ibm.aix.graPHIGS/doc/phigstrf/figures/afma5rbd.jpg).
|
||||
|
||||
Ihmo it enhances the general readability and also it fits well with the default
|
||||
`solarized-high-contrast-mode-line` setting which uses an slightly emphazised
|
||||
underline for the modeline to create one horisontal window border in the same
|
||||
manner as the vertical border.
|
||||
|
||||
```lisp
|
||||
(setq x-underline-at-descent-line t)
|
||||
```
|
||||
|
||||
# Bugs & Improvements
|
||||
|
||||
Please, report any problems that you find on the projects integrated
|
||||
issue tracker. If you've added some improvements and you want them
|
||||
included upstream don't hesitate to send me a patch or even better - a
|
||||
GitHub pull request.
|
||||
|
||||
# FAQ
|
||||
|
||||
## Stand-alone manual installation
|
||||
|
||||
Save the following files in a folder that's on your Emacs' `load-path`:
|
||||
|
||||
* [dash.el](https://raw.githubusercontent.com/magnars/dash.el/master/dash.el) - [dash](https://github.com/magnars/dash.el), a modern list library for Emacs
|
||||
* [solarized.el](https://raw.githubusercontent.com/bbatsov/solarized-emacs/master/solarized.el) - the solarized theme
|
||||
|
||||
Save the following files into `~/.emacs.d/themes`:
|
||||
|
||||
* [solarized-light-theme.el](https://raw.githubusercontent.com/bbatsov/solarized-emacs/master/solarized-light-theme.el)
|
||||
* [solarized-dark-theme.el](https://raw.githubusercontent.com/bbatsov/solarized-emacs/master/solarized-dark-theme.el)
|
||||
|
||||
Add this your `.emacs.d`:
|
||||
|
||||
```lisp
|
||||
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
|
||||
```
|
||||
|
||||
Now you can load the theme with the interactive function `load-theme`.
|
||||
|
||||
|
||||
# Contributors
|
||||
|
||||
- [Thomas Frössman](http://t.jossystem.se)
|
||||
|
||||
(Add yourself to the list)
|
|
@ -0,0 +1,7 @@
|
|||
(require 'solarized)
|
||||
|
||||
(deftheme solarized-dark "The dark variant of the Solarized colour theme")
|
||||
|
||||
(create-solarized-theme 'dark 'solarized-dark)
|
||||
|
||||
(provide-theme 'solarized-dark)
|
|
@ -0,0 +1,7 @@
|
|||
(require 'solarized)
|
||||
|
||||
(deftheme solarized-light "The light variant of the Solarized colour theme")
|
||||
|
||||
(create-solarized-theme 'light 'solarized-light)
|
||||
|
||||
(provide-theme 'solarized-light)
|
|
@ -0,0 +1,5 @@
|
|||
(define-package
|
||||
"solarized-theme"
|
||||
"1.1.0"
|
||||
"The Solarized color theme, ported to Emacs."
|
||||
'((dash "2.6.0")))
|
|
@ -0,0 +1,72 @@
|
|||
;;; solarized-theme-utils.el --- Utilities for solarized theme development
|
||||
|
||||
;; Copyright (C) 2012 Thomas Frössman
|
||||
|
||||
;; Author: Thomas Frössman <thomasf@jossystem.se>
|
||||
;; URL: http://github.com/bbatsov/solarized-emacs
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Development utilities, these are not needed for normal theme usage
|
||||
;;
|
||||
|
||||
;;;; Code:
|
||||
(require 'cl)
|
||||
(require 'solarized)
|
||||
|
||||
(defun solarized-import-faces (&optional regexp already-defined)
|
||||
"Imports current effective face definitions by regular expression
|
||||
in the format of solarized-theme.el."
|
||||
(interactive (list (read-regexp "List faces matching regexp")))
|
||||
(let*
|
||||
((all-faces (zerop (length regexp)))
|
||||
(faces
|
||||
(delq nil
|
||||
(mapcar (lambda (face)
|
||||
(let ((s (symbol-name face)))
|
||||
(when (or all-faces (string-match regexp s))
|
||||
face)))
|
||||
(sort (face-list) #'string-lessp)))))
|
||||
(mapc (lambda(face)
|
||||
(when (or (not (get face 'theme-face)) already-defined)
|
||||
(insert (format
|
||||
"`(%s ((,class %s)))%s
|
||||
"
|
||||
face
|
||||
(let (result)
|
||||
(dolist (entry face-attribute-name-alist result)
|
||||
(let* ((attribute (car entry))
|
||||
(value (face-attribute face attribute)))
|
||||
(unless (eq value 'unspecified)
|
||||
(setq result
|
||||
(nconc (list attribute
|
||||
(cond
|
||||
((member* attribute
|
||||
'(":background"
|
||||
":foreground")
|
||||
:test 'string=)
|
||||
(format "\"%s\"" value))
|
||||
(t value))) result))))))
|
||||
(if (get face 'theme-face)
|
||||
(format " ;; Already set by current theme!")
|
||||
"")))))
|
||||
faces)))
|
||||
|
||||
;; Local Variables:
|
||||
;; byte-compile-warnings: (not cl-functions)
|
||||
;; End:
|
||||
(provide 'solarized-theme-utils)
|
||||
;;; solarized-theme-utils.el ends here
|
4
spacemacs/extensions/solarized-theme/solarized-theme.el
Normal file
4
spacemacs/extensions/solarized-theme/solarized-theme.el
Normal file
|
@ -0,0 +1,4 @@
|
|||
(require 'solarized-dark-theme)
|
||||
(require 'solarized-light-theme)
|
||||
|
||||
(provide 'solarized-theme)
|
2023
spacemacs/extensions/solarized-theme/solarized.el
Normal file
2023
spacemacs/extensions/solarized-theme/solarized.el
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue