Clean up the system volume in mode-line display code
[~bandali/configs] / .emacs.d / lisp / bandali-theme.el
CommitLineData
9c48decc
AB
1;;; bandali-theme.el --- bandali's custom theme setup -*- lexical-binding: t; -*-
2
3;; Copyright (C) 2018-2020 Amin Bandali
4
5;; Author: Amin Bandali <bandali@gnu.org>
6;; Keywords: faces
7
8;; This program is free software; you can redistribute it and/or modify
9;; it under the terms of the GNU General Public License as published by
10;; the Free Software Foundation, either version 3 of the License, or
11;; (at your option) any later version.
12
13;; This program is distributed in the hope that it will be useful,
14;; but WITHOUT ANY WARRANTY; without even the implied warranty of
15;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16;; GNU General Public License for more details.
17
18;; You should have received a copy of the GNU General Public License
19;; along with this program. If not, see <https://www.gnu.org/licenses/>.
20
21;;; Commentary:
22
23;; My custom theme setup.
24
25;;; Code:
26
adba94a7
AB
27(when (display-graphic-p)
28 (add-to-list 'load-path (b/lisp "refinery-theme"))
29 (with-eval-after-load 'package
30 (require 'refinery-theme)
31 (load-theme 'refinery t)))
c84be134 32
8c4704d0
AB
33;; (require 'smart-mode-line)
34;; ;; thanks, but no thanks; don't make fixed-width fills.
35;; (defun sml/fill-for-buffer-identification nil "")
36;; (setq sml/theme 'respectful)
37;; (let ((sml/no-confirm-load-theme t))
38;; (sml/setup)
39;; (smart-mode-line-enable))
c84be134 40
8c4704d0
AB
41;; (require 'minions)
42;; (minions-mode)
9c48decc
AB
43
44(defvar b/org-mode-font-lock-keywords
45 '(("[ \t]*\\(#\\+\\(BEGIN\\|END\\|begin\\|end\\)_\\(\\S-+\\)\\)[ \t]*\\([^\n:]*\\)"
46 (1 '(:foreground "#5a5b5a" :background "#292b2b") t) ; directive
47 (3 '(:foreground "#81a2be" :background "#292b2b") t) ; kind
48 (4 '(:foreground "#c5c8c6") t))) ; title
49 "For use with the `doom-tomorrow-night' theme.")
50
51(eval-when-compile
1eb20313
AB
52 (declare-function exwm-systemtray--refresh "exwm-systemtray")
53 (declare-function erc-hl-nicks-reset-face-table "erc-hl-nicks"))
9c48decc
AB
54
55(defun b/lights-on ()
56 "Enable my favourite light theme."
57 (interactive)
58 (mapc #'disable-theme custom-enabled-themes)
59 (load-theme 'refinery t)
9c48decc
AB
60 (font-lock-remove-keywords
61 'org-mode b/org-mode-font-lock-keywords)
9c48decc
AB
62 (when (featurep 'exwm-systemtray)
63 (exwm-systemtray--refresh)))
64
65(defun b/lights-off ()
66 "Go dark."
67 (interactive)
68 (mapc #'disable-theme custom-enabled-themes)
c84be134 69 (load-theme 'refinery-dark t)
9c48decc
AB
70 (font-lock-add-keywords
71 'org-mode b/org-mode-font-lock-keywords t)
9c48decc
AB
72 (when (featurep 'exwm-systemtray)
73 (exwm-systemtray--refresh)))
74
c84be134
AB
75(global-set-key (kbd "C-c t d") #'b/lights-off)
76(global-set-key (kbd "C-c t l") #'b/lights-on)
9c48decc
AB
77
78(provide 'bandali-theme)
79;;; bandali-theme.el ends here