From 9c48decc134b5785c2f5bd0535e88928b06bb813 Mon Sep 17 00:00:00 2001 From: Amin Bandali Date: Sat, 25 Apr 2020 12:17:59 -0400 Subject: [PATCH] Add and use my new Refinery colour theme Assimilate 4 drones Assimilate minions v0.3.3-2-gbc1edab Assimilate refinery-theme 71b5501 Assimilate rich-minority 1.0.3-2-ga03e693 Assimilate smart-mode-line 2.13-1-g999be06 * init.el: Move theme-related things from here... * lisp/bandali-theme.el: ...to here. * lisp/bandali-ivy.el: Face customizations now in Refinery. --- .gitmodules | 12 +++ init.el | 95 +------------------ lib/minions | 1 + lib/refinery-theme | 1 + lib/rich-minority | 1 + lib/smart-mode-line | 1 + lisp/bandali-ivy.el | 11 +-- lisp/bandali-theme.el | 94 ++++++++++++++++++ ...me.el => smart-mode-line-bandali-theme.el} | 42 ++++---- 9 files changed, 135 insertions(+), 123 deletions(-) create mode 160000 lib/minions create mode 160000 lib/refinery-theme create mode 160000 lib/rich-minority create mode 160000 lib/smart-mode-line create mode 100644 lisp/bandali-theme.el rename lisp/{smart-mode-line-tangomod-theme.el => smart-mode-line-bandali-theme.el} (63%) diff --git a/.gitmodules b/.gitmodules index 2f2ba90..8793078 100644 --- a/.gitmodules +++ b/.gitmodules @@ -49,6 +49,9 @@ url = https://github.com/magit/magit.git recursive-byte-compile = true info-path = Documentation +[submodule "minions"] + path = lib/minions + url = https://github.com/tarsius/minions.git [submodule "no-littering"] path = lib/no-littering url = https://github.com/emacscollective/no-littering.git @@ -65,12 +68,21 @@ [submodule "packed"] path = lib/packed url = https://github.com/emacscollective/packed.git +[submodule "refinery-theme"] + path = lib/refinery-theme + url = https://git.bndl.org/refinery-theme +[submodule "rich-minority"] + path = lib/rich-minority + url = https://github.com/Malabarba/rich-minority.git [submodule "s"] path = lib/s url = https://github.com/magnars/s.el.git [submodule "scpaste"] path = lib/scpaste url = https://github.com/technomancy/scpaste.git +[submodule "smart-mode-line"] + path = lib/smart-mode-line + url = https://github.com/Malabarba/smart-mode-line.git [submodule "switch-buffer-functions"] path = lib/switch-buffer-functions url = https://github.com/10sr/switch-buffer-functions-el.git diff --git a/init.el b/init.el index bb42550..4dff474 100644 --- a/init.el +++ b/init.el @@ -587,6 +587,8 @@ Make N (default: 1) copies of the current line or region." (require 'bandali-org) +(require 'bandali-theme) + ;; *the* right way to do git (use-package magit :bind (("C-x g" . magit-status) @@ -926,95 +928,8 @@ Make N (default: 1) copies of the current line or region." ;; :mode "\\.grg\\'") -;;; Theme - -(comment -(add-to-list 'custom-theme-load-path - (expand-file-name - (convert-standard-filename "lisp") user-emacs-directory)) -(load-theme 'tangomod t) - -(use-package smart-mode-line - :commands (sml/apply-theme) - :demand - :config - ;; thanks, but no thnaks; don't make fixed-width fills. - (defun sml/fill-for-buffer-identification () "") - (setq sml/theme 'tangomod) - (sml/setup) - (smart-mode-line-enable)) - -(use-package doom-modeline - :disabled - :demand - :hook (after-init . doom-modeline-init) - :custom - (doom-modeline-buffer-file-name-style 'relative-to-project)) - -(use-package doom-themes) - -(use-package moody - :disabled - :demand - :config - (setq x-underline-at-descent-line t) - (let ((line (face-attribute 'mode-line :underline))) - (set-face-attribute 'mode-line nil :overline line) - (set-face-attribute 'mode-line-inactive nil :overline line) - (set-face-attribute 'mode-line-inactive nil :underline line) - (set-face-attribute 'mode-line nil :box nil) - (set-face-attribute 'mode-line-inactive nil :box nil) - (set-face-attribute 'mode-line-inactive nil :background "#e1e1e1")) ; d3d7cf - (moody-replace-mode-line-buffer-identification) - (moody-replace-vc-mode)) - -(use-package mini-modeline - :disabled - :demand - :config (mini-modeline-mode)) - -(defvar b/org-mode-font-lock-keywords - '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)" - (1 '(:foreground "#5a5b5a" :background "#292b2b") t) ; directive - (3 '(:foreground "#81a2be" :background "#292b2b") t) ; kind - (4 '(:foreground "#c5c8c6") t))) ; title - "For use with the `doom-tomorrow-night' theme.") - -(defun b/lights-on () - "Enable my favourite light theme." - (interactive) - (mapc #'disable-theme custom-enabled-themes) - (load-theme 'tangomod t) - (when (featurep 'smart-mode-line) - (sml/apply-theme 'tangomod)) - (font-lock-remove-keywords - 'org-mode b/org-mode-font-lock-keywords) - (when (featurep 'erc-hl-nicks) - (erc-hl-nicks-reset-face-table)) - (when (featurep 'exwm-systemtray) - (exwm-systemtray--refresh))) - -(defun b/lights-off () - "Go dark." - (interactive) - (mapc #'disable-theme custom-enabled-themes) - (load-theme 'doom-one t) - (when (featurep 'smart-mode-line) - (sml/apply-theme 'automatic)) - (font-lock-add-keywords - 'org-mode b/org-mode-font-lock-keywords t) - (when (featurep 'erc-hl-nicks) - (erc-hl-nicks-reset-face-table)) - (when (featurep 'exwm-systemtray) - (exwm-systemtray--refresh))) - -(bind-keys - ("C-c t d" . b/lights-off) - ("C-c t l" . b/lights-on)) - - ;;; Emacs enhancements & auxiliary packages - +(comment (use-package man :config (setq Man-width 80)) @@ -1372,10 +1287,6 @@ Make N (default: 1) copies of the current line or region." (goto-char (cdr macro))) (reftex-this-word))))) -(use-package minions - :demand - :config (minions-mode)) - (use-package dmenu :custom (dmenu-prompt-string "run: ") diff --git a/lib/minions b/lib/minions new file mode 160000 index 0000000..bc1edab --- /dev/null +++ b/lib/minions @@ -0,0 +1 @@ +Subproject commit bc1edab09d3fc1b248c17775ae2eb7d35b96be40 diff --git a/lib/refinery-theme b/lib/refinery-theme new file mode 160000 index 0000000..71b5501 --- /dev/null +++ b/lib/refinery-theme @@ -0,0 +1 @@ +Subproject commit 71b55010865881a496ace53deafa04da458bcec1 diff --git a/lib/rich-minority b/lib/rich-minority new file mode 160000 index 0000000..a03e693 --- /dev/null +++ b/lib/rich-minority @@ -0,0 +1 @@ +Subproject commit a03e693f6f9232cf75363aaaf1cb041f21675c19 diff --git a/lib/smart-mode-line b/lib/smart-mode-line new file mode 160000 index 0000000..999be06 --- /dev/null +++ b/lib/smart-mode-line @@ -0,0 +1 @@ +Subproject commit 999be065b195f2eddb4e1b629f99038d832d44b7 diff --git a/lisp/bandali-ivy.el b/lisp/bandali-ivy.el index 4a88a13..438360f 100644 --- a/lisp/bandali-ivy.el +++ b/lisp/bandali-ivy.el @@ -51,16 +51,7 @@ This function is intended for use with `ivy-ignore-buffers'." (apply #'provided-mode-derived-p mode b/ivy-ignore-buffer-modes)))) (add-to-list 'ivy-ignore-buffers 'b/ivy-ignore-buffer-p) - (ivy-mode 1) - :custom-face - (ivy-minibuffer-match-face-1 ((t (:background "#eeeeee")))) - (ivy-minibuffer-match-face-2 ((t (:background "#e7e7e7" :weight bold)))) - (ivy-minibuffer-match-face-3 ((t (:background "light goldenrod" :weight semi-bold)))) - (ivy-minibuffer-match-face-4 ((t (:background "misty rose" :weight semi-bold)))) - (ivy-current-match ((((class color) (background light)) - :background "#d7d7d7" :foreground "black") - (((class color) (background dark)) - :background "#65a7e2" :foreground "black")))) + (ivy-mode 1)) (use-package swiper :demand diff --git a/lisp/bandali-theme.el b/lisp/bandali-theme.el new file mode 100644 index 0000000..2266723 --- /dev/null +++ b/lisp/bandali-theme.el @@ -0,0 +1,94 @@ +;;; bandali-theme.el --- bandali's custom theme setup -*- lexical-binding: t; -*- + +;; Copyright (C) 2018-2020 Amin Bandali + +;; Author: Amin Bandali +;; Keywords: faces + +;; 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 . + +;;; Commentary: + +;; My custom theme setup. + +;;; Code: + +(add-to-list + 'custom-theme-load-path + (expand-file-name + (convert-standard-filename "lisp") user-emacs-directory)) + +(use-package refinery-theme + :demand + :config + (load-theme 'refinery t)) + +(use-package smart-mode-line + :commands (sml/apply-theme) + :demand + :config + ;; thanks, but no thnaks; don't make fixed-width fills. + (defun sml/fill-for-buffer-identification () "") + (setq sml/theme 'bandali) + (sml/setup) + (smart-mode-line-enable)) + +(use-package minions + :demand + :config (minions-mode)) + +(defvar b/org-mode-font-lock-keywords + '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)" + (1 '(:foreground "#5a5b5a" :background "#292b2b") t) ; directive + (3 '(:foreground "#81a2be" :background "#292b2b") t) ; kind + (4 '(:foreground "#c5c8c6") t))) ; title + "For use with the `doom-tomorrow-night' theme.") + +(eval-when-compile + (declare-function exwm-systemtray--refresh "exwm-systemtray")) + +(defun b/lights-on () + "Enable my favourite light theme." + (interactive) + (mapc #'disable-theme custom-enabled-themes) + (load-theme 'refinery t) + (when (featurep 'smart-mode-line) + (sml/apply-theme 'bandali)) + (font-lock-remove-keywords + 'org-mode b/org-mode-font-lock-keywords) + (when (featurep 'erc-hl-nicks) + (erc-hl-nicks-reset-face-table)) + (when (featurep 'exwm-systemtray) + (exwm-systemtray--refresh))) + +(defun b/lights-off () + "Go dark." + (interactive) + (mapc #'disable-theme custom-enabled-themes) + (load-theme 'tango-dark t) + (when (featurep 'smart-mode-line) + (sml/apply-theme 'automatic)) + (font-lock-add-keywords + 'org-mode b/org-mode-font-lock-keywords t) + (when (featurep 'erc-hl-nicks) + (erc-hl-nicks-reset-face-table)) + (when (featurep 'exwm-systemtray) + (exwm-systemtray--refresh))) + +(bind-keys + ("C-c t d" . b/lights-off) + ("C-c t l" . b/lights-on)) + +(provide 'bandali-theme) +;;; bandali-theme.el ends here diff --git a/lisp/smart-mode-line-tangomod-theme.el b/lisp/smart-mode-line-bandali-theme.el similarity index 63% rename from lisp/smart-mode-line-tangomod-theme.el rename to lisp/smart-mode-line-bandali-theme.el index b69eb7d..c3a2fb3 100644 --- a/lisp/smart-mode-line-tangomod-theme.el +++ b/lisp/smart-mode-line-bandali-theme.el @@ -1,38 +1,38 @@ -;;; smart-mode-line-tangomod-theme.el --- tangomod theme for smart-mode-line +;;; smart-mode-line-bandali-theme.el --- bandali's smart-mode-line theme -*- lexical-binding: t; -*- -;; Copyright (C) 2019 Amin Bandali +;; Copyright (C) 2019-2020 Amin Bandali ;; Author: Amin Bandali ;; Version: 0.1.0 ;; Package-Requires: ((emacs "24.3") (smart-mode-line "2.10")) -;; Keywords: mode-line themes faces +;; Keywords: faces -;;; Commentary: -;; -;; tangomod theme for smart-mode-line - -;;; License: -;; ;; This file is NOT part of GNU 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 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 . + +;;; Commentary: + +;; My custom theme for smart-mode-line. ;;; Code: -(deftheme smart-mode-line-tangomod - "tangomod theme for smart-mode-line.") +(deftheme smart-mode-line-bandali + "My custom theme for smart-mode-line.") (custom-theme-set-faces - 'smart-mode-line-tangomod + 'smart-mode-line-bandali '(mode-line-buffer-id ((t :inherit sml/filename :foreground nil :background nil))) '(mode-line-inactive ((t :background "#e1e1e1"))) '(mode-line ((t :background "#e7e7e7"))) @@ -47,5 +47,5 @@ (add-to-list 'custom-theme-load-path (file-name-as-directory (file-name-directory load-file-name)))) -(provide-theme 'smart-mode-line-tangomod) -;;; smart-mode-line-tangomod-theme.el ends here. +(provide-theme 'smart-mode-line-bandali) +;;; smart-mode-line-bandali-theme.el ends here. -- 2.20.1