[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dracula-theme fcb9add 122/187: Merge branch 'ed-test-term-
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dracula-theme fcb9add 122/187: Merge branch 'ed-test-term-colors' |
Date: |
Thu, 21 Oct 2021 18:05:07 -0400 (EDT) |
branch: elpa/dracula-theme
commit fcb9adde6a7dc0588340e0009e4202e7e7776899
Merge: f7cf1b2 3a8a6f0
Author: Étienne Deparis <etienne@depar.is>
Commit: Étienne Deparis <etienne@depar.is>
Merge branch 'ed-test-term-colors'
Fix: https://github.com/dracula/emacs/issues/32
---
README.md | 23 ++++++++++++++++++--
dracula-theme.el | 62 +++++++++++++++++++++++++++--------------------------
start_emacs_test.sh | 20 +++++++++++++++++
test-profile.el | 4 ++++
4 files changed, 77 insertions(+), 32 deletions(-)
diff --git a/README.md b/README.md
index f7d4ef0..ca784bd 100644
--- a/README.md
+++ b/README.md
@@ -6,11 +6,30 @@
## Install
-All instructions can be found at
[draculatheme.com/emacs](https://draculatheme.com/emacs).
+All instructions can be found at
+[draculatheme.com/emacs](https://draculatheme.com/emacs).
+
+## Test
+
+This repository contains a small script named `start_emacs_test.sh`,
+which helps you to test this color theme in various environment
+(graphical, 256+ colors terminals, 16 colors terminals).
+
+ # Graphical test
+ ./start_emacs_test.sh
+
+ # Full color terminal
+ ./start_emacs_test.sh -nw 256
+
+ # TTY like env
+ ./start_emacs_test.sh -nw 16
+
+This script requires the xterm terminfo files.
## Team
-This theme is maintained by the following person(s) and a bunch of [awesome
contributors](https://github.com/dracula/emacs/graphs/contributors).
+This theme is maintained by the following person(s) and a bunch of
+[awesome contributors](https://github.com/dracula/emacs/graphs/contributors).
[![Garrett
T](https://avatars3.githubusercontent.com/u/1043908?v=3&s=70)](https://github.com/film42)
| [![Étienne
D](https://avatars3.githubusercontent.com/u/349239?v=3&s=70)](https://github.com/milouse)
|
--- | --- |
diff --git a/dracula-theme.el b/dracula-theme.el
index a5a71e9..9b39be1 100644
--- a/dracula-theme.el
+++ b/dracula-theme.el
@@ -19,25 +19,25 @@
;; Assigment form: VARIABLE COLOR [TTY-COLOR]
(let ((colors '(;; Upstream theme color
- (dracula-bg "#282a36" nil) ; official background
- (dracula-current "#44475a") ; official current-line/selection
- (dracula-fg "#f8f8f2") ; official foreground
- (dracula-comment "#6272a4") ; official comment
- (dracula-cyan "#8be9fd") ; official cyan
- (dracula-green "#50fa7b") ; official green
- (dracula-orange "#ffb86c") ; official orange
- (dracula-pink "#ff79c6") ; official pink
- (dracula-purple "#bd93f9") ; official purple
- (dracula-red "#ff5555") ; official red
- (dracula-yellow "#f1fa8c") ; official yellow
+ (dracula-bg "#282a36" "#262626" nil) ; official background
+ (dracula-fg "#f8f8f2" "#ffffff" "brightwhite") ; official
foreground
+ (dracula-current "#44475a" "#262626" "brightblack") ; official
current-line/selection
+ (dracula-comment "#6272a4" "#7a7a7a" "blue") ; official
comment
+ (dracula-cyan "#8be9fd" "#88eeff" "brightcyan") ; official
cyan
+ (dracula-green "#50fa7b" "#55ff77" "green") ; official
green
+ (dracula-orange "#ffb86c" "#ffbb66" "brightred") ; official
orange
+ (dracula-pink "#ff79c6" "#ff77cc" "magenta") ; official
pink
+ (dracula-purple "#bd93f9" "#bb99ff" "brightmagenta") ;
official purple
+ (dracula-red "#ff5555" "#ff6655" "red") ; official
red
+ (dracula-yellow "#f1fa8c" "#ffff88" "yellow") ; official
yellow
;; Other colors
- (bg2 "#373844")
- (bg3 "#464752")
- (bg4 "#565761")
- (fg2 "#e2e2dc")
- (fg3 "#ccccc7")
- (fg4 "#b6b6b2")
- (other-blue "#0189cc")))
+ (bg2 "#373844" "#2e2e2e" "brightblack")
+ (bg3 "#464752" "#262626" "brightblack")
+ (bg4 "#565761" "#3f3f3f" "brightblack")
+ (fg2 "#e2e2dc" "#bfbfbf" "brightwhite")
+ (fg3 "#ccccc7" "#cccccc" "white")
+ (fg4 "#b6b6b2" "#bbbbbb" "white")
+ (other-blue "#0189cc" "#0088cc" "brightblue")))
(faces '(;; default
(cursor :background ,fg3)
(default :background ,dracula-bg :foreground ,dracula-fg)
@@ -48,7 +48,7 @@
(hl-line :background ,dracula-current :extend t)
(info-quoted-name :foreground ,dracula-orange)
(info-string :foreground ,dracula-yellow)
- (lazy-highlight :foreground ,fg2 :background ,bg3)
+ (lazy-highlight :foreground ,fg2 :background ,bg2)
(link :foreground ,dracula-cyan :underline t)
(linum :slant italic :foreground ,bg4 :background ,dracula-bg)
(line-number :slant italic :foreground ,bg4 :background
,dracula-bg)
@@ -511,17 +511,19 @@
'dracula
(let ((color-names (mapcar #'car colors))
(graphic-colors (mapcar #'cadr colors))
- (tty-colors (mapcar #'car (mapcar #'last colors))))
- (cl-flet* ((expand-for-tty (spec) (cl-progv color-names tty-colors
- (eval `(backquote ,spec))))
- (expand-for-graphic (spec) (cl-progv color-names
graphic-colors
- (eval `(backquote ,spec)))))
- (cl-loop for (face . spec) in faces
- collect `(,face
- ((((min-colors 16777216))
- ,(expand-for-graphic spec))
- (t
- ,(expand-for-tty spec)))))))))
+ (term-colors (mapcar #'car (mapcar #'cddr colors)))
+ (tty-colors (mapcar #'car (mapcar #'last colors)))
+ (expand-for-kind (lambda (kind spec)
+ (cl-progv color-names kind
+ (eval `(backquote ,spec))))))
+ (cl-loop for (face . spec) in faces
+ collect `(,face
+ ((((min-colors 16777216)) ; fully graphical envs
+ ,(funcall expand-for-kind graphic-colors spec))
+ (((min-colors 256)) ; terminal withs 256
colors
+ ,(funcall expand-for-kind term-colors spec))
+ (t ; should be only
tty-like envs
+ ,(funcall expand-for-kind tty-colors
spec))))))))
;;;###autoload
(when load-file-name
diff --git a/start_emacs_test.sh b/start_emacs_test.sh
new file mode 100755
index 0000000..2e87fcd
--- /dev/null
+++ b/start_emacs_test.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env sh
+
+ARGS=
+TERM_TEST=no
+COLOR=256color
+
+for arg in $*; do
+ case $arg in
+ 256) COLOR=256color ;;
+ 88) COLOR=88color ;;
+ 16) COLOR=16color ;;
+ *)
+ [ "$arg" = '-nw' ] && TERM_TEST=yes
+ ARGS="$ARGS $arg"
+ ;;
+ esac
+done
+
+[ "$TERM_TEST" = 'yes' ] && export TERM=xterm-$COLOR
+emacs -Q --debug-init -l test-profile.el $ARGS
diff --git a/test-profile.el b/test-profile.el
new file mode 100644
index 0000000..a5822f9
--- /dev/null
+++ b/test-profile.el
@@ -0,0 +1,4 @@
+(advice-add #'x-apply-session-resources :override #'ignore)
+
+(load-file "dracula-theme.el")
+(load-theme 'dracula t)
- [nongnu] elpa/dracula-theme f05192d 099/187: Change show-paren colors for something easier on eye, (continued)
- [nongnu] elpa/dracula-theme f05192d 099/187: Change show-paren colors for something easier on eye, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 25f0fea 100/187: Support whitespace mode, following as much as possible default emacs tone, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme f8a7f84 103/187: Update README.md, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 2537e8e 108/187: Merge branch 'emacs-27', ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 7d7a05a 109/187: Add forgotten basic success and error faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 3e6bbd3 110/187: Use dracula-fg/dracula-bg for term mode white/black, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 5eb9e7b 114/187: Less intrusive flyspell decoration, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 28b6ef8 118/187: Use whitebright as fg color in terms and try to improve lazy-highlight, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 499a4d3 117/187: Use a more readable color for comment in 256 colors, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 42d0ad3 120/187: Reformat README file, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme fcb9add 122/187: Merge branch 'ed-test-term-colors',
ELPA Syncer <=
- [nongnu] elpa/dracula-theme a59f773 123/187: Allow the use of a custom emacs bin in start_emacs_test.sh, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme ed2f68d 124/187: Improve tab-bar and tab-line colors, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 7751d4d 135/187: Bump version, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 4505d0b 131/187: Pinkify completions-first-difference, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme f11979b 132/187: Align markdown-mode on org-mode, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme e4672e2 137/187: Do not advertize dracula-use-24-bit-colors-on-256-colors-terms in README, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 12e2b3a 140/187: [DOCS] Update Homebrew Formulae to be correct, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme fea2f54 141/187: Merge pull request #61 from mattclegg/patch-1, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 11391ea 142/187: Try a new 256 colors palette, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 1ae8236 144/187: Merge branch 'new-256', ELPA Syncer, 2021/10/21