Compare commits

..

No commits in common. "main" and "1.1.0" have entirely different histories.
main ... 1.1.0

5 changed files with 154 additions and 317 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

View File

@ -1,67 +1,50 @@
# <img src=".repo-assets/icon.png" width=50> adwaita-dark-theme
A dark color scheme that aims to replicate the appearance and colors of GTK4 "libadwaita" applications.
# adwaita-dark-theme
[![MELPA](https://melpa.org/packages/adwaita-dark-theme-badge.svg)](https://melpa.org/#/adwaita-dark-theme)
[![MELPA Stable](https://stable.melpa.org/packages/adwaita-dark-theme-badge.svg)](https://stable.melpa.org/#/adwaita-dark-theme)
## About
`adwaita-dark-theme` is a dark color scheme that aims to replicate the appearance and colors of GTK4 "libadwaita" applications.
## Features
* Beautiful dark color scheme inspired by Adwaita
* Automatic 256-color mode support
* Configurable theme features
* Custom fringe bitmaps for diff-hl, flycheck, and flymake
* Custom configurations for
[neotree](https://github.com/jaypei/emacs-neotree)
and [eldoc-frame](https://git.tty.dog/jessieh/eldoc-frame)
* Custom fringe bitmaps for
[diff-hl](https://github.com/dgutov/diff-hl),
[flycheck](https://www.flycheck.org),
and [flymake](https://www.emacswiki.org/emacs/FlyMake)
* Lightweight, no dependencies
* Lightweight with no dependencies
## Preview
![Preview Image](.repo-assets/preview.webp "Preview Image")
![Preview Image](https://gitlab.com/jessieh/adwaita-dark-theme/raw/assets/preview.png "Preview Image")
## Configuration
To see all of the theme features that can be configured:
`M-x customize-group adwaita-dark-theme`
### Neotree Configuration
### Custom Neotree Configuration
`(eval-after-load 'neotree #'adwaita-dark-theme-neotree-configuration-enable)`
### eldoc-frame Configuration
`(eval-after-load 'eldoc-frame #'adwaita-dark-theme-eldoc-frame-configuration-enable)`
### Fringe Bitmaps
### Custom Fringe Bitmaps
To replace default line continuation/line wrap fringe bitmaps:\
`(adwaita-dark-theme-arrow-fringe-bmp-enable)`
For specific packages:
* diff-hl:\
To enable custom fringe bitmaps for [diff-hl](https://github.com/dgutov/diff-hl):\
`(eval-after-load 'diff-hl #'adwaita-dark-theme-diff-hl-fringe-bmp-enable)`
* flycheck:\
To enable custom fringe bitmaps for [flycheck](https://www.flycheck.org/en/latest/):\
`(eval-after-load 'flycheck #'adwaita-dark-theme-flycheck-fringe-bmp-enable)`
* flymake:\
To enable custom fringe bitmaps for [flymake](https://www.emacswiki.org/emacs/FlyMake):\
`(eval-after-load 'flymake #'adwaita-dark-theme-flymake-fringe-bmp-enable)`
## Feedback
If you experience any issues with this package, please
[open an issue](https://git.tty.dog/jessieh/adwaita-dark-theme/issues/new)
[open an issue](https://gitlab.com/jessieh/adwaita-dark-theme/issues/new)
on the issue tracker.
Suggestions for improvements and feature requests are always appreciated, as well!

View File

@ -1,11 +1,11 @@
;;; adwaita-dark-theme.el --- A dark color scheme inspired by Adwaita -*- lexical-binding: t; -*-
;;
;; Author: Jessie Hildebrandt <jessieh.net>
;; Homepage: https://gitlab.com/jessieh/adwaita-dark-theme
;; Keywords: mode-line faces
;; Version: 1.3.0
;; Version: 1.1.0
;; Package-Requires: ((emacs "27.1"))
;;
;; This file is not part of GNU Emacs.
;;; Commentary:
@ -16,8 +16,8 @@
;; Features offered:
;; * Beautiful dark color scheme inspired by Adwaita
;; * Automatic 256-color mode support
;; * Custom configurations for neotree and eldoc-frame
;; * Custom fringe bitmaps for line continuations, visual-line-mode, diff-hl, flycheck, and flymake
;; * Custom configuration for neotree
;; * Lightweight with no dependencies
;;
;; To replace default line continuation/line wrap fringe bitmaps:
@ -26,9 +26,6 @@
;; To enable custom configuration for `neotree':
;; (eval-after-load 'neotree #'adwaita-dark-theme-neotree-configuration-enable)
;;
;; To enable custom configuration for `eldoc-frame':
;; (eval-after-load 'eldoc-frame #'adwaita-dark-theme-eldoc-frame-configuration-enable)
;;
;; To enable custom fringe bitmaps for `diff-hl':
;; (eval-after-load 'diff-hl #'adwaita-dark-theme-diff-hl-fringe-bmp-enable)
;;
@ -67,33 +64,29 @@
;; External variable defs
;; ---------------------------------- ;;
(eval-when-compile
(defvar diff-hl-fringe-bmp-function)
(defvar eldoc-frame-parameters)
(defvar flymake-error-bitmap)
(defvar flymake-warning-bitmap)
(defvar flymake-note-bitmap)
(defvar neo-global--window))
(defvar diff-hl-fringe-bmp-function)
(defvar flymake-error-bitmap)
(defvar flymake-warning-bitmap)
(defvar flymake-note-bitmap)
(defvar neotree-dir-button-keymap)
(defvar neotree-file-button-keymap)
(defvar neo-global--window)
;; ---------------------------------- ;;
;; External function decls
;; ---------------------------------- ;;
(eval-when-compile
(declare-function flycheck-redefine-standard-error-levels "flycheck" (&optional margin-str fringe-bitmap))
(declare-function neo-open-dir "neotree" (full-path &optional arg))
(declare-function neo-open-file "neotree" (full-path &optional arg))
(declare-function neo-filepath-hidden-p "neotree" (node))
(declare-function neo-path--file-short-name "neotree" (file))
(declare-function neo-global--create-window "neotree" ())
(declare-function neo-buffer--newline-and-begin "neotree" ())
(declare-function neo-buffer--node-list-set "neotree" (line-num path))
(declare-function neo-buffer--insert-root-entry "neotree" (node))
(declare-function neo-buffer--insert-dir-entry "neotree" (node depth expanded))
(declare-function neo-buffer--insert-file-entry "neotree" (node depth))
(declare-function neotree-hidden-file-toggle "neotree" ())
(declare-function neotree-select-up-node "neotree" ())
(declare-function neotree-change-root "neotree" ()))
(declare-function flycheck-redefine-standard-error-levels "flycheck" (&optional margin-str fringe-bitmap))
(declare-function neo-path--file-short-name "neotree" (file))
(declare-function neo-buffer--node-list-set "neotree" (line-num path))
(declare-function neo-buffer--newline-and-begin "neotree" ())
(declare-function neo-global--select-window "neotree" ())
(declare-function neo-buffer--insert-root-entry "neotree" (node))
(declare-function neo-buffer--insert-dir-entry "neotree" (node depth expanded))
(declare-function neo-buffer--insert-file-entry "neotree" (node depth))
;; -------------------------------------------------------------------------- ;;
;;
@ -106,7 +99,7 @@
;; ---------------------------------- ;;
(deftheme adwaita-dark
"A dark color scheme inspired by Adwaita.")
"A dark color scheme inspired by the libadwaita colors.")
;; ---------------------------------- ;;
;; Group definition
@ -120,41 +113,11 @@
;; Variable definitions
;; ---------------------------------- ;;
(defcustom adwaita-dark-theme-pad-mode-line nil
"When non-nil, mode line faces will be padded similarly to GTK header bars."
:group 'adwaita-dark-theme
:type 'boolean)
(defcustom adwaita-dark-theme-pad-tab-line nil
"When non-nil, `tab-line-mode' faces will be padded similarly to GTK header bars."
:group 'adwaita-dark-theme
:type 'boolean)
(defcustom adwaita-dark-theme-pad-tab-bar nil
"When non-nil, `tab-bar-mode' faces will be padded similarly to GTK header bars."
:group 'adwaita-dark-theme
:type 'boolean)
(defcustom adwaita-dark-theme-no-completions-first-difference nil
"When non-nil, `completions-first-difference' will be set to an empty face."
:group 'adwaita-dark-theme
:type 'boolean)
(defcustom adwaita-dark-theme-bold-vertico-current nil
"When non-nil, `vertico-current' will be bolded to increase contrast."
:group 'adwaita-dark-theme
:type 'boolean)
(defcustom adwaita-dark-theme-gray-rainbow-delimiters nil
"When non-nil, `rainbow-delimiters-mode' faces will be the same shade of gray."
:group 'adwaita-dark-theme
:type 'boolean)
(defcustom adwaita-dark-theme-gray-outlines nil
"When non-nil, `outline-mode' faces will be alternating shades of gray."
:group 'adwaita-dark-theme
:type 'boolean)
;; -------------------------------------------------------------------------- ;;
;;
;; Theme code
@ -174,37 +137,34 @@
;; Background colors
;; [True color | 256-compatible]
(bg (if true-color-available-p "#1c1c1c" "gray11")) ; #1c1c1c
(bg-alt (if true-color-available-p "#242424" "gray14")) ; #242424
(bg-osd (if true-color-available-p "#060606" "gray3")) ; #080808
(base-0 (if true-color-available-p "#202020" "gray13")) ; #212121
(base-1 (if true-color-available-p "#262626" "gray15")) ; #262626
(base-2 (if true-color-available-p "#292929" "gray16")) ; #292929
(base-3 (if true-color-available-p "#303030" "gray19")) ; #303030
(base-4 (if true-color-available-p "#454545" "gray27")) ; #454545
(base-5 (if true-color-available-p "#656565" "gray40")) ; #666666
(base-6 (if true-color-available-p "#7b7b7b" "gray48")) ; #7a7a7a
(base-7 (if true-color-available-p "#a5a5a5" "gray65")) ; #a6a6a6
(base-8 (if true-color-available-p "#dfdfdf" "gray87")) ; #dedede
(bg (if true-color-available-p "#1e1e1e" "gray12")) ; #1f1f1f
(bg-alt (if true-color-available-p "#242424" "gray14")) ; #242424
(base-0 (if true-color-available-p "#202020" "gray13")) ; #212121
(base-1 (if true-color-available-p "#262626" "gray15")) ; #262626
(base-2 (if true-color-available-p "#292929" "gray16")) ; #292929
(base-3 (if true-color-available-p "#303030" "gray19")) ; #303030
(base-4 (if true-color-available-p "#454545" "gray27")) ; #454545
(base-5 (if true-color-available-p "#656565" "gray40")) ; #666666
(base-6 (if true-color-available-p "#7b7b7b" "gray48")) ; #7a7a7a
(base-7 (if true-color-available-p "#a5a5a5" "gray65")) ; #a6a6a6
(base-8 (if true-color-available-p "#dfdfdf" "gray87")) ; #dedede
;; Foreground colors
;; [True color | 256-compatible]
(fg (if true-color-available-p "#deddda" "gray86")) ; #dbdbdb
(fg-alt (if true-color-available-p "#77767b" "gray47")) ; #787878
(fg-osd (if true-color-available-p "#f0f0f0" "gray94")) ; #f0f0f0
(gray (if true-color-available-p "#3d3846" "gray23")) ; #3b3b3b
(red (if true-color-available-p "#ff6c6b" "indianred2")) ; #ee6363
(orange (if true-color-available-p "#ffa348" "orange2")) ; #ee9a00
(dark-orange (if true-color-available-p "#db6b1a" "darkorange3")) ; #cd6600
(green (if true-color-available-p "#54d18c" "seagreen3")) ; #43cd80
(teal (if true-color-available-p "#5bc8af" "mediumaquamarine")) ; #66cdaa
(yellow (if true-color-available-p "#f8e45c" "gold2")) ; #eec900
(blue (if true-color-available-p "#64a6f4" "steelblue2")) ; #5cacee
(dark-blue (if true-color-available-p "#1a5fb4" "dodgerblue4")) ; #104e8b
(magenta (if true-color-available-p "#dd80de" "orchid3")) ; #cd69c9
(pink (if true-color-available-p "#edb8ee" "plum")) ; #dda0dd
(violet (if true-color-available-p "#7d8ac7" "mediumpurple3")) ; #8968cd
(cyan (if true-color-available-p "#7ee5ff" "mediumturquoise"))) ; #48d1cc
(fg (if true-color-available-p "#deddda" "gray86")) ; #dbdbdb
(fg-alt (if true-color-available-p "#77767b" "gray47")) ; #787878
(gray (if true-color-available-p "#3d3846" "gray23")) ; #3b3b3b
(red (if true-color-available-p "#ff6c6b" "indianred2")) ; #ee6363
(orange (if true-color-available-p "#ffa348" "orange2")) ; #ee9a00
(green (if true-color-available-p "#54d18c" "seagreen3")) ; #43cd80
(teal (if true-color-available-p "#5bc8af" "mediumaquamarine")) ; #66cdaa
(yellow (if true-color-available-p "#f8e45c" "gold2")) ; #eec900
(blue (if true-color-available-p "#64a6f4" "steelblue2")) ; #5cacee
(dark-blue (if true-color-available-p "#1a5fb4" "dodgerblue4")) ; #104e8b
(magenta (if true-color-available-p "#dd80de" "orchid3")) ; #cd69c9
(pink (if true-color-available-p "#edb8ee" "plum")) ; #dda0dd
(violet (if true-color-available-p "#7d8ac7" "mediumpurple3")) ; #8968cd
(cyan (if true-color-available-p "#7ee5ff" "mediumturquoise"))) ; #48d1cc
(custom-theme-set-faces
'adwaita-dark
@ -221,13 +181,13 @@
`(warning ((,class (:foreground ,yellow))))
`(success ((,class (:foreground ,green))))
`(fringe ((,class (:inherit default :foreground ,base-4))))
`(region ((,class (:background ,base-4 :distant-foreground ,fg))))
`(region ((,class (:background ,base-4 :foreground nil :distant-foreground ,fg))))
`(highlight ((,class (:background ,blue :foreground ,base-0 :distant-foreground ,base-8))))
`(lazy-highlight ((,class (:inherit highlight))))
`(cursor ((,class (:background ,fg))))
`(shadow ((,class (:foreground ,base-5))))
`(minibuffer-prompt ((,class (:foreground ,base-7))))
`(tooltip ((,class (:background ,bg-osd :foreground ,fg-osd))))
`(tooltip ((,class (:background ,base-3 :foreground ,fg))))
`(secondary-selection ((,class (:background ,gray))))
`(fill-column-indicator ((,class (:foreground ,base-3))))
`(match ((,class (:foreground ,green :weight bold))))
@ -239,30 +199,30 @@
`(link-visited ((,class (:foreground ,magenta :underline t :weight bold))))
`(escape-glyph ((,class (:foreground ,pink))))
`(homoglyph ((,class (:inherit escape-glyph))))
`(widget-single-line-field ((,class (:background ,base-5))))
`(widget-single-line-field ((,class :background ,base-5)))
`(widget-field ((,class (:inherit widget-single-line-field :extend t))))
;; font-lock
`(font-lock-builtin-face ((,class (:foreground ,violet))))
`(font-lock-doc-face ((,class (:foreground ,base-6))))
`(font-lock-comment-face ((,class (:foreground ,base-5))))
`(font-lock-comment-delimiter-face ((,class (:inherit font-lock-comment-face))))
`(font-lock-delimiter-face ((,class (:foreground ,base-7))))
`(font-lock-doc-face ((,class (:inherit font-lock-comment-face :foreground ,base-6))))
`(font-lock-constant-face ((,class (:foreground ,violet))))
`(font-lock-variable-name-face ((,class ())))
`(font-lock-function-name-face ((,class ())))
`(font-lock-keyword-face ((,class (:foreground ,orange :weight bold))))
`(font-lock-type-face ((,class (:foreground ,teal :weight bold))))
`(font-lock-function-name-face ((,class (:foreground ,blue))))
`(font-lock-keyword-face ((,class (:inherit bold :foreground ,orange))))
`(font-lock-string-face ((,class (:foreground ,teal))))
`(font-lock-type-face ((,class (:foreground ,teal))))
`(font-lock-variable-name-face ((,class (:foreground ,fg))))
`(font-lock-warning-face ((,class (:inherit warning))))
`(font-lock-preprocessor-face ((,class (:foreground ,dark-orange))))
`(font-lock-negation-char-face ((,class (::weight bold))))
`(font-lock-regexp-grouping-backslash ((,class (:foreground ,teal :weight bold))))
`(font-lock-regexp-grouping-construct ((,class (:foreground ,teal :weight bold))))
`(font-lock-negation-char-face ((,class (:inherit bold :foreground ,blue))))
`(font-lock-preprocessor-face ((,class (:inherit bold :foreground ,violet))))
`(font-lock-preprocessor-char-face ((,class (:inherit bold :foreground ,violet))))
`(font-lock-regexp-grouping-backslash ((,class (:inherit bold :foreground ,teal))))
`(font-lock-regexp-grouping-construct ((,class (:inherit bold :foreground ,teal))))
;; mode-line/header-line
`(mode-line ((,class (:background ,base-3 :foreground ,fg :box ,(when adwaita-dark-theme-pad-mode-line `(:line-width ,mode-line-padding :color ,base-3))))))
`(mode-line-inactive ((,class (:background ,bg-alt :foreground ,base-5 :box ,(when adwaita-dark-theme-pad-mode-line `(:line-width ,mode-line-padding :color ,bg-alt))))))
`(mode-line ((,class (:background ,base-3 :foreground ,fg :box (:line-width ,mode-line-padding :color ,base-3)))))
`(mode-line-inactive ((,class (:background ,bg-alt :foreground ,base-5 :box (:line-width ,mode-line-padding :color ,bg-alt)))))
`(mode-line-emphasis ((,class (:foreground ,blue))))
`(mode-line-highlight ((,class (:foreground ,fg))))
`(mode-line-buffer-id ((,class (:foreground ,base-8 :weight bold))))
@ -310,7 +270,6 @@
;; completions
`(completions-annotations ((,class (:inherit shadow))))
`(completions-common-part ((,class (:foreground ,blue))))
`(completions-first-difference ((,class ,(unless adwaita-dark-theme-no-completions-first-difference '(:weight bold)))))
;; custom
`(custom-button ((,class (:background ,base-3 :foreground ,fg :box (:line-width 3 :color ,base-3)))))
@ -405,10 +364,10 @@
;; flymake
`(flymake-error ((,class (:underline (:color ,red)))))
`(flymake-note ((,class (:underline (:color ,green)))))
`(flymake-warning ((,class (:underline (:color ,yellow)))))
`(flymake-warning ((,class (:underline (:color ,orange)))))
;; flyspell
`(flyspell-incorrect ((,class (:underline (:color ,red)))))
`(flyspell-incorrect ((,class (:inherit unspecified :underline (:color ,red)))))
;; gdb
`(breakpoint-enabled ((,class (:foreground ,red))))
@ -440,8 +399,12 @@
`(isearch-fail ((,class (:foreground ,base-7 :strike-through t))))
;; line-number
`(line-number ((,class (:inherit default :foreground ,base-5))))
`(line-number-current-line ((,class (:inherit (hl-line default) :foreground ,base-7))))
`(line-number ((,class (:inherit default
:foreground ,base-5 :distant-foreground nil
:weight normal :italic nil :underline nil :strike-through nil))))
`(line-number-current-line ((,class (:inherit hl-line default
:foreground ,fg :distant-foreground nil
:weight normal :italic nil :underline nil :strike-through nil))))
;; linum
`(linum ((,class (:inherit line-number))))
@ -462,14 +425,14 @@
`(message-cited-text ((,class (:foreground ,magenta))))
;; outline
`(outline-1 ((,class (:foreground ,(if adwaita-dark-theme-gray-outlines base-6 blue) :weight bold))))
`(outline-2 ((,class (:foreground ,(if adwaita-dark-theme-gray-outlines base-7 magenta) :weight bold))))
`(outline-3 ((,class (:foreground ,(if adwaita-dark-theme-gray-outlines base-6 green) :weight bold))))
`(outline-4 ((,class (:foreground ,(if adwaita-dark-theme-gray-outlines base-5 violet) :weight bold))))
`(outline-5 ((,class (:foreground ,(if adwaita-dark-theme-gray-outlines base-6 teal) :weight bold))))
`(outline-6 ((,class (:foreground ,(if adwaita-dark-theme-gray-outlines base-7 blue) :weight bold))))
`(outline-7 ((,class (:foreground ,(if adwaita-dark-theme-gray-outlines base-6 magenta) :weight bold))))
`(outline-8 ((,class (:foreground ,(if adwaita-dark-theme-gray-outlines base-5 green) :weight bold))))
`(outline-1 ((,class (:foreground ,base-6 :weight bold))))
`(outline-2 ((,class (:foreground ,base-7 :weight bold))))
`(outline-3 ((,class (:foreground ,base-6 :weight bold))))
`(outline-4 ((,class (:foreground ,base-5 :weight bold))))
`(outline-5 ((,class (:foreground ,base-6 :weight bold))))
`(outline-6 ((,class (:foreground ,base-7 :weight bold))))
`(outline-7 ((,class (:foreground ,base-6 :weight bold))))
`(outline-8 ((,class (:foreground ,base-5 :weight bold))))
;; pulse
`(pulse-highlight-start-face ((,class (:background ,base-5 :extend t))))
@ -486,15 +449,15 @@
;; tab-line
`(tab-line ((,class (:background ,bg-alt))))
`(tab-line-tab ((,class (:background ,bg :foreground ,fg :box ,(when adwaita-dark-theme-pad-tab-line `(:line-width ,mode-line-padding :color ,bg))))))
`(tab-line-tab-inactive ((,class (:background ,bg-alt :foreground ,fg-alt :box ,(when adwaita-dark-theme-pad-tab-line `(:line-width ,mode-line-padding :color ,bg-alt))))))
`(tab-line-tab ((,class (:background ,bg :foreground ,fg :box (:line-width ,mode-line-padding :color ,bg)))))
`(tab-line-tab-inactive ((,class (:background ,bg-alt :foreground ,fg-alt :box (:line-width ,mode-line-padding :color ,bg-alt)))))
`(tab-line-tab-current ((,class (:inherit tab-line-tab))))
`(tab-line-highlight ((,class (:inherit tab-line-tab))))
;; tab-bar
`(tab-bar ((,class (:background ,bg-alt))))
`(tab-bar-tab ((,class (:background ,bg :foreground ,fg :box ,(when adwaita-dark-theme-pad-tab-bar `(:line-width ,mode-line-padding :color ,bg))))))
`(tab-bar-tab-inactive ((,class (:background ,bg-alt :foreground ,fg-alt :box ,(when adwaita-dark-theme-pad-tab-bar `(:line-width ,mode-line-padding :color ,bg-alt))))))
`(tab-bar-tab ((,class (:background ,bg :foreground ,fg :box (:line-width ,mode-line-padding :color ,bg)))))
`(tab-bar-tab-inactive ((,class (:background ,bg-alt :foreground ,fg-alt :box (:line-width ,mode-line-padding :color ,bg-alt)))))
;; which-func
`(which-func ((,class (:inherit font-lock-function-name-face))))
@ -537,34 +500,16 @@
`(bufler-path ((,class (:inherit font-lock-string-face))))
`(bufler-buffer-special ((,class (:inherit font-lock-builtin-face))))
;; cider
`(cider-fringe-good-face ((,class (:foreground ,green))))
`(cider-result-overlay-face ((,class (:foreground ,base-4))))
`(cider-error-overlay-face ((,class (:foreground ,red))))
`(cider-error-highlight-face ((,class (:underline (:color ,red)))))
`(cider-warning-highlight-face ((,class (:underline (:color ,yellow)))))
`(cider-deprecated-face ((,class (:inherit shadow :strike-through t))))
`(cider-repl-stdout-face ((,class (:inherit font-lock-doc-face))))
`(cider-repl-stderr-face ((,class (:inherit error))))
`(cider-test-error-face ((,class (:foreground ,dark-orange))))
`(cider-test-failure-face ((,class (:foreground ,red))))
`(cider-test-success-face ((,class (:foreground ,green))))
`(cider-stacktrace-fn-face ((,class (:foreground ,fg :weight bold))))
`(cider-stacktrace-error-class-face ((,class (:foreground ,red :weight bold))))
`(cider-stacktrace-error-message-face ((,class (:foreground ,fg))))
`(cider-stacktrace-filter-active-face ((,class (:inherit link))))
`(cider-stacktrace-filter-inactive-face ((,class (:inherit (shadow link)))))
;; company
`(company-tooltip ((,class (:background ,base-3 :foreground ,base-8))))
`(company-tooltip ((,class (:inherit tooltip))))
`(company-tooltip-common ((,class (:foreground ,blue :distant-foreground ,base-0 :weight bold))))
`(company-tooltip-search ((,class (:background ,blue :foreground ,bg :distant-foreground ,fg :weight bold))))
`(company-tooltip-search-selection ((,class (:background ,cyan :weight bold))))
`(company-tooltip-selection ((,class (:background ,dark-blue :weight bold))))
`(company-tooltip-mouse ((,class (:background ,magenta :foreground ,bg :distant-foreground ,fg))))
`(company-tooltip-annotation ((,class (:foreground ,violet :distant-foreground ,bg))))
`(company-scrollbar-bg ((,class (:background ,base-3))))
`(company-scrollbar-fg ((,class (:background ,base-5))))
`(company-scrollbar-bg ((,class (:inherit tooltip))))
`(company-scrollbar-fg ((,class (:background ,blue))))
`(company-preview ((,class (:foreground ,base-5))))
`(company-preview-common ((,class (:background ,base-3 :foreground ,blue))))
`(company-preview-search ((,class (:inherit company-tooltip-search))))
@ -586,14 +531,6 @@
`(diff-hl-delete ((,class (:foreground ,red))))
`(diff-hl-insert ((,class (:foreground ,green))))
;; eldoc-box
`(eldoc-box-body ((,class (:inherit (tooltip variable-pitch-text)))))
`(eldoc-box-border ((,class (:background ,base-3))))
;; eldoc-frame
`(eldoc-frame-default ((,class (:inherit (tooltip variable-pitch-text)))))
`(eldoc-frame-border ((,class (:background ,base-3))))
;; fic-mode
`(fic-face ((,class (:foreground ,yellow :weight bold))))
@ -621,9 +558,9 @@
`(git-gutter:deleted ((,class (:foreground ,red))))
;; git-gutter+
`(git-gutter+-modified ((,class (:foreground ,orange))))
`(git-gutter+-added ((,class (:foreground ,green))))
`(git-gutter+-deleted ((,class (:foreground ,red))))
`(git-gutter+-modified ((,class (:background nil :foreground ,orange))))
`(git-gutter+-added ((,class (:background nil :foreground ,green))))
`(git-gutter+-deleted ((,class (:background nil :foreground ,red))))
;; git-gutter-fringe
`(git-gutter-fr:modified ((,class (:inherit git-gutter:modified))))
@ -670,8 +607,8 @@
`(ido-vertical-match-face ((,class (:foreground ,blue :underline nil))))
;; ivy
`(ivy-current-match ((,class (:background ,base-4))))
`(ivy-minibuffer-match-face-1 ((,class (:foreground ,gray :weight light))))
`(ivy-current-match ((,class (:background ,base-4 :distant-foreground nil))))
`(ivy-minibuffer-match-face-1 ((,class (:background nil :foreground ,gray :weight light))))
`(ivy-minibuffer-match-face-2 ((,class (:inherit ivy-minibuffer-match-face-1 :background ,base-1 :foreground ,magenta :weight semi-bold))))
`(ivy-minibuffer-match-face-3 ((,class (:inherit ivy-minibuffer-match-face-2 :foreground ,green :weight semi-bold))))
`(ivy-minibuffer-match-face-4 ((,class (:inherit ivy-minibuffer-match-face-2 :foreground ,yellow :weight semi-bold))))
@ -793,9 +730,7 @@
`(paren-face-no-match ((,class (:inherit show-paren-mismatch))))
;; mood-line
`(mood-line-buffer-status-narrowed ((,class (:foreground ,base-7))))
`(mood-line-status-info ((,class (:foreground ,teal))))
`(mood-line-unimportant ((,class (:foreground ,base-5))))
;; multiple-cursors
`(mc/cursor-face ((,class (:inherit cursor :background ,fg-alt))))
@ -805,29 +740,23 @@
;; neotree
`(neo-root-dir-face ((,class (:foreground ,base-8 :weight bold))))
`(neo-dir-link-face ((,class (:foreground ,base-7))))
`(neo-file-link-face ((,class (:foreground ,fg))))
`(neo-expand-btn-face ((,class (:foreground ,base-4))))
`(neo-vc-edited-face ((,class (:foreground ,orange))))
`(neo-dir-link-face ((,class (:foreground ,fg :foreground ,base-7))))
`(neo-expand-btn-face ((,class (:foreground ,blue))))
`(neo-vc-edited-face ((,class (:foreground ,yellow))))
`(neo-vc-added-face ((,class (:foreground ,green))))
`(neo-vc-removed-face ((,class (:foreground ,red :strike-through t))))
`(neo-vc-ignored-face ((,class (:foreground ,base-6))))
`(neo-vc-ignored-face ((,class (:foreground ,base-5))))
;; nlinum
`(nlinum-current-line ((,class (:inherit line-number-current-line))))
`(nlinum-hl-face ((,class (:inherit line-number-current-line))))
`(nlinum-relative-current-face ((,class (:inherit line-number-current-line))))
;; orderless
`(orderless-match-face-0 ((,class (:inherit completions-common-part))))
`(orderless-match-face-1 ((,class (:inherit orderless-match-face-0))))
`(orderless-match-face-2 ((,class (:inherit orderless-match-face-0))))
`(orderless-match-face-3 ((,class (:inherit orderless-match-face-0))))
;; popup
`(popup-face ((,class (:background ,base-3 :foreground ,base-8))))
`(popup-tip-face ((,class (:inherit tooltip))))
`(popup-selection-face ((,class (:background ,base-4))))
`(popup-face ((,class (:inherit tooltip))))
`(popup-tip-face ((,class (:inherit popup-face :background ,base-0 :foreground ,violet))))
`(popup-selection-face ((,class (:background ,base-5))))
;; rainbow-delimiters
`(rainbow-delimiters-depth-1-face ((,class (:foreground ,(if adwaita-dark-theme-gray-rainbow-delimiters base-7 blue)))))
@ -842,13 +771,6 @@
`(rainbow-delimiters-unmatched-face ((,class (:foreground ,red :weight ultra-bold))))
`(rainbow-delimiters-mismatched-face ((,class (:inherit rainbow-delimiters-unmatched-face))))
;; sly
`(sly-action-face ((,class (:inherit link))))
`(sly-mrepl-prompt-face ((,class (:inherit font-lock-type-face))))
`(sly-mrepl-output-face ((,class (:inherit font-lock-doc-face))))
`(sly-mrepl-note-face ((,class (:inherit font-lock-comment-face))))
`(sly-db-section-face ((,class (:foreground ,base-8 :weight bold :box ,(when flat-button-available-p '(:line-width 4 :style flat-button))))))
;; smartparens
`(sp-pair-overlay-face ((,class (:background ,base-4))))
`(sp-show-pair-match-face ((,class (:inherit show-paren-match))))
@ -856,8 +778,7 @@
;; solaire-mode
`(solaire-default-face ((,class (:inherit default :background ,bg-alt))))
`(solaire-hl-line-face ((,class (:inherit hl-line :background ,base-3))))
`(solaire-fringe-face ((,class (:inherit solaire-default-face))))
`(solaire-hl-line-face ((,class (:inherit hl-line :background ,bg))))
;; swiper
`(swiper-line-face ((,class (:background ,blue :foreground ,base-0))))
@ -866,11 +787,6 @@
`(swiper-match-face-3 ((,class (:background ,magenta :foreground ,base-0 :weight bold))))
`(swiper-match-face-4 ((,class (:background ,green :foreground ,base-0 :weight bold))))
;; tempel
`(tempel-form ((,class ())))
`(tempel-field ((,class (:underline (:color ,base-5)))))
`(tempel-default ((,class (:underline t))))
;; transient
`(transient-heading ((,class (:foreground ,base-8 :weight bold))))
`(transient-key ((,class (:inherit help-key-binding))))
@ -899,8 +815,7 @@
`(undo-tree-visualizer-register-face ((,class (:foreground ,yellow))))
;; vertico
`(vertico-current ((,class (:background ,base-3 :bold ,(when adwaita-dark-theme-bold-vertico-current 'bold)))))
`(vertico-multiline ((,class (:foreground ,base-6))))
`(vertico-current ((,class (:background ,base-3 :weight bold))))
;; vundo
`(vundo-default ((,class (:background ,bg-alt))))
@ -927,88 +842,57 @@
;; Internal functions
;; ---------------------------------- ;;
(defun adwaita-dark-theme--neotree-hidden-dir-p (dirname)
"Return non-nil if DIRNAME should be considered hidden."
(string-prefix-p "." dirname))
(defun adwaita-dark-theme--neotree-hidden-file-p (filename)
"Return non-nil if FILENAME should be considered hidden."
(or (string-prefix-p "." filename)
(and (string-prefix-p "#" filename)
(string-suffix-p "#" filename))))
(defun adwaita-dark-theme--neotree-insert-root (node)
"Insert root directory NODE at point."
(insert " ")
(insert-button (concat ""
(propertize "🖿"
'face '(:inherit (neo-root-dir-face) :height 1.5))
" "
(propertize (or (neo-path--file-short-name node) "-")
'face 'neo-root-dir-face)
(propertize " "
'display `((space :align-to (- right 0 1)))))
'face '(nil)
'follow-link t
'neo-full-path (directory-file-name node)
'keymap (let ((button-keymap (make-sparse-keymap)))
(define-key button-keymap [mouse-2] (lambda ()
(interactive)
(neotree-hidden-file-toggle)))
(define-key button-keymap [mouse-3] (lambda ()
(interactive)
(mouse-set-point last-input-event)
(neotree-select-up-node)))
button-keymap)
'help-echo "mouse-1: Toggle hidden files\nmouse-3: Move root up one directory")
(neo-buffer--newline-and-begin))
(insert " "
(propertize
"🖿"
'face '(:inherit (neo-root-dir-face) :height 1.5))
(propertize
(concat " " (or (neo-path--file-short-name node) "-") " \n")
'face '(:inherit (neo-root-dir-face) :height 1.0))))
(defun adwaita-dark-theme--neotree-insert-dir (node depth expanded)
"Insert directory NODE with indentation level DEPTH and state EXPANDED at point."
(let ((short-name (neo-path--file-short-name node))
(is-hidden (neo-filepath-hidden-p node)))
(insert " ")
(insert-button (concat (make-string (- (* depth 2) 1) ?\s)
(propertize (concat "🖿 "
short-name)
'face (if is-hidden
'(:inherit shadow neo-dir-link-face)
'neo-dir-link-face))
(propertize " "
'display `((space :align-to (- right 0 3))))
(propertize (if expanded "" " ")
'face '(:inherit neo-expand-btn-face :height 1.2))
(propertize " "
'display `((space :align-to (- right 0 1)))))
'face '(nil)
(face '(:inherit (neo-dir-link-face))))
(when (adwaita-dark-theme--neotree-hidden-dir-p short-name)
(setq face '(:inherit (shadow neo-dir-link-face))))
(insert-char ?\s (* (- depth 1) 2))
(insert (propertize
(if expanded "" "")
'face face))
(insert-button (concat "🖿 " short-name)
'follow-link t
'face face
'neo-full-path node
'keymap (let ((button-keymap (make-sparse-keymap)))
(define-key button-keymap [mouse-2] (lambda ()
(interactive)
(let ((neo-click-changes-root nil))
(ignore neo-click-changes-root)
(neo-open-dir node))))
(define-key button-keymap [mouse-3] (lambda ()
(interactive)
(mouse-set-point last-input-event)
(neotree-change-root)))
button-keymap)
'help-echo "mouse-1: Fold/unfold directory\nmouse-3: Change root to directory")
'keymap neotree-dir-button-keymap)
(neo-buffer--node-list-set nil node)
(neo-buffer--newline-and-begin)))
(defun adwaita-dark-theme--neotree-insert-file (node depth)
"Insert file NODE with indentation level DEPTH at point."
(let* ((short-name (neo-path--file-short-name node))
(is-hidden (neo-filepath-hidden-p node)))
(insert " ")
(insert-button (concat (make-string (- (* depth 2) 1) ?\s)
short-name
(propertize " "
'display `((space :align-to (- right 0 1)))))
(let ((short-name (neo-path--file-short-name node))
(face '(:inherit (neo-file-link-face))))
(when (adwaita-dark-theme--neotree-hidden-file-p short-name)
(setq face '(:inherit shadow neo-file-link-face)))
(insert-char ?\s (* (- depth 1) 2))
(insert (propertize " " 'face face))
(insert-button short-name
'follow-link t
'face (if is-hidden
'(:inherit shadow neo-file-link-face)
'neo-file-link-face)
'face face
'neo-full-path node
'keymap (let ((button-keymap (make-sparse-keymap)))
(define-key button-keymap [mouse-2] (lambda ()
(interactive)
(neo-open-file node)))
button-keymap)
'help-echo "mouse-1: Open file")
'keymap neotree-file-button-keymap)
(neo-buffer--node-list-set nil node)
(neo-buffer--newline-and-begin)))
@ -1019,48 +903,18 @@
;;;###autoload
(defun adwaita-dark-theme-neotree-configuration-enable ()
"Enable custom adwaita-dark configuration for use with neotree."
(advice-add #'neo-global--create-window :after (lambda ()
(setq-local cursor-type nil
line-spacing 0.25
(advice-add #'neo-global--select-window :after (lambda ()
(setq-local line-spacing 3
mode-line-format nil
auto-hscroll-mode nil
buffer-display-table (make-display-table))
(set-display-table-slot buffer-display-table
'truncation
(make-glyph-code 8230 'fringe))
(visual-line-mode -1)
(set-window-fringes neo-global--window 0 0)
(visual-line-mode -1)))
(set-display-table-slot buffer-display-table 'truncation 8230)))
(advice-add #'neo-buffer--insert-root-entry :override #'adwaita-dark-theme--neotree-insert-root)
(advice-add #'neo-buffer--insert-dir-entry :override #'adwaita-dark-theme--neotree-insert-dir)
(advice-add #'neo-buffer--insert-file-entry :override #'adwaita-dark-theme--neotree-insert-file))
;; -------------------------------------------------------------------------- ;;
;;
;; eldoc-frame configuration
;;
;; -------------------------------------------------------------------------- ;;
;; ---------------------------------- ;;
;; Setup function
;; ---------------------------------- ;;
;;;###autoload
(defun adwaita-dark-theme-eldoc-frame-configuration-enable ()
"Enable custom adwaita-dark configuration for use with eldoc-frame."
(set-face-background 'eldoc-frame-default "#000000")
(dolist (parameter '((left-fringe . 12)
(right-fringe . 12)
(alpha-background . 80)))
(add-to-list 'eldoc-frame-parameters parameter))
(add-hook 'eldoc-frame-buffer-hook
(lambda ()
(setq-local line-spacing 0.25)
(goto-char (point-min))
(insert (propertize "\s\n" 'face '(:height 0.2)))
(goto-char (point-max))
(insert (propertize "\s\n" 'face '(:height 0.2))))
100))
;; -------------------------------------------------------------------------- ;;
;;
;; Arrow fringe bitmaps configuration