~gpanders/dotfiles

ref: c8e63bac959db19c138dcc3198a56514f0b444ff dotfiles/.emacs.d/lisp/init-ui.el -rw-r--r-- 1.1 KiB
c8e63bacGreg Anders Manage dotfiles directly in home directory 1 year, 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
;;; init-ui.el --- Customize UI elements

;; Disable tool bar and scroll bar
(tool-bar-mode -1)
(scroll-bar-mode -1)
(menu-bar-mode -1)
(tooltip-mode -1)

;; Hide the splash screen and banner
(setq inhibit-startup-message t
      inhibit-startup-echo-area-message t)

(defvar my-dark-theme nil)
(defvar my-light-theme nil)
(defun toggle-dark-light-theme ()
  "Switch between `my-dark-theme' and `my-light-theme'"
  (interactive)
  (if (memq my-light-theme custom-enabled-themes)
      (progn
        (disable-theme my-light-theme)
        (load-theme my-dark-theme t)
        (if (fboundp '--extend-my-dark-theme)
            (--extend-my-dark-theme)))
    (progn
      (disable-theme my-dark-theme)
      (load-theme my-light-theme t)
      (if (fboundp '--extend-my-light-theme)
        (--extend-my-light-theme)))))

(global-set-key (kbd "<f5>") #'toggle-dark-light-theme)

(use-package base16-theme
  :ensure t
  :config
  (setq my-dark-theme 'base16-eighties
        my-light-theme 'base16-tomorrow))

(add-hook 'after-init-hook #'(lambda () (load-theme my-dark-theme t) (if (fboundp '--extend-my-dark-theme) (--extend-my-dark-theme))))

(provide 'init-ui)