Skip to content

Instantly share code, notes, and snippets.

@wrightmikea
Created March 2, 2020 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wrightmikea/9598a3fed741051b37046d605d479586 to your computer and use it in GitHub Desktop.
Save wrightmikea/9598a3fed741051b37046d605d479586 to your computer and use it in GitHub Desktop.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;
;; to show visual artifact when using darkburn, dimmer, and perspective packages
;;
;; run with:
;; # copy the my-init.el gist somewhere, e.g. ~/Downloads
;; mkdir ./target # or rm -rf ./target/*
;; cp my-init.el ./target
;; cd ./target
;; /usr/local/bin/emacs -q -l init.el --batch # ignore the ivy-switch-buffer warning
;; /usr/local/bin/emacs -q -l init.el
;;
;; M-x persp-switch \r foo \r
;; C-x 2
;; M-x persp-switch \r bar \r
;; C-x 2
;; C-x o
;;
;; Note that "bar" is a different color in the dimmed modeline
;; this is probably correct behavior, not sure what would be better, changing color?
;;
;; M-x persp-next
;; M-x persp-next
;; M-x persp-next
;; C-x o
;; C-x o
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; set user-emacs-directory to the directory where this file lives
;; do not read or write anything in $HOME/.emacs.d
(setq user-init-file (or load-file-name (buffer-file-name)))
(setq user-emacs-directory (file-name-directory user-init-file))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; set custom-file to write into a separate place
(setq custom-file (concat user-emacs-directory ".custom.el"))
(when (file-readable-p custom-file) (load custom-file))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; configure melpa (and other repos if needed)
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(setq package-enable-at-startup nil)
(package-initialize)
(when (not package-archive-contents)
(package-refresh-contents))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; bootstrap `use-package'
(setq package-pinned-packages
'((bind-key . "melpa")
(diminish . "melpa")
(use-package . "melpa")))
(dolist (p (mapcar 'car package-pinned-packages))
(unless (package-installed-p p)
(package-install p)))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; install and configure packages
(use-package darkburn-theme
:ensure t
:init
(load-theme 'darkburn t))
(use-package dimmer
:ensure t
:config
(setq dimmer-fraction 0.4)
(setq dimmer-debug-messages 3)
(dimmer-mode t))
(use-package perspective
:defer 1
:ensure t
:config
(persp-mode))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment