[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/dracula-theme 75316aa 116/187: Begin to work on terminal c
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/dracula-theme 75316aa 116/187: Begin to work on terminal colors fix |
Date: |
Thu, 21 Oct 2021 18:05:06 -0400 (EDT) |
branch: elpa/dracula-theme
commit 75316aa1ef1d49207b4a57ac3b3ff8e4313dad02
Author: Étienne Deparis <etienne@depar.is>
Commit: Étienne Deparis <etienne@depar.is>
Begin to work on terminal colors fix
---
dracula-theme.el | 60 +++++++++++++++++++++++++++--------------------------
start_emacs_test.sh | 20 ++++++++++++++++++
test-profile.el | 4 ++++
3 files changed, 55 insertions(+), 29 deletions(-)
diff --git a/dracula-theme.el b/dracula-theme.el
index a5a71e9..dbf0cf2 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-current "#44475a" "#262626" "brightblack") ;
official current-line/selection
+ (dracula-fg "#f8f8f2" "white" "white") ;
official foreground
+ (dracula-comment "#6272a4" "#525252" "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)
@@ -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 526ba3d 085/187: Add haskell mode support, (continued)
- [nongnu] elpa/dracula-theme 526ba3d 085/187: Add haskell mode support, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme b3dbb6f 091/187: Add missing titles, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme deaeae8 096/187: Sort faces by name, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 4c1d9bf 097/187: Boldify font-lock-variable-name-face, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 0cb5a39 101/187: Create INSTALL.md, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme a492387 104/187: Improve current commit message display in magit, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 0cfaa35 105/187: Add :extend t when necessary, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme c2b028c 106/187: Update magit colors, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 05937df 111/187: Try a variant for background color in terminal, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme be7982f 113/187: Better gnus summary faces, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 75316aa 116/187: Begin to work on terminal colors fix,
ELPA Syncer <=
- [nongnu] elpa/dracula-theme 6483f60 119/187: Use a clearer color for comments in 256 colors mode, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 3a8a6f0 121/187: Add an entry about start_emacs_test.sh in the README, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme d145ed5 125/187: Bump version, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 9f23772 126/187: Little customization for the test-profile.el file, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme b5c5ee4 127/187: Introduce variables to enable/disable custom font size on some headings, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 583a811 128/187: Add a new variable to enable an alternate modeline/minibuffer experience, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 5190395 133/187: Document new them settings, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme f5918cb 136/187: Add a setting to force 24bit colors on 256 colors terms, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme fb010af 130/187: Use same colors for outline levels than org-mode titles, ELPA Syncer, 2021/10/21
- [nongnu] elpa/dracula-theme 9b87aee 008/187: Emacs: improve ido-support., ELPA Syncer, 2021/10/21