summaryrefslogtreecommitdiffstats
path: root/lisp/bandali-theme.el
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2020-04-25 12:17:59 -0400
committerAmin Bandali <bandali@gnu.org>2020-04-25 12:17:59 -0400
commit9c48decc134b5785c2f5bd0535e88928b06bb813 (patch)
treee6c572707a629cb6e157b1592d8c4e7417f8db27 /lisp/bandali-theme.el
parent878e4e445a28e4a92d6ce0621b7a891e3d78a45b (diff)
downloadconfigs-9c48decc134b5785c2f5bd0535e88928b06bb813.tar.gz
configs-9c48decc134b5785c2f5bd0535e88928b06bb813.tar.xz
configs-9c48decc134b5785c2f5bd0535e88928b06bb813.zip
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.
Diffstat (limited to 'lisp/bandali-theme.el')
-rw-r--r--lisp/bandali-theme.el94
1 files changed, 94 insertions, 0 deletions
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 <bandali@gnu.org>
+;; 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 <https://www.gnu.org/licenses/>.
+
+;;; 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