branch: externals/nano-theme commit 5d4f6c6dbeba3ba9105f92af0c29d42d17555f85 Author: Nicolas P. Rougier <nicolas.roug...@inria.fr> Commit: Nicolas P. Rougier <nicolas.roug...@inria.fr>
Added GNUS faces and suppressed warnings --- nano-theme.el | 173 +++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 141 insertions(+), 32 deletions(-) diff --git a/nano-theme.el b/nano-theme.el index 1e7164e..a6ec684 100644 --- a/nano-theme.el +++ b/nano-theme.el @@ -1,28 +1,55 @@ -;;; nano-theme.el --- NΛNO theme -*- lexical-binding: t -*- -;; --------------------------------------------------------------------- -;; GNU Emacs / NΛNO theme -;; Copyright (C) 2020-2021 - NΛNO developers -;; -;; This program is free software; you can redistribute it and/or modify +;;; nano-theme.el --- N Λ N O theme -*- lexical-binding: t -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc. + +;; Maintainer: Nicolas P. Rougier <nicolas.roug...@inria.fr> +;; URL: https://github.com/rougier/svg-lib +;; Version: 0.1 +;; Package-Requires: ((emacs "27.1")) +;; Keywords: theme, dark, light + +;; This file is not part of GNU Emacs. + +;; This file 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, +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; This file 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. + +;; For a full copy of the GNU General Public License +;; see <https://www.gnu.org/licenses/>. + +;;; Commentary: ;; -;; You should have received a copy of the GNU General Public License -;; along with this program. If not, see <http://www.gnu.org/licenses/>. -;; --------------------------------------------------------------------- +;; Usage example: +;; +;; (nano-light) or (nano-dark) +;; +;; Optionally, you can use (nano-setup) to setup default settings. +;; Be careful since it will modify your configuration. +;; +;; Recommended font is "Roboto Mono" or "Roboto Mono Nerd" if you want +;; all the fancy glyphs. See https://www.nerdfonts.com. + +;;; NEWS: + +;; Version 0.1 +;; - Submission to ELPA + + +;;; Code: (require 'disp-table) (deftheme nano "N Λ N O Theme") (defgroup nano nil - "N Λ N O") + "N Λ N O" + :group 'convenience) (defgroup nano-light nil "Light theme color palette" :group 'nano) @@ -249,10 +276,10 @@ background color that is barely perceptible." (setq default-major-mode 'text-mode) ;; Moderate font lock - (setq font-lock-maximum-decoration nil) + (setq font-lock-maximum-decoration t) - ;; No limit on font lock - (setq font-lock-maximum-size nil) + ;; No limit on font lock (obsolete) + ;; (setq font-lock-maximum-size nil) ;; No line break space points (setq auto-fill-mode nil) @@ -265,6 +292,10 @@ background color that is barely perceptible." (setq-default cursor-in-non-selected-windows nil) (setq blink-cursor-mode nil) + ;; No tooltips + (if (fboundp 'tooltip-mode) + (tooltip-mode -1)) + ;; No scroll bars (if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) @@ -297,11 +328,13 @@ background color that is barely perceptible." (set-display-table-slot standard-display-table 'truncation (make-glyph-code ?… 'nano-faded)) (set-display-table-slot standard-display-table - 'wrap (make-glyph-code ?… 'nano-faded)) + 'wrap (make-glyph-code ?- 'nano-faded)) ;; Nerd font for glyph icons - (set-fontset-font t '(#xe000 . #xffdd) - (font-spec :name "RobotoMono Nerd Font Mono"))) + (let ((roboto-nerd (font-spec :name "RobotoMono Nerd Font Mono"))) + (if (find-font roboto-nerd) + (set-fontset-font t '(#xe000 . #xffdd) roboto-nerd) + (message "Roboto Mono Nerd font has not been found on your system")))) (defun nano-light () @@ -384,8 +417,9 @@ background color that is barely perceptible." ;; --- Theme ---------------------------------------------------------- (let ((light '((background light))) (dark '((background dark))) - (tty-light '((type tty) (background light))) - (tty-dark '((type tty) (background dark)))) + ;; (tty-light '((type tty) (background light))) + ;; (tty-dark '((type tty) (background dark))) + ) ;; Enforce nano fonts (if nano-fonts-use @@ -425,6 +459,11 @@ background color that is barely perceptible." (,dark (:foreground ,nano-dark-background :background ,nano-dark-foreground)))) + `(mouse ((,light (:foreground ,nano-light-foreground + :background ,nano-light-background)) + (,dark (:foreground ,nano-dark-foreground + :background ,nano-dark-background)))) + `(highlight ((,light (:background ,nano-light-highlight)) (,dark (:background ,nano-dark-highlight)))) @@ -597,7 +636,7 @@ background color that is barely perceptible." '(font-lock-constant-face ((t (:inherit nano-salient)))) '(font-lock-warning-face ((t (:inherit nano-popout)))) '(font-lock-function-name-face ((t (:inherit nano-strong)))) - '(font-lock-variable-name-face ((t (:inherit nano-strong)))) + '(font-lock-variable-name-face ((t (:inherit nano-strong nano-salient)))) '(font-lock-builtin-face ((t (:inherit nano-salient)))) '(font-lock-type-face ((t (:inherit nano-salient)))) '(font-lock-keyword-face ((t (:inherit nano-salient)))) @@ -702,8 +741,6 @@ background color that is barely perceptible." '(epa-validity-low ((t (:inherit nano-faded)))) ;; --- Popup -------------------------------------------------------- - - '(popup-face ((t (:inherit highlight)))) '(popup-isearch-match ((t (:inherit nano-popout)))) '(popup-menu-face ((t (:inherit nano-subtle)))) @@ -780,7 +817,6 @@ background color that is barely perceptible." '(org-agenda-restriction-lock ((t (:inherit nano-faded)))) '(org-agenda-structure ((t (:inherit nano-strong)))) - ;; --- Org ---------------------------------------------------------- '(org-archived ((t (:inherit nano-faded)))) '(org-block ((t (:inherit highlight)))) @@ -799,14 +835,14 @@ background color that is barely perceptible." '(org-document-info ((t (:inherit nano-faded)))) '(org-document-info-keyword ((t (:inherit nano-faded)))) '(org-document-title ((t (:inherit nano-faded)))) - '(org-done ((t (:inherit nano-default)))) + '(org-done ((t (:inherit nano-faded)))) '(org-drawer ((t (:inherit nano-faded)))) '(org-ellipsis ((t (:inherit nano-faded)))) '(org-footnote ((t (:inherit nano-faded)))) '(org-formula ((t (:inherit nano-faded)))) '(org-headline-done ((t (:inherit nano-faded)))) - '(org-hide ((t (:inherit nano-subtle-i)))) - '(org-indent ((t (:inherit nano-subtle-i)))) + ;; '(org-hide ((t (:inherit nano-subtle-i)))) + ;; '(org-indent ((t (:inherit nano-subtle-i)))) '(org-latex-and-related ((t (:inherit nano-faded)))) '(org-level-1 ((t (:inherit nano-strong)))) '(org-level-2 ((t (:inherit nano-strong)))) @@ -836,12 +872,11 @@ background color that is barely perceptible." '(org-target ((t (:inherit nano-faded)))) '(org-time-grid ((t (:inherit nano-faded)))) '(org-todo ((t (:inherit nano-salient)))) - '(org-upcoming-deadline ((t (:inherit nano-default)))) + '(org-upcoming-deadline ((t (:inherit nano-popout)))) '(org-verbatim ((t (:inherit nano-popout)))) '(org-verse ((t (:inherit nano-faded)))) '(org-warning ((t (:inherit nano-popout)))) - ;; --- Mu4e --------------------------------------------------------- '(mu4e-attach-number-face ((t (:inherit nano-strong)))) '(mu4e-cited-1-face ((t (:inherit nano-faded)))) @@ -856,7 +891,7 @@ background color that is barely perceptible." '(mu4e-contact-face ((t (:inherit nano-salient)))) '(mu4e-context-face ((t (:inherit nano-faded)))) '(mu4e-draft-face ((t (:inherit nano-faded)))) - '(mu4e-flagged-face ((t (:inherit nano-popout)))) + '(mu4e-flagged-face ((t (:inherit nano-salient)))) '(mu4e-footer-face ((t (:inherit nano-faded)))) '(mu4e-forwarded-face ((t (:inherit nano-default)))) '(mu4e-header-face ((t (:inherit nano-default)))) @@ -881,6 +916,79 @@ background color that is barely perceptible." '(mu4e-view-body-face ((t (:inherit nano-default)))) '(mu4e-warning-face ((t (:inherit nano-popout)))) + ;; --- GNUS --------------------------------------------------------- + + '(gnus-button ((t (:inherit nano-salient)))) + '(gnus-cite-1 ((t (:inherit nano-faded)))) + '(gnus-cite-10 ((t (:inherit nano-faded)))) + '(gnus-cite-11 ((t (:inherit nano-faded)))) + '(gnus-cite-2 ((t (:inherit nano-faded)))) + '(gnus-cite-3 ((t (:inherit nano-faded)))) + '(gnus-cite-4 ((t (:inherit nano-faded)))) + '(gnus-cite-5 ((t (:inherit nano-faded)))) + '(gnus-cite-6 ((t (:inherit nano-faded)))) + '(gnus-cite-7 ((t (:inherit nano-faded)))) + '(gnus-cite-8 ((t (:inherit nano-faded)))) + '(gnus-cite-9 ((t (:inherit nano-faded)))) + '(gnus-cite-attribution ((t (:inherit nano-faded)))) + '(gnus-emphasis-bold ((t (:inherit nano-faded)))) + '(gnus-emphasis-bold-italic ((t (:inherit nano-faded)))) + '(gnus-emphasis-highlight-words ((t (:inherit nano-faded)))) + '(gnus-emphasis-italic ((t (:inherit nano-faded)))) + '(gnus-emphasis-strikethru ((t (:inherit nano-faded)))) + '(gnus-emphasis-underline ((t (:inherit nano-faded)))) + '(gnus-emphasis-underline-bold ((t (:inherit nano-faded)))) + '(gnus-emphasis-underline-bold-italic ((t (:inherit nano-faded)))) + '(gnus-emphasis-underline-italic ((t (:inherit nano-faded)))) + '(gnus-group-mail-1 ((t (:inherit nano-faded)))) + '(gnus-group-mail-1-empty ((t (:inherit nano-faded)))) + '(gnus-group-mail-2 ((t (:inherit nano-faded)))) + '(gnus-group-mail-2-empty ((t (:inherit nano-faded)))) + '(gnus-group-mail-3 ((t (:inherit nano-faded)))) + '(gnus-group-mail-3-empty ((t (:inherit nano-faded)))) + '(gnus-group-mail-low ((t (:inherit nano-faded)))) + '(gnus-group-mail-low-empty ((t (:inherit nano-faded)))) + '(gnus-group-news-1 ((t (:inherit nano-faded)))) + '(gnus-group-news-1-empty ((t (:inherit nano-faded)))) + '(gnus-group-news-2 ((t (:inherit nano-faded)))) + '(gnus-group-news-2-empty ((t (:inherit nano-faded)))) + '(gnus-group-news-3 ((t (:inherit nano-faded)))) + '(gnus-group-news-3-empty ((t (:inherit nano-faded)))) + '(gnus-group-news-4 ((t (:inherit nano-faded)))) + '(gnus-group-news-4-empty ((t (:inherit nano-faded)))) + '(gnus-group-news-5 ((t (:inherit nano-faded)))) + '(gnus-group-news-5-empty ((t (:inherit nano-faded)))) + '(gnus-group-news-6 ((t (:inherit nano-faded)))) + '(gnus-group-news-6-empty ((t (:inherit nano-faded)))) + '(gnus-group-news-low ((t (:inherit nano-faded)))) + '(gnus-group-news-low-empty ((t (:inherit nano-faded)))) + + '(gnus-header-content ((t (:inherit nano-faded)))) + '(gnus-header-from ((t (:inherit nano-strong)))) + '(gnus-header-name ((t (:inherit nano-strong)))) + '(gnus-header-newsgroups ((t (:inherit nano-faded)))) + '(gnus-header-subject ((t (:inherit nano-default)))) + + '(gnus-signature ((t (:inherit nano-faded)))) + '(gnus-splash ((t (:inherit nano-faded)))) + '(gnus-summary-cancelled ((t (:inherit nano-faded)))) + '(gnus-summary-high-ancient ((t (:inherit nano-faded)))) + '(gnus-summary-high-read ((t (:inherit nano-faded)))) + '(gnus-summary-high-ticked ((t (:inherit nano-faded)))) + '(gnus-summary-high-undownloaded ((t (:inherit nano-faded)))) + '(gnus-summary-high-unread ((t (:inherit nano-faded)))) + '(gnus-summary-low-ancient ((t (:inherit nano-faded)))) + '(gnus-summary-low-read ((t (:inherit nano-faded)))) + '(gnus-summary-low-ticked ((t (:inherit nano-faded)))) + '(gnus-summary-low-undownloaded ((t (:inherit nano-faded)))) + '(gnus-summary-low-unread ((t (:inherit nano-faded)))) + '(gnus-summary-normal-ancient ((t (:inherit nano-faded)))) + '(gnus-summary-normal-read ((t (:inherit nano-faded)))) + '(gnus-summary-normal-ticked ((t (:inherit nano-faded)))) + '(gnus-summary-normal-undownloaded ((t (:inherit nano-faded)))) + '(gnus-summary-normal-unread ((t (:inherit nano-faded)))) + '(gnus-summary-selected ((t (:inherit nano-faded)))) + ;; --- Elfeed ------------------------------------------------------- '(elfeed-log-date-face ((t (:inherit nano-faded)))) '(elfeed-log-info-level-face ((t (:inherit nano-default)))) @@ -994,3 +1102,4 @@ background color that is barely perceptible." (file-name-as-directory (file-name-directory load-file-name)))) (provide-theme 'nano) +;;; nano-theme.el ends here