Today's post covers "Themes" from the appearance section of my init.
- Entering and Exiting Emacs
- Default Appearance Customizations
- Appearance Hydra
Emacs is old school. You're either new to it - which means you wouldn't be here unless it was your type of thing - or you know what you're looking for. In either case, go to the side bar of this page and click on the 'Emacs' tag. Then read the posts by date from oldest to newest.
In the last emacs post I covered lines 771 - 914. This post covers lines 914 - 1031
Themes are wicked cool. There are a lot of nifty packages here that make it easier and more fun to work.
I use a package called all the icons for icon graphics. I installed them to use a package called NEO-TREE, which I rarely use. They came in handy afterward for Dashboard, several themes, including Doom and Doom Modeline, and Hydras. You need to find the fonts online and install them to your system, 'right-click install fonts' with windows.
;path to libraries ;all-the-icons-fonts (defvar all-the-icons-p "C:/emacs/.emacs.d/all-the-icons-fonts/") ;all-the-icons (require 'font-lock) (require 'font-lock+);copy/paste to path (use-package all-the-icons :after (:any neo-tree all-the-icons-dired-mode) :load-path all-the-icons-p );end all-the-icons ;all-the-icons-dired (use-package all-the-icons-dired :config ;(add-hook 'dired-mode-hook 'all-the-icons-dired-mode) ;:hook (dired-mode-hook . all-the-icons-dired-mode) ;defer loading of all-the-icons-dired until called :commands all-the-icons-dired-mode );end all the icons dired
A windows transparency function
(defun toggle-window-transparency () "Cycle the frame transparency from default to transparent." (interactive) (let ((transparency 90) (opacity 100)) (if (and (not (eq (frame-parameter nil 'alpha) nil)) (< (frame-parameter nil 'alpha) opacity)) (set-frame-parameter nil 'alpha opacity) (set-frame-parameter nil 'alpha transparency)))) ;turn on transparency by default (add-hook 'after-init-hook 'toggle-window-transparency) ;theme loads deferred through cycle-theme config ;default theme in cycle-themes init (and customizations.el)
Cycle Themes Code
There are several nested use-package declarations in here. To defer loading the configuration for all of the themes these declarations go in the :config section of the parent use-package, except for the theme you want to use after initialization which goes in the :init section. I've bound cycle-themes to F12, but I use it from the appearance hydra. I'm using currently: base16-phd, solarized-dark, leuven, doom-city-lights, doom-Iosvkem
(use-package cycle-themes :commands cycle-themes :init ;(require 'cycle-themes) (use-package base16-theme ;:commands cycle-themes ;:defer t ;:config :init ;(load-theme 'base16-google-dark t t) (load-theme 'base16-phd t t) ;no sound at top/bottom screen (some themes override this, so put it in theme cycle init) :config (setq visible-bell t) );end base 16 (use-package doom-themes :config (setq doom-themes-enable-bold t ; if nil, bold is universally disabled doom-themes-enable-italic t) ; if nil, italics is universally disabled ;(doom-themes-neotree-config) ; all-the-icons fonts must be installed! ; Enable flashing mode-line on errors (doom-themes-visual-bell-config) (progn (load-theme 'doom-dracula t t) (load-theme 'doom-city-lights t t) (load-theme 'doom-Iosvkem t t) ) );end-doom-themes (use-package color-theme-modern :config (progn (load-theme 'leuven t t) ) );end color-theme-modern (use-package solarized-theme :config (progn (load-theme 'solarized-dark t t) ) );end solarized (setq cycle-themes-theme-list '( base16-phd solarized-dark leuven doom-city-lights doom-Iosvkem ) );end list :bind ("<f12>" . cycle-themes) );end u.p. cycle-theme (and all theme configs)
Olivetti mode is aces for centering your work on the screen.
;center a page (use-package olivetti :diminish :commands olivetti-mode :config (setq olivetti-body-width 80) (setq olivetti-minimum-body-width 60) );end olivetti
Hello Doom Modeline 😎
;doom-mode-line (use-package doom-modeline :commands doom-modeline :config ;(setq doom-modeline-height 25) ;(setq doom-modeline-bar-width 3) ;(setq doom-modeline-minor-modes (featurep 'minions)) ;(setq doom-modeline-minor-modes (featurep 'minions)) (setq doom-modeline-buffer-file-name-style 'buffer-name) (doom-modeline-set-timemachine-modeline) :hook (after-init . doom-modeline-mode) );end doom-modeline
Tells you what minor packages are active. I have it on my miscellaneous manager (obscure rarely used stuff) hydra.
(use-package minions :config ;(minions-mode 1) );end minions