commit f46b84183cff4f0d9b5e71d7b95c5def322700eb parent 19761eb73d471a329fe501ddb266ffb4bfac8af3 Author: Mark Feller <mjfeller1992@gmail.com> Date: Mon, 25 May 2020 09:44:54 -0600 bunch of emacs cleanup Diffstat:
42 files changed, 1299 insertions(+), 889 deletions(-)
diff --git a/dots/.emacs.d/.gitignore b/dots/.emacs.d/.gitignore @@ -1,11 +0,0 @@ -*.elc -/elpa/ -/etc/* -/games/ -/lisp/* -/src/ - -!.keep -!/lisp/kubel -!/lisp/helm -!/lisp/redeam.el- \ No newline at end of file diff --git a/dots/.emacs.d/README b/dots/.emacs.d/README @@ -2,33 +2,29 @@ Installation To install, clone this repo to ~/.emacs.d. - git clone https://gitlab.com/mark.feller/emacs.d ~/.emacs.d + git clone https://gitlab.com/mark.feller/emacs.d ~/.emacs.d -Upon starting up Emacs for the first time, packages will be downloaded and -installed via the public repos. If you encounter any errors at that stage, try -restarting Emacs, and possibly running 'M-x package-refresh-contents' before -doing so. After successfully installing packages future startups will be much -faster. +Upon starting up Emacs for the first time, packages will be downloaded +and installed via the public repos. If you encounter any errors at that +stage, try restarting Emacs, and possibly running 'M-x +package-refresh-contents' before doing so. After successfully installing +packages future startups will be much faster. There are several subdirectories: -'core' holds primary configuration that I feel lost without. -'elpa' holds vendored packages from package.el. -'etc' holds configuration files for packages, files often written to - like bookmarks.el, and the custom.el file used when configuring - emacs through the customization interface. -'lisp' holds custom user lisp code. Useful for personal packages, - personal information, etc. -'modules' holds package/language specific configuration that is useful when - working with specific tasks or within specific languages, but are - not needed generally. -'src' holds the Emacs source directory for jumping to definition and - viewing docs within the C code. -'snippets' holds Yasnippet snippets. -'theme' holds theme packages. Poet is my current goto. +'core' holds primary configuration that I feel lost without. +'lisp' holds custom user lisp code. Useful for personal packages, + personal information, etc. +'modules' holds package/language specific configuration that is + useful when working with specific tasks or within specific + languages, but are not needed generally. +'src' holds the Emacs source directory for jumping to definition + and viewing docs within the C code. +'snippets' holds Yasnippet snippets. +'theme' holds theme packages. Poet is my current goto. Disclaimer -This is an everchanging and evolving Emacs configuration for my personal use. I -see this repo more as a collection of ideas to be incorporated into your own -configurations.- \ No newline at end of file +This is an everchanging and evolving Emacs configuration for my personal +use. I see this repo more as a collection of ideas to be incorporated +into your own configurations.+ \ No newline at end of file diff --git a/dots/.emacs.d/core/core-bootstrap.el b/dots/.emacs.d/core/core-bootstrap.el @@ -19,16 +19,16 @@ ;;; Commentary: -;; Setup Emacs package repos and grab use-package for rest of package -;; management. +;; Setup Emacs package repos and grab use-package for rest of the +;; package management. ;;; Code: (require 'package) +(setq package-user-dir "~/.cache/elpa") (setq package-archives '(("melpa-stable" . "http://melpa-stable.milkbox.net/packages/") - ("melpa" . "http://melpa.milkbox.net/packages/") ("gnu" . "http://elpa.gnu.org/packages/") ("org" . "http://orgmode.org/elpa/"))) @@ -39,8 +39,7 @@ (package-refresh-contents) (package-install 'use-package) (package-install 'diminish) - (package-install 'bind-key) - (package-install 'bind-chord)) + (package-install 'bind-key)) (require 'use-package) (setq use-package-always-ensure t) diff --git a/dots/.emacs.d/core/core-defuns.el b/dots/.emacs.d/core/core-defuns.el @@ -21,19 +21,6 @@ ;;; Code: -(defun server-shutdown () - "Save buffers, Quit, and Shutdown (kill) server" - (interactive) - (save-some-buffers) - (kill-emacs)) - -(defun iwb() - "Indent Whole Buffer" - (interactive) - (delete-trailing-whitespace) - (indent-region (point-min) (point-max) nil) - (untabify (point-min) (point-max))) - (defun transpose-words (arg) "[Override for default transpose-words in simple.el] Interchange words around point, leaving point at end of @@ -195,7 +182,7 @@ is already narrowed." (defun resize-wide () (interactive) - (set-frame-width (selected-frame) 200) + (set-frame-width (selected-frame) 180) (set-frame-height (selected-frame) 50)) (defun resize-big () @@ -203,6 +190,9 @@ is already narrowed." (set-frame-width (selected-frame) 240) (set-frame-height (selected-frame) 70)) +(defun disable-line-numbers () + (display-line-numbers-mode -1)) + (provide 'core-defuns) ;;; core-defuns.el ends here diff --git a/dots/.emacs.d/core/core-macos.el b/dots/.emacs.d/core/core-macos.el @@ -0,0 +1,73 @@ +;;; core-osx.el --- solarized module for my emacs + +;; Author: Mark Feller <mark.feller@member.fsf.org> + +;; This file is not part of GNU Emacs. + +;; This file 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, or (at your option) +;; any later version. + +;; This file 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 file. If not, see <http://www.gnu.org/licenses/>. +;;; Commentary: + +;;; Code: + +;; transparent title bar +(use-package ns-auto-titlebar + :config (ns-auto-titlebar-mode)) + +(setq ns-use-srgb-colorspace t) +(setq ns-use-proxy-icon nil) ; hide icon in title bar +(setq frame-title-format nil) ; hide text in title bar +(menu-bar-mode t) ; use macos menu bar + +(setq mac-option-modifier 'meta) +(setq mac-command-modifier 'hyper) + +;; Enable emoji, and stop the UI from freezing when trying to display them. +(if (fboundp 'set-fontset-font) + (set-fontset-font t 'unicode "Apple Color Emoji" nil 'prepend)) + +(use-package exec-path-from-shell + :demand + :config (exec-path-from-shell-initialize)) + +(defun finder () + "Opens file directory in Finder." + (interactive) + (let ((file (buffer-file-name))) + (if file + (shell-command + (format "%s %s" (executable-find "open") (file-name-directory file))) + (error "Buffer is not attached to any file.")))) + +(when (not (display-graphic-p)) + (defun bw/copy-from-osx () + "Copies the current clipboard content using the `pbcopy` command" + (shell-command-to-string "pbpaste")) + + (defun bw/paste-to-osx (text &optional push) + "Copies the top of the kill ring stack to the OSX clipboard" + (let ((process-connection-type nil)) + (let ((proc (start-process "pbcopy" "*Messages*" "pbcopy"))) + (process-send-string proc text) + (process-send-eof proc)))) + + (setq interprogram-cut-function 'bw/paste-to-osx) + (setq interprogram-paste-function 'bw/copy-from-osx)) + +(defun mjf/center-window () + (interactive) + (call-process-shell-command "osascript ~/.emacs.d/scripts/Center-Window.scpt" nil 0)) + +(provide 'core-macos) + +;;; core-osx.el ends here diff --git a/dots/.emacs.d/core/core-osx.el b/dots/.emacs.d/core/core-osx.el @@ -1,69 +0,0 @@ -;;; core-osx.el --- solarized module for my emacs - -;; Author: Mark Feller <mark.feller@member.fsf.org> - -;; This file is not part of GNU Emacs. - -;; This file 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, or (at your option) -;; any later version. - -;; This file 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 file. If not, see <http://www.gnu.org/licenses/>. -;;; Commentary: - -;;; Code: - -;; transparent title bar -(use-package ns-auto-titlebar - :config (ns-auto-titlebar-mode)) - -(setq ns-use-srgb-colorspace t) -(setq ns-use-proxy-icon nil) ; hide icon in title bar -(setq frame-title-format nil) ; hide text in title bar -(menu-bar-mode t) ; use macos menu bar - -(setq mac-option-modifier 'meta) -(setq mac-command-modifier 'hyper) - -;; Enable emoji, and stop the UI from freezing when trying to display them. -(if (fboundp 'set-fontset-font) - (set-fontset-font t 'unicode "Apple Color Emoji" nil 'prepend)) - -(use-package exec-path-from-shell - :demand - :config (exec-path-from-shell-initialize)) - -(defun finder () - "Opens file directory in Finder." - (interactive) - (let ((file (buffer-file-name))) - (if file - (shell-command - (format "%s %s" (executable-find "open") (file-name-directory file))) - (error "Buffer is not attached to any file.")))) - -(when (not (display-graphic-p)) - (defun bw/copy-from-osx () - "Copies the current clipboard content using the `pbcopy` command" - (shell-command-to-string "pbpaste")) - - (defun bw/paste-to-osx (text &optional push) - "Copies the top of the kill ring stack to the OSX clipboard" - (let ((process-connection-type nil)) - (let ((proc (start-process "pbcopy" "*Messages*" "pbcopy"))) - (process-send-string proc text) - (process-send-eof proc)))) - - (setq interprogram-cut-function 'bw/paste-to-osx) - (setq interprogram-paste-function 'bw/copy-from-osx)) - -(provide 'core-osx) - -;;; core-osx.el ends here diff --git a/dots/.emacs.d/core/core-packages.el b/dots/.emacs.d/core/core-packages.el @@ -20,11 +20,6 @@ ;;; Code: -;; (use-package paradox -;; :config -;; (progn (paradox-enable) -;; (add-hook 'paradox-menu-mode-hook (lambda () (display-line-numbers-mode 0))))) - (use-package swiper :demand :delight (ivy-mode) @@ -35,17 +30,18 @@ ("C-c C-o" . ivy-occur) ("C-c C-b" . ivy-switch-buffer) ("C-c C-k" . kill-buffer)) + (:map ivy-minibuffer-map + ("TAB" . ivy-partial-or-done)) :config - (progn (ivy-mode 1) - (setq ivy-height 6) - (setq enable-recursive-minibuffers t) - (setq swiper-include-line-number-in-search t) - (define-key ivy-minibuffer-map (kbd "TAB") 'ivy-partial-or-done))) + (setq ivy-height 6) + (setq enable-recursive-minibuffers t) + (setq swiper-include-line-number-in-search t) + + (ivy-mode 1)) -;; ivy sorted via smex (use-package smex :demand - :config (setq smex-save-file (concat persistent-dir "/smex-items"))) + :config (setq smex-save-file "~/.cache/smex-items")) (use-package counsel :after (ivy) @@ -61,12 +57,12 @@ (use-package saveplace :config - (progn (setq save-place-file (concat persistent-dir "/places") - backup-by-copying t - delete-old-versions t - kept-new-versions 6 - kept-old-versions 2 - version-control t))) + (setq save-place-file "~/.cache/places" + backup-by-copying t + delete-old-versions t + kept-new-versions 6 + kept-old-versions 2 + version-control t)) (use-package ibuffer :bind (("C-x C-b" . ibuffer) @@ -174,28 +170,30 @@ (use-package dired :ensure nil :bind (("C-x C-j" . dired-jump)) + :config - (progn (setq wdired-use-dired-vertical-movement 'sometimes) + (setq wdired-use-dired-vertical-movement 'sometimes) + (setq dired-listing-switches "-la") - (set-face-attribute 'dired-directory nil - :inherit 'default - :foreground "#839496" - :weight 'bold) + (set-face-attribute 'dired-directory nil + :inherit 'default + :foreground "#839496" + :weight 'bold) - (setq dired-listing-switches "-la") + (add-hook 'dired-mode-hook 'disable-line-numbers) - (defun dired-sort-dir-first () - "Sort dired listings with directories first." - (save-excursion - (let (buffer-read-only) - (forward-line 2) ;; beyond dir. header - (sort-regexp-fields t "^.*$" "[ ]*." (point) (point-max))) - (set-buffer-modified-p nil))) + (defun dired-sort-dir-first () + "Sort dired listings with directories first." + (save-excursion + (let (buffer-read-only) + (forward-line 2) ;; beyond dir. header + (sort-regexp-fields t "^.*$" "[ ]*." (point) (point-max))) + (set-buffer-modified-p nil))) - (defadvice dired-readin - (after dired-after-updating-hook first () activate) - "Sort dired listings with directories first before adding marks." - (dired-sort-dir-first)))) + (defadvice dired-readin + (after dired-after-updating-hook first () activate) + "Sort dired listings with directories first before adding marks." + (dired-sort-dir-first))) ;; better describe (use-package helpful @@ -206,8 +204,8 @@ (use-package rg :config - (progn (rg-enable-default-bindings (kbd "M-s")) - (setq rg-executable "/usr/local/bin/rg"))) + (rg-enable-default-bindings (kbd "M-s")) + (setq rg-executable "/usr/local/bin/rg")) ;; window management (bind-keys @@ -231,31 +229,15 @@ ;; Misc Window Commands ("H-a" . balance-windows) ("H-t" . toggle-window-split) - ("H-<return>". toggle-fullscreen)) - -(use-package bind-chord - :config - (progn - (key-chord-mode 1) - - (bind-chords - ("wh" . windmove-left) - ("wj" . windmove-down) - ("wk" . windmove-up) - ("wl" . windmove-right) - - ("wt" . split-window-horizontally) - ("wv" . split-window-vertically) - ("wq" . delete-window) - ("wa" . balance-windows)) + ("H-<return>". toggle-fullscreen) - (setq key-chord-two-key-delay 0.075))) + ("H-c" . mjf/center-window)) (delight 'subword-mode "" "subword") +(delight 'undo-tree-mode "" "undo-tree") -;; woman -(add-hook 'woman-mode-hook (lambda () (display-line-numbers-mode 0))) -(add-hook 'Man-mode-hook (lambda () (display-line-numbers-mode 0))) +(add-hook 'woman-mode-hook 'disable-line-numbers) +(add-hook 'Man-mode-hook 'disable-line-numbers) (provide 'core-packages) diff --git a/dots/.emacs.d/core/core-paths.el b/dots/.emacs.d/core/core-paths.el @@ -29,35 +29,16 @@ (setq auto-save-file-name-transforms `((".*" ,temporary-file-directory t))) -(setq auto-save-list-file-prefix - (concat persistent-dir "/auto-save-list/.saves-")) - -(setq bookmark-default-file - (concat persistent-dir "bookmarks.el")) - -(setq ede-project-placeholder-cache-file - (concat temporary-file-directory "/ede-projects.el")) - -(setq semanticdb-default-save-directory - (concat temporary-file-directory "/semanticdb")) - -(setq abbrev-file-name - (concat persistent-dir "/abbrev_defs.el")) - -(setq tramp-persistency-file-name - (concat persistent-dir "/tramp.el")) - -(setq recentf-save-file - (concat persistent-dir "/recentf")) - -(setq org-id-locations-file - (concat persistent-dir "/org-id-locations.el")) - -(setq nsm-settings-file - (concat persistent-dir "/network-security.data")) - -(setq url-configuration-directory - (concat persistent-dir "/url/")) +(setq auto-save-list-file-prefix "~/.cache/auto-save-list/.saves-") +(setq bookmark-default-file "~/.cache/bookmarks.el") +(setq ede-project-placeholder-cache-file "~/.cache/ede-projects.el") +(setq semanticdb-default-save-directory "~/.cache/semanticdb") +(setq abbrev-file-name "~/.cache/abbrev_defs.el") +(setq tramp-persistency-file-name "~/.cache/tramp.el") +(setq recentf-save-file "~/.cache/recentf") +(setq org-id-locations-file "~/.cache/org-id-locations.el") +(setq nsm-settings-file "~/.cache/network-security.data") +(setq url-configuration-directory "~/.cache/url/") (unless (file-exists-p custom-file) (write-region "" nil custom-file)) diff --git a/dots/.emacs.d/core/core-ui.el b/dots/.emacs.d/core/core-ui.el @@ -43,18 +43,18 @@ (line-number-mode 0) (column-number-mode t) -(delete-selection-mode t) ; Delete Marked regions -(show-paren-mode t) ; Show matching parenthesis +(delete-selection-mode t) ; Delete Marked regions +(show-paren-mode t) ; Show matching parenthesis (setq-default indent-tabs-mode nil) -(setq-default tab-width 4) +(setq-default tab-width 8) (setq-default indicate-empty-lines nil) (set-terminal-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (prefer-coding-system 'utf-8) -(setq-default fill-column 80) +(setq-default fill-column 72) (add-hook 'before-save-hook 'delete-tailing-whitespace) @@ -65,19 +65,22 @@ (defun on-after-init () (unless (display-graphic-p (selected-frame)) (set-face-background 'default "unspecified-bg" (selected-frame)))) + (add-hook 'window-setup-hook 'on-after-init) ;; line numbers -(setq-default display-line-numbers-width 4) +(setq-default display-line-numbers-width 3) (setq display-line-numbers-type 'relative display-line-numbers-current-absolute t display-line-numbers-widen nil) ; don't count narrowed regions +(setq-default line-spacing 5) + (global-display-line-numbers-mode) ;; add some padding around the entire frame and fringes -(set-fringe-mode 15) -(set-frame-parameter nil 'internal-border-width 10) +(set-fringe-mode 25) +(set-frame-parameter nil 'internal-border-width 0) (provide 'core-ui) diff --git a/dots/.emacs.d/etc/.keep b/dots/.emacs.d/etc/.keep diff --git a/dots/.emacs.d/init.el b/dots/.emacs.d/init.el @@ -65,15 +65,9 @@ (defvar modules-dir (expand-file-name "modules" emacs-dir) "This directory houses all of the modules.") -(defvar persistent-dir (expand-file-name "etc" emacs-dir) - "This directory houses files created by emacs packages") - (defvar lisp-dir (expand-file-name "lisp" emacs-dir) "This directory houses user lisp and site lisp") -(unless (file-exists-p persistent-dir) - (make-directory persistent-dir)) - (if (file-exists-p (concat emacs-dir "src")) (setq source-directory (concat emacs-dir "src"))) @@ -82,7 +76,7 @@ (add-to-list 'load-path lisp-dir) ;; load the custom file -(setq custom-file (concat persistent-dir "/custom.el")) +(setq custom-file "~/.cache/emacs-custom.el") (unless (file-exists-p custom-file) (write-region "" nil custom-file)) (load custom-file) @@ -97,7 +91,7 @@ (require 'core-bootstrap) (require 'core-ui) -(when (eq system-type 'darwin) (require 'core-osx)) +(when (eq system-type 'darwin) (require 'core-macos)) (require 'core-packages) (require 'core-defuns) (require 'core-paths) @@ -108,19 +102,20 @@ (message "Loading modules...") -;; (require 'module-bbdb) (require 'module-c) (require 'module-company) (require 'module-docker) (require 'module-eldoc) +(require 'module-elfeed) (require 'module-emacs-lisp) +(require 'module-eshell) (require 'module-evil) (require 'module-git) (require 'module-go) (require 'module-multiple-cursors) +(require 'module-notmuch) (require 'module-org) (require 'module-projectile) -(require 'module-protobuf) (require 'module-python) (require 'module-restclient) (require 'module-yaml) diff --git a/dots/.emacs.d/lisp/.keep b/dots/.emacs.d/lisp/.keep diff --git a/dots/.emacs.d/lisp/acme/acme-theme.el b/dots/.emacs.d/lisp/acme/acme-theme.el @@ -0,0 +1,337 @@ +;;; acme-theme.el --- A theme for prose. + +;; Copyright 2018-now Kunal Bhalla + +;; Author: Kunal Bhalla <bhalla.kunal@gmail.com> +;; URL: https://github.com/kunalb/acme/ +;; Version: 2.0 + +;;; Commentary: + +;; Emacs has very good support for multiple fonts in a single +;; file. Acme uses this support to make it much more convenient to +;; write prose within Emacs, with particular attention paid to +;; org-mode and markdown-mode. Code blocks, tables, etc are +;; formatted in monospace text with the appropriate backgrounds. + +;; Recommended customizations for using this theme +;; +;; - Set up the base fonts you'd like to use in Emacs before loading Acme +;; (set-face-attribute 'default nil :family "Iosevka" :height 130) +;; (set-face-attribute 'fixed-pitch nil :family "Iosevka") +;; (set-face-attribute 'variable-pitch nil :family "Baskerville") +;; On loading this theme captures the default and treats that for fixed-pitch +;; rendering. +;; +;; - Enable variable pitch mode for editing text +;; (add-hook 'text-mode-hook +;; (lambda () +;; (variable-pitch-mode 1)) +;; +;; - Some other modes I like to enable/disable +;; (olivetti-mode 1) ;; Centers text in the buffer +;; (flyspell-mode 1) ;; Catch Spelling mistakes +;; (typo-mode 1) ;; Good for symbols like em-dash +;; (blink-cursor-mode 0) ;; Reduce visual noise +;; (linum-mode 0) ;; No line numbers for prose +;; +;; - And prettier org mode bullets: +;; (setq org-bullets-bullet-list +;; '("◉" "○")) +;; (org-bullets 1) + +;;; Code: + +;; (set-face-attribute 'default nil :family "Roboto Mono") +;; (set-face-attribute 'default nil :family "Fira Mono") +;; (set-face-attribute 'default nil :family "Iosevka Slab") +(set-face-attribute 'default nil :family "Hack") + +(defvar acme--monospace-height + (face-attribute 'fixed-pitch :height nil 'default) + "The original height stored as a defvar to stay constant across reloads.") + +(defun acme--height (multiplier) + "Scale up the height according to the MULTIPLIER." + (truncate (* acme--monospace-height multiplier))) + +(defvar mode-line-spacing 5) + +(deftheme acme + "A prose friendly theme.") + +(make-face 'mode-line-height) + +(let ( + ;; Primary Colors + (fg "#444444") + (bg "#FFFFea") + + (modeline "#EAFFFF") + (modeline-border "#8888cc") + + (white-light "#ffffff") + (yellow-light "#fff59d") + (red-light "#ff1744") + + (black "gray0") + (white "gray88") + (yellow "#fff176") + (blue "#0288D1") + (green "#388E3C") + (red "#bf360c") + (purple "#673AB7") + (brown "#8D6E63") + + ;; dark colors + (cyan-dark "#455A64") + (blue-dark "#3f51b5") + (red-dark "#8E3C38") + (purple-dark "#6C3082") + (brown-dark "#4e342e") + ) + (let ( + (emph "gray13") + (sep "gray70") + (hlt "gray93") + (bg-hlt "#e4e4e4") + (meta brown-dark) + (link "#303f9f") + (link-underline "#304ffe") + (vlink-underline "#1a237e") + (button "gray27") + (cursor "gray29") + (paren-match-bg red-light) + (paren-match-fg white-light) + (search-fg red) + (search-bg white-light) + (search-fail-bg "#f8bbd0") + (tooltip-fg "#111111") + (tooltip-bg yellow) + (shadow "grey60") + (secondary-bg yellow-light) + (trailing-bg "#ff8a65") + (fci "grey87") + (mode-line-fg "grey7") + (mode-line-hlt white-light) + (mode-line-inactive "#888888") + (header red-dark) + (header-line-bg white) + (builtin red-dark) + (string green) + (function-name "#444444") + (keyword "#444444") + (constant blue) + (type "#444444") + (variable cyan-dark) + + ;; org + (org-meta brown) + (org-document-info brown) + (org-table white) + (org-quote-fg purple-dark) + (org-quote-bg white) + (org-date "#444444") + (org-title red) + (org-title-underline "#aaaaaa") + (org-checkbox "#aaaaaa") + (org-scheduled "#333333") + (org-scheduled-today "#111111") + (org-done green) + (org-todo red) + (org-tag "#777777") + (org-block-line "#d0d0d0") + (org-block-bg white) + (org-agenda-structure-fg "#555555") + (org-agenda-structure-bg white) + (org-agenda-today-fg "#000000") + (org-agenda-today-bg "#eeeeee") + (org-special-keyword "#777777") + (org-sched-prev "#222222") + (org-agenda-done "#777777") + + (hl-line "#efefef") + (linum-hlt "#555555") + (linum "#aaaaaa") + (markdown-markup brown) + (markdown-metadata "#777777") + (markdown-language purple) + (markdown-list "#000000") + (markdown-code-bg white) + (markdown-pre-bg white) + (markdown-header-delimiter brown) + (imenu brown-dark)) + + +(set-face-attribute + (custom-theme-set-faces 'acme + `(variable-pitch ((t (:family ,(face-attribute 'variable-pitch :family) :height ,(acme--height 1))))) + + `(default ((t (:background ,bg :foreground ,fg)))) + `(italic ((t (:foreground ,emph :slant italic)))) + `(highlight ((t (:background ,hlt :overline nil)))) + `(region ((t (:background ,bg-hlt)))) + `(fringe ((t (:background ,bg)))) + `(button ((t (:inherit default :foreground ,button)))) + `(escape-glyph ((t (:foreground ,purple)))) + `(link ((t (:underline (:color ,link-underline :style line) :foreground ,link)))) + `(link-visited ((t (:inherit link :foreground ,link :underline (:color ,vlink-underline :style line))))) + `(cursor ((t (:background ,cursor)))) + `(show-paren-match ((t (:background ,paren-match-fg :foreground ,paren-match-bg)))) + `(isearch ((t (:foreground ,search-fg :background ,search-bg)))) + `(isearch-fail ((t (:background ,search-fail-bg)))) + `(query-replace ((t (:inherit isearch)))) + `(tooltip ((t (:inherit default :foreground ,tooltip-fg :background ,tooltip-bg)))) + `(shadow ((t (:foreground ,shadow)))) + `(secondary-selection ((t (:background ,secondary-bg)))) + `(trailing-whitespace ((t (:background ,trailing-bg)))) + `(lazy-highlight ((t (:foreground ,black :background ,white-light)))) + `(next-error ((t (:inherit region)))) + `(window-divider ((t (:background ,sep :foreground ,sep)))) + `(vertical-border ((t (:background ,sep :foreground ,sep)))) + `(minibuffer-prompt ((t (:inherit fixed-pitch :weight bold :foreground ,meta)))) + + ;; mode line + + + `(header-line ((t (:overline nil :background ,header-line-bg :box (:line-width 1 :color "#8888cc") :underline ,sep :inherit mode-line)))) + `(mode-line ((t (:inherit fixed-pitch :foreground ,mode-line-fg :background ,modeline :overline ,modeline-border :box (:line-width 1 :color ,modeline-border))))) + `(mode-line-inactive ((t (:inherit fixed-pitch :foreground ,mode-line-inactive :background ,modeline :overline ,modeline-border :box (:line-width 1 :color ,modeline-border))))) + `(mode-line-height ((t (:foreground ,modeline-border :background ,modeline-border :box (:line-width ,mode-line-spacing :color ,modeline-border))))) + + `(mode-line-buffer-id ((t (:weight bold)))) + `(mode-line-emphasis ((t (:weight bold)))) + `(mode-line-highlight ((t (:background ,mode-line-hlt)))) + + `(error ((t (:inherit fixed-pitch)))) + + ;; primary font lock + `(font-lock-comment-face ((t (:foreground ,shadow :inherit fixed-pitch)))) + `(font-lock-builtin-face ((t (:foreground ,builtin :inherit fixed-pitch)))) + `(font-lock-string-face ((t (:inherit fixed-pitch :foreground ,string)))) + `(font-lock-function-name-face ((t (:inherit fixed-pitch :foreground ,function-name)))) + `(font-lock-keyword-face ((t (:inherit fixed-pitch :weight bold :foreground ,keyword)))) + `(font-lock-comment-delimiter-face ((t (:inherit fixed-pitch :inherit font-lock-comment-face)))) + `(font-lock-constant-face ((t (:inherit fixed-pitch)))) + `(font-lock-doc-face ((t (:inherit fixed-pitch :inherit font-lock-string-face)))) + `(font-lock-preprocessor-face ((t (:inherit fixed-pitch :inherit font-lock-builtin-face)))) + `(font-lock-regexp-grouping-backslash ((t (:inherit fixed-pitch :inherit bold)))) + `(font-lock-regexp-grouping-construct ((t (:inherit fixed-pitch :inherit bold)))) + `(font-lock-type-face ((t (:inherit fixed-pitch)))) + `(font-lock-variable-name-face ((t (:inherit fixed-pitch :foreground ,variable)))) + `(font-lock-warning-face ((t (:inherit error)))) + + ;; Org + `(org-level-1 ((t (:inherit default :foreground ,header :height ,(acme--height 1.5))))) + `(org-level-2 ((t (:inherit default :foreground ,header :height ,(acme--height 1.4))))) + `(org-level-3 ((t (:inherit default :foreground ,header :height ,(acme--height 1.3))))) + `(org-level-4 ((t (:inherit default :foreground ,header :height ,(acme--height 1.23))))) + `(org-level-5 ((t (:inherit default :foreground ,header :height ,(acme--height 1.23))))) + `(org-level-6 ((t (:inherit default :foreground ,header :height ,(acme--height 1.23))))) + `(org-level-7 ((t (:inherit default :foreground ,header :height ,(acme--height 1.23))))) + `(org-level-8 ((t (:inherit default :foreground ,header :height ,(acme--height 1.23))))) + `(org-meta-line ((t (:inherit fixed-pitch :foreground ,org-meta)))) + `(org-document-info-keyword ((t (:inherit fixed-pitch :foreground ,org-document-info)))) + `(org-document-info ((t (:inherit default :foreground ,org-document-info)))) + `(org-verbatim ((t (:inherit fixed-pitch)))) + `(org-table ((t (:inherit fixed-pitch :background ,org-table)))) + `(org-formula ((t (:inherit org-table :height ,(acme--height 1))))) + `(org-quote ((t (:inherit default :foreground ,org-quote-fg :background ,org-quote-bg)))) + `(org-hide ((t (:inherit fixed-pitch :foreground ,bg)))) + `(org-indent ((t (:inherit org-hide)))) + `(org-date ((t (:inherit fixed-pitch :foreground ,org-date :underline nil)))) + `(org-document-title ((t (:inherit default :foreground ,org-title :height ,(acme--height 1.8) :underline (:color ,org-title-underline))))) + `(org-checkbox ((t (:inherit fixed-pitch :weight bold :foreground ,org-checkbox)))) + `(org-scheduled ((t (:foreground ,org-scheduled)))) + `(org-scheduled-today ((t (:foreground ,org-scheduled-today)))) + `(org-done ((t (:inherit fixed-pitch :foreground ,org-done)))) + `(org-todo ((t (:inherit fixed-pitch :foreground ,org-todo)))) + `(org-tag ((t (:inherit fixed-pitch :height ,(acme--height 1) :foreground ,org-tag)))) + `(org-block-begin-line ((t (:inherit fixed-pitch :background ,org-block-line)))) + `(org-block-end-line ((t (:inherit fixed-pitch :background ,org-block-line)))) + `(org-block ((t (:background ,org-block-bg :inherit fixed-pitch)))) + `(org-priority ((t (:inherit fixed-pitch :weight normal)))) + `(org-agenda-structure ((t (:foreground ,org-agenda-structure-fg :background ,org-agenda-structure-bg :overline ,org-agenda-structure-bg :underline ,org-agenda-structure-bg)))) + `(org-agenda-date-weekend ((t (:inherit org-agenda-structure)))) + `(org-agenda-date-today ((t (:foreground ,org-agenda-today-fg :overline ,org-agenda-today-bg :background ,org-agenda-today-bg :underline ,org-agenda-today-bg)))) + `(org-special-keyword ((t (:inherit fixed-pitch :foreground ,org-special-keyword)))) + `(org-scheduled-previously ((t (:foreground ,org-sched-prev)))) + `(org-agenda-done ((t (:foreground ,org-agenda-done)))) + `(org-footnote ((t (:foreground ,link)))) + `(hl-line ((t (:background ,hl-line)))) + + ;; line numbers + `(line-number ((t (:inherit fixed-pitch :foreground ,linum)))) + `(line-number-current-line ((t (:inherit fixed-pitch :foreground ,linum-hlt)))) + + ;; markdown + `(markdown-header-face-1 ((t (:foreground ,header :inherit default :height ,(acme--height 1.5))))) + `(markdown-header-face-2 ((t (:foreground ,header :inherit default :height ,(acme--height 1.4))))) + `(markdown-header-face-3 ((t (:foreground ,header :inherit default :height ,(acme--height 1.3))))) + `(markdown-header-face-4 ((t (:foreground ,header :inherit default :height ,(acme--height 1.23))))) + `(markdown-header-face-5 ((t (:foreground ,header :inherit default :height ,(acme--height 1.23))))) + `(markdown-header-face-6 ((t (:foreground ,header :inherit default :height ,(acme--height 1.23))))) + `(markdown-header-face-7 ((t (:foreground ,header :inherit default :height ,(acme--height 1.23))))) + `(markdown-header-face-8 ((t (:foreground ,header :inherit default :height ,(acme--height 1.23))))) + `(markdown-markup-face ((t (:inherit fixed-pitch :foreground ,markdown-markup)))) + `(markdown-inline-code-face ((t (:inherit fixed-pitch)))) + `(markdown-metadata-key-face ((t (:inherit fixed-pitch :height ,(acme--height 1) :foreground ,markdown-metadata)))) + `(markdown-metadata-value-face ((t (:inherit fixed-pitch :height ,(acme--height 1) :foreground ,fg)))) + `(markdown-language-keyword-face ((t (:foreground ,markdown-language)))) + `(markdown-list-face ((t (:inherit fixed-pitch :foreground ,markdown-list)))) + `(markdown-code-face ((t (:inherit fixed-pitch :foreground ,fg :background ,markdown-code-bg)))) + `(markdown-pre-face ((t (:inherit fixed-pitch :color ,fg :background ,markdown-pre-bg)))) + `(markdown-header-delimiter-face ((t (:inherit fixed-pitch :foreground ,markdown-header-delimiter)))) + `(markdown-header-rule-face ((t (:inherit fixed-pitch :foreground ,markdown-header-delimiter)))) + `(markdown-url-face ((t (:inherit fixed-pitch :foreground ,link)))) + + ;; ivy + `(ivy-current-match ((t (:inherit fixed-pitch :background ,hlt)))) + `(ivy-minibuffer-match-face-1 ((t (:inherit fixed-pitch :foreground ,cyan-dark)))) + `(ivy-minibuffer-match-face-2 ((t (:inherit fixed-pitch :foreground ,red-dark)))) + `(ivy-minibuffer-match-face-3 ((t (:inherit fixed-pitch :foreground ,blue-dark)))) + `(ivy-minibuffer-match-face-4 ((t (:inherit fixed-pitch :foreground ,brown-dark)))) + + ;; imenu + `(imenu-list-entry-face-0 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-1 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-2 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-3 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-4 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-5 ((t (:foreground ,imenu)))) + + ;; tldr + `(tldr-title ((t (:foreground ,red :weight bold :height 1.9)))) + `(tldr-description ((t (:foreground ,green)))) + `(tldr-code-block ((t ()))) + `(tldr-command-argument ((t ()))) + + `(company-tooltip-selection ((t (:background "#ddffdd")))) + `(company-tooltip-selection ((t (:background "#cee7cf")))) + `(company-tooltip-common ((t (:inherit fixed-pitch :foreground nil :underline nil :weight bold)))) + `(company-scrollbar-fg ((t (:background "#388E3C")))) + `(company-preview-common ((t (:underline nil)))) + `(company-tooltip-common ((t (:underline nil)))) + `(company-tooltip-common-selection ((t (:underline nil)))) + + ;; evil + `(evil-ex-substitute-replacement ((t (:foreground ,white-light :background ,brown-dark :underline nil)))) + `(evil-goggles-delete-face ((t (:inherit 'lazy-highlight)))) + `(evil-goggles-paste-face ((t (:inherit 'lazy-highlight)))) + `(evil-goggles-yank-face ((t (:inherit 'lazy-highlight)))) + + `(helm-source-header ((t (:height ,(acme--height 1)))))) + + (custom-theme-set-variables 'acme + '(line-spacing 0.4) + `(fci-rule-color ,fci))))) + +;;;###autoload +(when (and (boundp 'custom-theme-load-path) + load-file-name) + (add-to-list 'custom-theme-load-path + (file-name-as-directory + (file-name-directory load-file-name)))) + +(provide-theme 'acme) +;;; acme-theme.el ends here diff --git a/dots/.emacs.d/lisp/init-local.el b/dots/.emacs.d/lisp/init-local.el @@ -0,0 +1,38 @@ +(resize-small) +(mjf/center-window) + +(load-file "~/.emacs.d/lisp/acme/acme-theme.el") + +(setq-default mode-line-format + '((:propertize " " face mode-line-height) + "%e" + evil-mode-line-tag + mode-line-front-space mode-line-mule-info mode-line-client mode-line-modified mode-line-remote mode-line-frame-identification mode-line-buffer-identification " " mode-line-position + (vc-mode vc-mode) + " " mode-line-modes mode-line-misc-info mode-line-end-spaces)) + +(setq mode-line-format + '((:propertize " " face mode-line-height) + "%e" + evil-mode-line-tag + mode-line-front-space mode-line-mule-info mode-line-client mode-line-modified mode-line-remote mode-line-frame-identification mode-line-buffer-identification " " mode-line-position + (vc-mode vc-mode) + " " mode-line-modes mode-line-misc-info mode-line-end-spaces)) + +(exec-path-from-shell-initialize) + +(setq elfeed-feeds + `("https://thume.ca/atom.xml" + "https://lukesmith.xyz/rss.xml" + "https://nullprogram.com/feed/" + ("https://notrelated.libsyn.com/rss" podcast) + ("http://mfeller.io/rss.xml" personal) + ,(mjf/yt-playlist-feed "PLkG-zhy1pVumXUC8e1vdfTciqZgNcpvdq") + ,(mjf/yt-channel-feed "UCBa659QWEk1AI4Tg--mrJ2A") ; Tom Scott + ,(mjf/yt-channel-feed "UCdJdEguB1F1CiYe7OEi3SBg") ; Jon Tron + ,(mjf/yt-channel-feed "UCEOXxzW2vU0P-0THehuIIeg") ; Captian D + ,(mjf/yt-channel-feed "UCrTNhL_yO3tPTdQ5XgmmWjA") ; Red Letter Media + ,(mjf/yt-channel-feed "UCgXiTWrFg05fTPfw1YLb5Ug") ; Triforce! + )) + +(provide 'init-local) diff --git a/dots/.emacs.d/lisp/init-pre-local.el b/dots/.emacs.d/lisp/init-pre-local.el @@ -0,0 +1,5 @@ +(setq user-full-name "Mark Feller") + +(setenv "SHELL" "/usr/local/bin/zsh") + +(provide 'init-pre-local) diff --git a/dots/.emacs.d/theme/poet-fork/LICENSE b/dots/.emacs.d/lisp/poet/LICENSE diff --git a/dots/.emacs.d/theme/poet-fork/README.md b/dots/.emacs.d/lisp/poet/README.md diff --git a/dots/.emacs.d/lisp/poet/poet-theme.el b/dots/.emacs.d/lisp/poet/poet-theme.el @@ -0,0 +1,337 @@ +;;; poet-theme.el --- A theme for prose. + +;; Copyright 2018-now Kunal Bhalla + +;; Author: Kunal Bhalla <bhalla.kunal@gmail.com> +;; URL: https://github.com/kunalb/poet/ +;; Version: 2.0 + +;;; Commentary: + +;; Emacs has very good support for multiple fonts in a single +;; file. Poet uses this support to make it much more convenient to +;; write prose within Emacs, with particular attention paid to +;; org-mode and markdown-mode. Code blocks, tables, etc are +;; formatted in monospace text with the appropriate backgrounds. + +;; Recommended customizations for using this theme +;; +;; - Set up the base fonts you'd like to use in Emacs before loading Poet +;; (set-face-attribute 'default nil :family "Iosevka" :height 130) +;; (set-face-attribute 'fixed-pitch nil :family "Iosevka") +;; (set-face-attribute 'variable-pitch nil :family "Baskerville") +;; On loading this theme captures the default and treats that for fixed-pitch +;; rendering. +;; +;; - Enable variable pitch mode for editing text +;; (add-hook 'text-mode-hook +;; (lambda () +;; (variable-pitch-mode 1)) +;; +;; - Some other modes I like to enable/disable +;; (olivetti-mode 1) ;; Centers text in the buffer +;; (flyspell-mode 1) ;; Catch Spelling mistakes +;; (typo-mode 1) ;; Good for symbols like em-dash +;; (blink-cursor-mode 0) ;; Reduce visual noise +;; (linum-mode 0) ;; No line numbers for prose +;; +;; - And prettier org mode bullets: +;; (setq org-bullets-bullet-list +;; '("◉" "○")) +;; (org-bullets 1) + +;;; Code: + +;; (set-face-attribute 'default nil :family "Roboto Mono") +;; (set-face-attribute 'default nil :family "Fira Mono") +;; (set-face-attribute 'default nil :family "Iosevka Slab") +(set-face-attribute 'default nil :family "Hack") + +(defvar poet--monospace-height + (face-attribute 'fixed-pitch :height nil 'default) + "The original height stored as a defvar to stay constant across reloads.") + +(defun poet--height (multiplier) + "Scale up the height according to the MULTIPLIER." + (truncate (* poet--monospace-height multiplier))) + +(deftheme poet + "A prose friendly theme.") + +(make-face 'mode-line-height) +(set-face-attribute 'mode-line-height nil + :foreground "#8888cc" :background "#8888cc" + :inverse-video nil + :box '(:line-width 6 :color "#8888cc" :style nil)) + +(let ( + ;; Primary Colors + (fg "#444444") + ;; (bg "#e1d9c2") + ;; (bg "#f6f6f6") + (bg "#FFFFea") + + (modeline "#EAFFFF") + + (white-light "#ffffff") + (yellow-light "#fff59d") + (red-light "#ff1744") + + (black "gray0") + (white "gray88") + (yellow "#fff176") + (blue "#0288D1") + (green "#388E3C") + (red "#bf360c") + (purple "#673AB7") + (brown "#8D6E63") + + ;; dark colors + (cyan-dark "#455A64") + (blue-dark "#3f51b5") + (red-dark "#8E3C38") + (purple-dark "#6C3082") + (brown-dark "#4e342e") + ) + (let ( + (emph "gray13") + ;; (sep "gray90") + (sep "gray50") + (hlt "gray93") + ;; (bg-hlt "#fff8e1") + (bg-hlt "#e4e4e4") + (meta brown-dark) + (link "#303f9f") + (link-underline "#304ffe") + (vlink-underline "#1a237e") + (button "gray27") + (cursor "gray29") + (paren-match-bg red-light) + (paren-match-fg white-light) + (search-fg red) + (search-bg white-light) + (search-fail-bg "#f8bbd0") + (tooltip-fg "#111111") + (tooltip-bg yellow) + (shadow "grey60") + (secondary-bg yellow-light) + (trailing-bg "#ff8a65") + (fci "grey87") + (mode-line-fg "grey7") + (mode-line-hlt white-light) + (mode-line-inactive "#888888") + (header red-dark) + (header-line-bg white) + (builtin red-dark) + (string green) + (function-name "#444444") + (keyword "#444444") + (constant blue) + (type "#444444") + (variable cyan-dark) + + ;; org + (org-meta brown) + (org-document-info brown) + (org-table white) + (org-quote-fg purple-dark) + (org-quote-bg white) + (org-date "#444444") + (org-title red) + (org-title-underline "#aaaaaa") + (org-checkbox "#aaaaaa") + (org-scheduled "#333333") + (org-scheduled-today "#111111") + (org-done green) + (org-todo red) + (org-tag "#777777") + (org-block-line "#d0d0d0") + (org-block-bg white) + (org-agenda-structure-fg "#555555") + (org-agenda-structure-bg white) + (org-agenda-today-fg "#000000") + (org-agenda-today-bg "#eeeeee") + (org-special-keyword "#777777") + (org-sched-prev "#222222") + (org-agenda-done "#777777") + + (hl-line "#efefef") + (linum-hlt "#555555") + (linum "#aaaaaa") + (markdown-markup brown) + (markdown-metadata "#777777") + (markdown-language purple) + (markdown-list "#000000") + (markdown-code-bg white) + (markdown-pre-bg white) + (markdown-header-delimiter brown) + (imenu brown-dark)) + (custom-theme-set-faces 'poet + `(variable-pitch ((t (:family ,(face-attribute 'variable-pitch :family) :height ,(poet--height 1))))) + + `(default ((t (:background ,bg :foreground ,fg)))) + `(italic ((t (:foreground ,emph :slant italic)))) + `(highlight ((t (:background ,hlt :overline nil)))) + `(region ((t (:background ,bg-hlt)))) + `(fringe ((t (:background ,bg)))) + `(button ((t (:inherit default :foreground ,button)))) + `(escape-glyph ((t (:foreground ,purple)))) + `(link ((t (:underline (:color ,link-underline :style line) :foreground ,link)))) + `(link-visited ((t (:inherit link :foreground ,link :underline (:color ,vlink-underline :style line))))) + `(cursor ((t (:background ,cursor)))) + `(show-paren-match ((t (:background ,paren-match-fg :foreground ,paren-match-bg)))) + `(isearch ((t (:foreground ,search-fg :background ,search-bg)))) + `(isearch-fail ((t (:background ,search-fail-bg)))) + `(query-replace ((t (:inherit isearch)))) + `(tooltip ((t (:inherit default :foreground ,tooltip-fg :background ,tooltip-bg)))) + `(shadow ((t (:foreground ,shadow)))) + `(secondary-selection ((t (:background ,secondary-bg)))) + `(trailing-whitespace ((t (:background ,trailing-bg)))) + `(lazy-highlight ((t (:foreground ,black :background ,white-light)))) + `(next-error ((t (:inherit region)))) + `(window-divider ((t (:background ,sep :foreground ,sep)))) + `(vertical-border ((t (:background ,sep :foreground ,sep)))) + `(minibuffer-prompt ((t (:inherit fixed-pitch :weight bold :foreground ,meta)))) + + ;; mode line + `(header-line ((t (:overline nil :background ,header-line-bg :box (:line-width 1 :color "#8888cc") :underline ,sep :inherit mode-line)))) + + `(mode-line ((t (:inherit fixed-pitch :foreground ,mode-line-fg :background ,modeline :overline ,sep :box (:line-width 1 :color "#8888cc"))))) + `(mode-line-inactive ((t (:inherit fixed-pitch :foreground ,mode-line-inactive :background ,modeline :overline ,sep :box (:line-width 1 :color "#8888cc"))))) + + `(mode-line-buffer-id ((t (:weight bold)))) + `(mode-line-emphasis ((t (:weight bold)))) + `(mode-line-highlight ((t (:background ,mode-line-hlt)))) + + `(error ((t (:inherit fixed-pitch)))) + + ;; primary font lock + `(font-lock-comment-face ((t (:foreground ,shadow :inherit fixed-pitch)))) + `(font-lock-builtin-face ((t (:foreground ,builtin :inherit fixed-pitch)))) + `(font-lock-string-face ((t (:inherit fixed-pitch :foreground ,string)))) + `(font-lock-function-name-face ((t (:inherit fixed-pitch :foreground ,function-name)))) + `(font-lock-keyword-face ((t (:inherit fixed-pitch :weight bold :foreground ,keyword)))) + `(font-lock-comment-delimiter-face ((t (:inherit fixed-pitch :inherit font-lock-comment-face)))) + `(font-lock-constant-face ((t (:inherit fixed-pitch)))) + `(font-lock-doc-face ((t (:inherit fixed-pitch :inherit font-lock-string-face)))) + `(font-lock-preprocessor-face ((t (:inherit fixed-pitch :inherit font-lock-builtin-face)))) + `(font-lock-regexp-grouping-backslash ((t (:inherit fixed-pitch :inherit bold)))) + `(font-lock-regexp-grouping-construct ((t (:inherit fixed-pitch :inherit bold)))) + `(font-lock-type-face ((t (:inherit fixed-pitch)))) + `(font-lock-variable-name-face ((t (:inherit fixed-pitch :foreground ,variable)))) + `(font-lock-warning-face ((t (:inherit error)))) + + ;; Org + `(org-level-1 ((t (:inherit default :foreground ,header :height ,(poet--height 1.5))))) + `(org-level-2 ((t (:inherit default :foreground ,header :height ,(poet--height 1.4))))) + `(org-level-3 ((t (:inherit default :foreground ,header :height ,(poet--height 1.3))))) + `(org-level-4 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) + `(org-level-5 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) + `(org-level-6 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) + `(org-level-7 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) + `(org-level-8 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) + `(org-meta-line ((t (:inherit fixed-pitch :foreground ,org-meta)))) + `(org-document-info-keyword ((t (:inherit fixed-pitch :foreground ,org-document-info)))) + `(org-document-info ((t (:inherit default :foreground ,org-document-info)))) + `(org-verbatim ((t (:inherit fixed-pitch)))) + `(org-table ((t (:inherit fixed-pitch :background ,org-table)))) + `(org-formula ((t (:inherit org-table :height ,(poet--height 1))))) + `(org-quote ((t (:inherit default :foreground ,org-quote-fg :background ,org-quote-bg)))) + `(org-hide ((t (:inherit fixed-pitch :foreground ,bg)))) + `(org-indent ((t (:inherit org-hide)))) + `(org-date ((t (:inherit fixed-pitch :foreground ,org-date :underline nil)))) + `(org-document-title ((t (:inherit default :foreground ,org-title :height ,(poet--height 1.8) :underline (:color ,org-title-underline))))) + `(org-checkbox ((t (:inherit fixed-pitch :weight bold :foreground ,org-checkbox)))) + `(org-scheduled ((t (:foreground ,org-scheduled)))) + `(org-scheduled-today ((t (:foreground ,org-scheduled-today)))) + `(org-done ((t (:inherit fixed-pitch :foreground ,org-done)))) + `(org-todo ((t (:inherit fixed-pitch :foreground ,org-todo)))) + `(org-tag ((t (:inherit fixed-pitch :height ,(poet--height 1) :foreground ,org-tag)))) + `(org-block-begin-line ((t (:inherit fixed-pitch :background ,org-block-line)))) + `(org-block-end-line ((t (:inherit fixed-pitch :background ,org-block-line)))) + `(org-block ((t (:background ,org-block-bg :inherit fixed-pitch)))) + `(org-priority ((t (:inherit fixed-pitch :weight normal)))) + `(org-agenda-structure ((t (:foreground ,org-agenda-structure-fg :background ,org-agenda-structure-bg :overline ,org-agenda-structure-bg :underline ,org-agenda-structure-bg)))) + `(org-agenda-date-weekend ((t (:inherit org-agenda-structure)))) + `(org-agenda-date-today ((t (:foreground ,org-agenda-today-fg :overline ,org-agenda-today-bg :background ,org-agenda-today-bg :underline ,org-agenda-today-bg)))) + `(org-special-keyword ((t (:inherit fixed-pitch :foreground ,org-special-keyword)))) + `(org-scheduled-previously ((t (:foreground ,org-sched-prev)))) + `(org-agenda-done ((t (:foreground ,org-agenda-done)))) + `(org-footnote ((t (:foreground ,link)))) + `(hl-line ((t (:background ,hl-line)))) + + ;; line numbers + `(line-number ((t (:inherit fixed-pitch :foreground ,linum)))) + `(line-number-current-line ((t (:inherit fixed-pitch :foreground ,linum-hlt)))) + + ;; markdown + `(markdown-header-face-1 ((t (:foreground ,header :inherit default :height ,(poet--height 1.5))))) + `(markdown-header-face-2 ((t (:foreground ,header :inherit default :height ,(poet--height 1.4))))) + `(markdown-header-face-3 ((t (:foreground ,header :inherit default :height ,(poet--height 1.3))))) + `(markdown-header-face-4 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) + `(markdown-header-face-5 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) + `(markdown-header-face-6 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) + `(markdown-header-face-7 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) + `(markdown-header-face-8 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) + `(markdown-markup-face ((t (:inherit fixed-pitch :foreground ,markdown-markup)))) + `(markdown-inline-code-face ((t (:inherit fixed-pitch)))) + `(markdown-metadata-key-face ((t (:inherit fixed-pitch :height ,(poet--height 1) :foreground ,markdown-metadata)))) + `(markdown-metadata-value-face ((t (:inherit fixed-pitch :height ,(poet--height 1) :foreground ,fg)))) + `(markdown-language-keyword-face ((t (:foreground ,markdown-language)))) + `(markdown-list-face ((t (:inherit fixed-pitch :foreground ,markdown-list)))) + `(markdown-code-face ((t (:inherit fixed-pitch :foreground ,fg :background ,markdown-code-bg)))) + `(markdown-pre-face ((t (:inherit fixed-pitch :color ,fg :background ,markdown-pre-bg)))) + `(markdown-header-delimiter-face ((t (:inherit fixed-pitch :foreground ,markdown-header-delimiter)))) + `(markdown-header-rule-face ((t (:inherit fixed-pitch :foreground ,markdown-header-delimiter)))) + `(markdown-url-face ((t (:inherit fixed-pitch :foreground ,link)))) + + ;; ivy + `(ivy-current-match ((t (:inherit fixed-pitch :background ,hlt)))) + `(ivy-minibuffer-match-face-1 ((t (:inherit fixed-pitch :foreground ,cyan-dark)))) + `(ivy-minibuffer-match-face-2 ((t (:inherit fixed-pitch :foreground ,red-dark)))) + `(ivy-minibuffer-match-face-3 ((t (:inherit fixed-pitch :foreground ,blue-dark)))) + `(ivy-minibuffer-match-face-4 ((t (:inherit fixed-pitch :foreground ,brown-dark)))) + + ;; imenu + `(imenu-list-entry-face-0 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-1 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-2 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-3 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-4 ((t (:foreground ,imenu)))) + `(imenu-list-entry-face-5 ((t (:foreground ,imenu)))) + + ;; tldr + `(tldr-title ((t (:foreground ,red :weight bold :height 1.9)))) + `(tldr-description ((t (:foreground ,green)))) + `(tldr-code-block ((t ()))) + `(tldr-command-argument ((t ()))) + + `(company-tooltip-selection ((t (:background "#ddffdd")))) + `(company-tooltip-selection ((t (:background "#cee7cf")))) + `(company-tooltip-common ((t (:inherit fixed-pitch :foreground nil :underline nil :weight bold)))) + `(company-scrollbar-fg ((t (:background "#388E3C")))) + `(company-preview-common ((t (:underline nil)))) + `(company-tooltip-common ((t (:underline nil)))) + `(company-tooltip-common-selection ((t (:underline nil)))) + + ;; evil + `(evil-ex-substitute-replacement ((t (:foreground ,white-light :background ,brown-dark :underline nil)))) + `(evil-goggles-delete-face ((t (:inherit 'lazy-highlight)))) + `(evil-goggles-paste-face ((t (:inherit 'lazy-highlight)))) + `(evil-goggles-yank-face ((t (:inherit 'lazy-highlight)))) + + `(helm-source-header ((t (:height ,(poet--height 1)))))) + + (custom-theme-set-variables 'poet + '(line-spacing 0.4) + `(fci-rule-color ,fci)))) + +;;;###autoload +(when (and (boundp 'custom-theme-load-path) + load-file-name) + (add-to-list 'custom-theme-load-path + (file-name-as-directory + (file-name-directory load-file-name)))) + +(provide-theme 'poet) +;;; poet-theme.el ends here diff --git a/dots/.emacs.d/theme/poet-fork/tests/test.md b/dots/.emacs.d/lisp/poet/tests/test.md diff --git a/dots/.emacs.d/theme/poet-fork/tests/test.org b/dots/.emacs.d/lisp/poet/tests/test.org diff --git a/dots/.emacs.d/modules/module-company.el b/dots/.emacs.d/modules/module-company.el @@ -22,24 +22,16 @@ ;;; Code: (use-package company - :ensure t - :demand :delight (company-mode nil "company") + :demand :config - (progn (setq company-idle-delay 0) - (setq company-tooltip-limit 10) - (setq company-echo-delay 0) - (setq company-tooltip-flip-when-above t) - (setq company-begin-commands '(self-insert-command)) - - ;; Face Configuration - (set-face-attribute 'company-tooltip-selection nil :background "#ddffdd") - (set-face-attribute 'company-tooltip-selection nil :background "#cee7cf") - (set-face-attribute 'company-tooltip-common nil :inherit 'fixed-pitch :foreground nil :underline nil :weight 'bold) - (set-face-attribute 'company-scrollbar-fg nil :background "#388E3C") - (set-face-attribute 'company-preview-common nil :underline nil) - (set-face-attribute 'company-tooltip-common nil :underline nil) - (set-face-attribute 'company-tooltip-common-selection nil :underline nil))) + (setq company-idle-delay 0) + (setq company-tooltip-limit 10) + (setq company-echo-delay 0) + (setq company-tooltip-flip-when-above t) + (setq company-begin-commands '(self-insert-command)) + + (global-company-mode)) (provide 'module-company) diff --git a/dots/.emacs.d/modules/module-css.el b/dots/.emacs.d/modules/module-css.el @@ -21,9 +21,11 @@ ;;; Code: -(use-package scss-mode) +(use-package scss-mode + :disable) -(use-package less-css-mode) +(use-package less-css-mode + :disable) (use-package css-eldoc :after (eldoc)) diff --git a/dots/.emacs.d/modules/module-docker.el b/dots/.emacs.d/modules/module-docker.el @@ -24,7 +24,9 @@ (use-package docker :disabled) -(use-package dockerfile-mode) +(use-package dockerfile-mode + :config + (add-to-list 'auto-mode-alist '("Dockerfile\\'" . dockerfile-mode))) (provide 'module-docker) diff --git a/dots/.emacs.d/modules/module-eldoc.el b/dots/.emacs.d/modules/module-eldoc.el @@ -22,7 +22,8 @@ ;;; Code: (use-package eldoc - :delight (eldoc-mode)) + :delight (eldoc-mode) + :config (global-eldoc-mode)) (provide 'module-eldoc) diff --git a/dots/.emacs.d/modules/module-elfeed.el b/dots/.emacs.d/modules/module-elfeed.el @@ -0,0 +1,68 @@ +;;; module-elfeed.el + +;; Author: Mark Feller <mark.feller@member.fsf.org> + +;; This file is not part of GNU Emacs. + +;; This file 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, or (at your option) +;; any later version. + +;; This file 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 file. If not, see <http://www.gnu.org/licenses/>. + +;;; Commentary: + +;; elfeed provides an RSS feed viewer. I added some helper functions for +;; tracking youtube channels and playlists as well as a mechanism to +;; watch videos with mpv. Hopefully this will allow me to follow +;; channels I care about without getting sucked into the YouTube +;; algorithm. + +;;; Code: + +(defvar mjf/elfeed-ytdl-format + "bestvideo[height<=?720][fps<=?30]+bestaudio/best" + "Video and audio format for downloaded youtube content") + +(defun mjf/play-video-at-point () + "Play the link at point with mpv" + (interactive) + (shell-command (format "mpv --ytdl-format='%s' '%s' &" + mjf/elfeed-ytdl-format + (thing-at-point 'url)))) + +(defun mjf/yt-channel-feed (channel) + "Create an elfeed feed for a given YouTube channel" + (let ((feed (format "https://www.youtube.com/feeds/videos.xml?channel_id=%s" + channel))) + `(,feed youtube))) + +(defun mjf/yt-playlist-feed (playlist) + "Create an elfeed feed for a given YouTube playlist" + (let ((feed (format "https://www.youtube.com/feeds/videos.xml?playlist_id=%s" + playlist))) + `(,feed youtube))) + +(use-package elfeed + :bind + (:map elfeed-show-mode-map + ("C-c o" . mjf/play-video-at-point)) + + :config + (setq elfeed-db-directory "~/.local/share/elfeed") + + (add-hook 'elfeed-search-mode-hook 'disable-line-numbers) + (add-hook 'elfeed-search-mode-hook 'evil-emacs-state) + (add-hook 'elfeed-show-mode-hook 'disable-line-numbers) + (add-hook 'elfeed-show-mode-hook 'evil-emacs-state)) + +(provide 'module-elfeed) + +;;; module-elfeed.el ends here diff --git a/dots/.emacs.d/modules/module-eshell.el b/dots/.emacs.d/modules/module-eshell.el @@ -21,35 +21,34 @@ ;;; Code: -(use-package eshell - :config - (progn (setq eshell-directory-name "~/.emacs.d/persistent/eshell") - - (setq eshell-cmpl-cycle-completions nil - eshell-buffer-maximum-lines 20000 ; auto truncate after 20k lines - eshell-history-size 350 ; history size - eshell-buffer-shorthand t ; buffer shorthand -> echo foo > #'buffer - eshell-highlight-prompt nil ; my prompt is easy enough to see - eshell-plain-echo-behavior t) ; treat 'echo' like shell echo - - ;;(add-to-list 'eshell-visual-commands '("ncmpcpp" "htop")) - - (add-to-list 'eshell-load-hook 'set-exec-path-from-shell-PATH))) - -;; -;; defuns -;; - -(defun set-exec-path-from-shell-PATH () - "Set up Emacs' `exec-path' and PATH environment variable to match that used by the user's shell. - This is particularly useful under Mac OSX, where GUI apps are - not started from a shell." +(defun mjf/set-exec-path-from-shell-PATH () + "Set up Emacs' `exec-path` and PATH environment variable to + match that used by the user's shell. This is particularly + useful under macOS, where GUI apps are not started from a + shell." (interactive) (let ((path-from-shell (replace-regexp-in-string "[ \t\n]*$" "" (shell-command-to-string "$SHELL --login -i -c 'echo $PATH'")))) (setenv "PATH" path-from-shell) (setq exec-path (split-string path-from-shell path-separator)))) +(use-package eshell + :bind + (:map eshell-mode-map + ("C-l". evil-scroll-line-to-top)) + + :config + (setq eshell-directory-name "~/.cache/eshell" + eshell-cmpl-cycle-completions nil + eshell-buffer-maximum-lines 20000 + eshell-history-size 350 + eshell-buffer-shorthand t ; buffer shorthand -> echo foo > #'buffer + eshell-highlight-prompt nil + eshell-plain-echo-behavior t) ; treat 'echo' like shell echo + + (add-hook 'eshell-mode-hook 'disable-line-numbers) + (add-to-list 'eshell-load-hook 'mjf/set-exec-path-from-shell-PATH)) + (provide 'module-eshell) ;;; module-eshell.el ends here diff --git a/dots/.emacs.d/modules/module-evil.el b/dots/.emacs.d/modules/module-evil.el @@ -22,41 +22,27 @@ ;;; Code: (use-package evil + :bind + (:map evil-normal-state-map ("C-u" . evil-scroll-up)) + (:map evil-visual-state-map ("C-u" . evil-scroll-up)) + (:map evil-insert-state-map ("C-u" . evil-scroll-up)) + :config - (progn (setq evil-mode-line-format '(before . mode-line-front-space)) - (setq evil-echo-state nil) - - ;; prevent esc-key from translating to meta-key in terminal mode - (setq evil-esc-delay 0) - - (evil-mode 1) - - (define-key evil-normal-state-map (kbd "C-u") 'evil-scroll-up) - (define-key evil-visual-state-map (kbd "C-u") 'evil-scroll-up) - (define-key evil-insert-state-map (kbd "C-u") - (lambda () - (interactive) - (evil-delete (point-at-bol) (point)))))) - -(evil-define-key 'normal neotree-mode-map (kbd "TAB") 'neotree-enter) -(evil-define-key 'normal neotree-mode-map (kbd "o") 'neotree-quick-look) -(evil-define-key 'normal neotree-mode-map (kbd "q") 'neotree-hide) -(evil-define-key 'normal neotree-mode-map (kbd "RET") 'neotree-enter) -(evil-define-key 'normal neotree-mode-map (kbd "g") 'neotree-refresh) -(evil-define-key 'normal neotree-mode-map (kbd "n") 'neotree-next-line) -(evil-define-key 'normal neotree-mode-map (kbd "p") 'neotree-previous-line) -(evil-define-key 'normal neotree-mode-map (kbd "A") 'neotree-stretch-toggle) -(evil-define-key 'normal neotree-mode-map (kbd "H") 'neotree-hidden-file-toggle) - -;; evil-goggles will slightly delay vi operations and show a shadow on the text -;; area being operated on. Extremely useful for pair programming + (setq evil-mode-line-format '(before . mode-line-front-space)) + (setq evil-echo-state nil) + (setq evil-esc-delay 0) + + (evil-mode t)) + (use-package evil-goggles :delight (evil-goggles-mode) + :config - (progn (evil-goggles-mode t) - (setq evil-goggles-pulse t) - (setq evil-goggles-blocking-duration 0.100) - (setq evil-goggles-async-duration 0.300))) + (setq evil-goggles-pulse t) + (setq evil-goggles-blocking-duration 0.100) + (setq evil-goggles-async-duration 0.300) + + (evil-goggles-mode t)) (use-package evil-surround :config (global-evil-surround-mode t)) @@ -74,18 +60,20 @@ (use-package evil-org :disabled :delight (evil-org-mode) + :config - (progn (add-hook 'org-mode-hook 'evil-org-mode) - - (require 'evil-org-agenda) - (evil-org-agenda-set-keys) - (evil-org-set-key-theme '(textobjects - insert - navigation - additional - shift - todo - heading)))) + (require 'evil-org-agenda) + + (add-hook 'org-mode-hook 'evil-org-mode) + + (evil-org-agenda-set-keys) + (evil-org-set-key-theme '(textobjects + insert + navigation + additional + shift + todo + heading))) (provide 'module-evil) diff --git a/dots/.emacs.d/modules/module-git.el b/dots/.emacs.d/modules/module-git.el @@ -21,41 +21,31 @@ ;;; Code: +(defun mjf/magit-status-with-prefix () + (interactive) + (let ((current-prefix-arg '(4))) + (call-interactively 'magit-status))) + (use-package magit :bind (("C-x g" . magit-status) - ("C-x G" . magit-status-with-prefix)) + ("C-x G" . mjf/magit-status-with-prefix)) :init - (progn (defun magit-status-with-prefix () - (interactive) - (let ((current-prefix-arg '(4))) - (call-interactively 'magit-status))) - - (setq transient-history-file (concat persistent-dir "/transient/history.el") - transient-display-buffer-action '(display-buffer-below-selected) - transient-mode-line-format - '("%e" mode-line-front-space mode-line-buffer-identification)))) - -;; (use-package evil-magit) - -(use-package gitignore-mode) + (setq transient-history-file "~/.cache/transient/history.el") + (setq transient-display-buffer-action '(display-buffer-below-selected)) + (setq transient-mode-line-format + '("%e" mode-line-front-space mode-line-buffer-identification))) (use-package magithub :disabled :after magit :config - (progn (magithub-feature-autoinject t) - (setq magithub-api-timeout 5 - magithub-dir (concat persistent-dir "/magithub")))) + (magithub-feature-autoinject t) + (setq magithub-api-timeout 5) + (setq magithub-dir "~/.cache/magithub")) -(use-package git-timemachine) +(use-package gitignore-mode) -(use-package git-gutter-fringe+ - :disabled - :delight git-gutter+-mode - :config - (progn (require 'git-gutter-fringe+) - (git-gutter-fr+-minimal) - (global-git-gutter+-mode))) +(use-package git-timemachine) (provide 'module-git) diff --git a/dots/.emacs.d/modules/module-gitlab.el b/dots/.emacs.d/modules/module-gitlab.el @@ -1 +0,0 @@ -(setq gitlab-host "https://gitlab.com") diff --git a/dots/.emacs.d/modules/module-go.el b/dots/.emacs.d/modules/module-go.el @@ -21,71 +21,78 @@ ;;; Code: -;; set gopath unless it has already been set -(defvar go-compile-command "go build -v && go vet && go test -covermode=count -coverprofile=out.cover") - -(unless (getenv "GOPATH") - (setenv "GOPATH" (concat (getenv "HOME") "/prog/go"))) -(setenv "PATH" (concat (getenv "PATH") ":/Users/mfeller/prog/go/bin")) +(defvar mjf/go-compile-command + "go build -v && go vet && go test -covermode=count -coverprofile=out.cover") + +(defun mjf/go-prog-init () + "if go is install go get all dependencies for emacs go packages" + (interactive) + (if (not (eq (executable-find "go") nil)) + (progn + (mapcar (lambda (pkg) + (let ((cmd (concat "go get -u " pkg))) + (call-process-shell-command cmd nil "*go-get-output*" t))) + '("github.com/nsf/gocode" + "golang.org/x/tools/cmd/goimports" + "github.com/rogpeppe/godef" + "github.com/golang/lint" + "golang.org/x/tools/cmd/gorename" + "golang.org/x/tools/cmd/guru" + "github.com/kisielk/errcheck"))) + (message "go executable not found, install go from https://golang.org/download"))) + +(defun mjf/ginkgo-test (package) + "Run ginkgo test suites recursively from a given go package" + (interactive (list (read-directory-name "Package:"))) + (async-shell-command + (concat "ginkgo -r " package) "*Ginkgo Tests*") + + ;; get out of evil insert mode and dont truncate text + (switch-to-buffer "*Ginkgo Tests*") + (local-set-key (kbd "q") 'kill-buffer-and-window) + (evil-motion-state) + (toggle-truncate-lines) + (message nil) + (previous-buffer)) + +(defun mjf/go-cover () + (interactive) + (shell-command "go tool cover -html=out.cover")) + +(defun mjf/setup-go-mode-compile () + "Customize compile command to run go build" + (set (make-local-variable 'compile-command) + mjf/go-compile-command)) + +(defun mjf/go-init-company () + "Initialize company mode for go" + (set (make-local-variable 'company-backends) '(company-go)) + (company-mode)) (use-package go-mode - :bind (:map go-mode-map - ("C-c C-g" . go-goto-imports) - ("C-c C-c" . compile) - ("C-c C-t" . ginkgo-test) - ("C-c C" . go-cover)) + :bind + (:map go-mode-map + ("C-c C-g" . go-goto-imports) + ("C-c C-c" . compile) + ("C-c C-t" . ginkgo-test) + ("C-c C" . go-cover)) + + :init + (unless (getenv "GOPATH") + (setenv "GOPATH" (concat (getenv "HOME") "/prog/go"))) + + (setenv "PATH" (concat (getenv "PATH") ":" + (concat (getenv "GOPATH")"/bin"))) + :config - (progn (setq gofmt-command "goimports") ; use goimports instead of go-fmt - (setq godoc-command "godoc") ; use godoc instead of go doc - (setq tab-width 4) - - (defun go-prog-init () - "if go is install go get all dependencies for emacs go packages" - (interactive) - (if (not (eq (executable-find "go") nil)) - (progn - (mapcar (lambda (pkg) - (let ((cmd (concat "go get -u " pkg))) - (call-process-shell-command cmd nil "*go-get-output*" t))) - '("github.com/nsf/gocode" - "golang.org/x/tools/cmd/goimports" - "github.com/rogpeppe/godef" - "github.com/golang/lint" - "golang.org/x/tools/cmd/gorename" - "golang.org/x/tools/cmd/guru" - "github.com/kisielk/errcheck"))) - (message "go executable not found, install go from https://golang.org/download"))) - - (defun ginkgo-test (package) - "Run ginkgo test suites recursively from a given go package" - (interactive (list (read-directory-name "Package:"))) - (async-shell-command - (concat "ginkgo -r " package) "*Ginkgo Tests*") - - ;; get out of evil insert mode and dont truncate text - (switch-to-buffer "*Ginkgo Tests*") - (local-set-key (kbd "q") 'kill-buffer-and-window) - (evil-motion-state) - (toggle-truncate-lines) - (message nil) - (previous-buffer)) - - (defun go-cover () - (interactive) - (shell-command "go tool cover -html=out.cover")) - - (defun setup-go-mode-compile () - "Customize compile command to run go build" - (set (make-local-variable 'compile-command) - go-compile-command)) - - (add-hook 'go-mode-hook 'setup-go-mode-compile) - (add-hook 'go-mode-hook 'subword-mode) - - ;; format before save - (add-hook 'before-save-hook 'gofmt-before-save))) - -;; go-add-tags provides functions for adding tags to go structs + (setq gofmt-command "goimports") ; use goimports instead of go-fmt + (setq godoc-command "godoc") ; use godoc instead of go doc + (setq tab-width 8) + + (add-hook 'go-mode-hook 'setup-go-mode-compile) + (add-hook 'go-mode-hook 'subword-mode) + (add-hook 'before-save-hook 'gofmt-before-save)) + (use-package go-add-tags :after go-mode) @@ -96,29 +103,29 @@ (use-package go-guru :after go-mode - :bind (:map go-mode-map - ("M-." . go-guru-definition) - ("C-c d" . go-guru-describe))) + :bind + (:map go-mode-map + ("M-." . go-guru-definition) + ("C-c d" . go-guru-describe))) (use-package company-go :after (go-mode company) :config - (progn (add-hook 'go-mode-hook (lambda () - (set (make-local-variable 'company-backends) '(company-go)) - (company-mode))))) + (add-hook 'go-mode-hook 'mjf/go-init-company)) (use-package go-eldoc :after (go-mode eldoc) :config - (progn (add-hook 'go-mode-hook 'go-eldoc-setup))) + (add-hook 'go-mode-hook 'go-eldoc-setup)) (use-package flycheck-gometalinter + :disabled :after (go-mode flycheck-mode) :config - (progn (flycheck-gometalinter-setup) - (setq flycheck-gometalinter-deadline "10s") - (setq flycheck-gometalinter-fast t) - (setq flycheck-gometalinter-disable-linters '("gotype" "gocyclo")))) + (flycheck-gometalinter-setup) + (setq flycheck-gometalinter-deadline "10s") + (setq flycheck-gometalinter-fast t) + (setq flycheck-gometalinter-disable-linters '("gotype" "gocyclo"))) (provide 'module-go) diff --git a/dots/.emacs.d/modules/module-mastodon.el b/dots/.emacs.d/modules/module-mastodon.el @@ -1,3 +0,0 @@ -(use-package mastodon - :load-path "~/.emacs.d/lisp/mastodon/lisp/mastodon.el" - :config (setq mastodon-instance-url "https://mstdn.io")) diff --git a/dots/.emacs.d/modules/module-multiple-cursors.el b/dots/.emacs.d/modules/module-multiple-cursors.el @@ -5,6 +5,6 @@ ("C-c C-<" . mc/mark-all-like-this) ("C-S-SPC" . set-rectangular-region-anchor) ("C-S-c C->" . mc/mark-sgml-tag-pair)) - :init (setq mc/list-file (expand-file-name "mc-lists.el" persistent-dir))) + :init (setq mc/list-file "~/.cache/mc-lists.el")) (provide 'module-multiple-cursors) diff --git a/dots/.emacs.d/modules/module-notmuch.el b/dots/.emacs.d/modules/module-notmuch.el @@ -19,22 +19,53 @@ ;;; Commentary: +;; Notmuch mail provides email indexing and searching based on tags. See +;; https://notmuchmail.org/ + ;;; Code: +(defun mjf/tag-deleted () + "Tag mail at point as deleted" + (interactive) + (notmuch-search-tag '("+deleted" "-inbox" "-unread")) + (next-line)) + +(defun mjf/delete-tagged-mail () + "Delete mail that is tagged with the deleted tag" + (interactive) + (shell-command "notmuch_delete") + (notmuch-refresh-all-buffers)) + +(defun mjf/getmail () + "Fetch mail using getmail" + (interactive) + (message "Fetching mail...") + (shell-command "getmail") + (notmuch-hello-update)) + (use-package notmuch + :bind + (:map notmuch-search-mode-map + ("d" . mjf/tag-deleted) + ("D" . mjf/delete-tagged-mail)) + (:map notmuch-tree-mode-map + ("d" . mjf/tag-deleted) + ("D" . mjf/delete-tagged-mail)) + (:map notmuch-hello-mode-map + ("r" . mjf/getmail)) + :config - (progn (setq user-full-name "Mark Feller") - - (setq message-sendmail-envelope-from 'header) - (add-hook 'message-send-mail-hook 'cg-feed-msmtp) - - (setq notmuch-saved-searches - '((:name "inbox" :query "tag:inbox" :key "i") - (:name "unread" :query "tag:unread" :key "u") - (:name "sent" :query "tag:sent" :key "t") - (:name "drafts" :query "tag:draft" :key "d") - (:name "guix-devel" :query "guix-devel tag:unread" :key "g") - (:name "emacs-devel" :query "emacs-devel tag:unread" :key "e"))))) + (add-hook 'notmuch-hello-mode-hook 'disable-line-numbers) + (add-hook 'notmuch-search-mode-hook 'disable-line-numbers) + (add-hook 'notmuch-tree-mode-hook 'disable-line-numbers) + + (setq notmuch-saved-searches + '((:name "inbox" :query "tag:inbox" :key "i") + (:name "unread" :query "tag:unread" :key "u") + (:name "all" :query "*" :key "a") + (:name "deleted" :query "tag:deleted") + (:name "sent" :query "tag:sent" :key "t") + (:name "drafts" :query "tag:draft" :key "d")))) (provide 'module-notmuch) diff --git a/dots/.emacs.d/modules/module-org.el b/dots/.emacs.d/modules/module-org.el @@ -21,6 +21,11 @@ ;;; Code: +(defun mjf/org-summary-todo (n-done n-not-done) + "Switch entry to DONE when all subentries are done, to TODO otherwise." + (let (org-log-done org-log-states) ; turn off logging + (org-todo (if (= n-not-done 0) "DONE" "TODO")))) + (use-package org :bind (("C-c l" . org-store-link) ("C-c a" . org-agenda) @@ -29,91 +34,84 @@ ("C-x C-s" . org-edit-src-exit)) :delight (org-indent-mode nil t) :config - (progn (require 'org-indent) - (require 'org-src) - (require 'ob-shell) - - (setq org-startup-indented t) - (setq org-src-tab-acts-natively t) - (setq org-src-fontify-natively t) - (setq org-hide-emphasis-markers t) - - (defun org-summary-todo (n-done n-not-done) - "Switch entry to DONE when all subentries are done, to TODO otherwise." - (let (org-log-done org-log-states) ; turn off logging - (org-todo (if (= n-not-done 0) "DONE" "TODO")))) - (add-hook 'org-after-todo-statistics-hook 'org-summary-todo) - - ;; disable line numbers in org mode - (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) - - ;; where I keep all my org files - (setq org-agenda-files - '("~/org/work.org" - "~/org/life.org")) - - ;; personal capture templates - (setq org-capture-templates - '( - ;; unfiled work items - ("w" "Work" entry (file+headline "~/org/work.org" "Unread") - "* TODO %?\n %i\n") - - ;; random thoughts I'd like to capture - ("t" "Thought" entry (file+headline "~/org/work.org" "Thoughts") - "* %?\n %i\n") - - ;; unfiled work items in my life - ("l" "Life" entry (file+headline "~/org/life.org" "Inbox") - "* TODO %?\n %i\n") - - ("j" "Journal" entry (file+datetree "~/org/life.org") - "* TODO %?\n"))) - - ;; when refiling an org header don't search more than 3 levels deep - (setq org-refile-targets - '((nil :maxlevel . 3) - (org-agenda-files :maxlevel . 3))) - - (setq org-todo-keywords - '((sequence "TODO(t)" "BLOCKED(b)" "|" "DONE(d)" "CANCELLED(c)") - (sequence "RECURRING(r)" "|" "DONE(d)"))) - - ;; don't make the title big, I don't like that. Also remove those ugly - ;; checkboxes - (set-face-attribute 'org-document-title nil :height 1) - (set-face-attribute 'org-checkbox nil :box nil))) + (require 'org-indent) + (require 'org-src) + (require 'ob-shell) + + (setq org-startup-indented t) + (setq org-src-tab-acts-natively t) + (setq org-src-fontify-natively t) + (setq org-hide-emphasis-markers t) + + (add-hook 'org-after-todo-statistics-hook 'mjf/org-summary-todo) + (add-hook 'org-mode-hook 'disable-line-numbers) + (add-hook 'org-mode-hook (lambda () (org-bullets-mode 1))) + + ;; where I keep all my org files + (setq org-agenda-files + '("~/org/work.org" + "~/org/life.org")) + + ;; personal capture templates + (setq org-capture-templates + '( + ;; unfiled work items + ("w" "Work" entry (file+headline "~/org/work.org" "Unread") + "* TODO %?\n %i\n") + + ;; random thoughts I'd like to capture + ("t" "Thought" entry (file+headline "~/org/work.org" "Thoughts") + "* %?\n %i\n") + + ;; unfiled work items in my life + ("l" "Life" entry (file+headline "~/org/life.org" "Inbox") + "* TODO %?\n %i\n") + + ("j" "Journal" entry (file+datetree "~/org/life.org") + "* TODO %?\n"))) + + ;; when refiling an org header don't search more than 3 levels deep + (setq org-refile-targets + '((nil :maxlevel . 3) + (org-agenda-files :maxlevel . 3))) + + (setq org-todo-keywords + '((sequence "TODO(t)" "BLOCKED(b)" "|" "DONE(d)" "CANCELLED(c)") + (sequence "RECURRING(r)" "|" "DONE(d)"))) + + ;; don't make the title big, I don't like that. Also remove those ugly + ;; checkboxes + (set-face-attribute 'org-document-title nil :height 1) + (set-face-attribute 'org-checkbox nil :box nil)) (use-package org-bullets :config - (progn (setq org-bullets-bullet-list '("●" "○" "◉" "•")) + (setq org-bullets-bullet-list '("●" "○" "◉" "•")) - ;; bullets on lists - (font-lock-add-keywords - 'org-mode - '(("^ +\\([-*]\\) " - (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))))) + ;; bullets on lists + (font-lock-add-keywords + 'org-mode + '(("^ +\\([-*]\\) " + (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))) (use-package org-fancy-priorities :ensure t :delight (org-fancy-priorities-mode) :hook (org-mode . org-fancy-priorities-mode) :config - (progn (setq org-fancy-priorities-list '("⬆" "➡" "⬇" "☕")) - - ;; solarized theme on priorities - (setq org-priority-faces '((65 . "#dc322f") - (66 . "#cb4b16") - (67 . "#859900"))))) + (setq org-fancy-priorities-list '("⬆" "➡" "⬇" "☕")) + (setq org-priority-faces '((65 . "#dc322f") + (66 . "#cb4b16") + (67 . "#859900")))) (use-package deft :disabled :config - (progn (setq deft-directory "~/org" - deft-extensions '("md" "org") - deft-recursive t) + (setq deft-directory "~/org" + deft-extensions '("md" "org") + deft-recursive t) - (add-hook 'deft-mode-hook (lambda () (evil-emacs-state))))) + (add-hook 'deft-mode-hook (lambda () (evil-emacs-state)))) (provide 'module-org) diff --git a/dots/.emacs.d/modules/module-projectile.el b/dots/.emacs.d/modules/module-projectile.el @@ -23,11 +23,13 @@ (use-package projectile :delight (projectile-mode) + :bind + (:map projectile-mode-map + ("C-c p" . 'projectile-command-map)) :config - (progn (define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map) - (setq projectile-completion-system 'ivy - projectile-cache-file (expand-file-name "projectile-cache" persistent-dir) - projectile-known-projects-file (expand-file-name "projectile-bookmarks.eld" persistent-dir)))) + (setq projectile-completion-system 'ivy) + (setq projectile-cache-file "~/.cache/projectile-cache") + (setq projectile-known-projects-file "~/.cache/projectile-bookmarks.eld")) (use-package counsel-projectile :after (counsel projectile) diff --git a/dots/.emacs.d/modules/module-python.el b/dots/.emacs.d/modules/module-python.el @@ -21,42 +21,13 @@ ;;; Code: -(use-package python) - -(use-package elpy - :bind (:map elpy-mode-map - ("C-c C-j" . elpy-goto-definition) - ("M-," . pop-tag-mark)) - :config - (progn (setq elpy-rpc-backend "jedi") - (elpy-enable))) - - -(use-package pip-requirements - :config - (add-hook 'pip-requirements-mode-hook #'pip-requirements-auto-complete-setup)) - -(use-package py-autopep8) - -(use-package pyenv-mode - :disabled - :init - (add-to-list 'exec-path "~/.pyenv/shims") - (setenv "WORKON_HOME" "~/.pyenv/versions/") - :config - (pyenv-mode) - (add-hook 'after-init-hook 'pyenv-init) - (add-hook 'projectile-after-switch-project-hook 'pyenv-activate-current-project) - :bind - ("C-x p e" . pyenv-activate-current-project)) - (defun pyenv-init() (setq global-pyenv (replace-regexp-in-string "\n" "" (shell-command-to-string "pyenv global"))) (message (concat "Setting pyenv version to " global-pyenv)) (pyenv-mode-set global-pyenv) (defvar pyenv-current-version nil global-pyenv)) -(defun pyenv-activate-current-project () +(defun mjf/pyenv-activate-current-project () "Automatically activates pyenv version if .python-version file exists." (interactive) (f-traverse-upwards @@ -70,12 +41,32 @@ (pyvenv-workon pyenv-current-version) (message (concat "Setting virtualenv to " pyenv-current-version)))))))) +(use-package python + :config + (setq python-shell-interpreter "ipython") + (setq python-shell-interpreter-args "-i --simple-prompt") + + ;; Enable hideshow minor mode in python for folding and unfolding + (add-hook 'python-mode-hook 'hs-minor-mode)) -(setq python-shell-interpreter "ipython" - python-shell-interpreter-args "-i --simple-prompt" +(use-package elpy + :bind + (:map elpy-mode-map + ("C-c C-j" . elpy-goto-definition) + ("M-," . pop-tag-mark)) + + :config + (setq elpy-rpc-backend "jedi") + (setq elpy-rpc-python-command "python3") + (setq elpy-shell-echo-output nil) - ;; when there are a bunch of ^G^G^G this fixes it - elpy-shell-echo-output nil) + (elpy-enable)) + +(use-package pip-requirements + :config + (add-hook 'pip-requirements-mode-hook #'pip-requirements-auto-complete-setup)) + +(use-package py-autopep8) (provide 'module-python) diff --git a/dots/.emacs.d/modules/module-rust.el b/dots/.emacs.d/modules/module-rust.el @@ -21,51 +21,52 @@ ;;; Code: -(use-package rust-mode - :bind (:map rust-mode-map - ("C-c C-c" . compile) - ("C-c <tab>" . rust-format-buffer)) - :config - (progn (setq rust-format-on-save t) - - (defun rust-prog-init () - "if cargo is install get all depencies for emacs rust packages" - (interactive) - (if (not (eq (executable-find "cargo") nil)) - (progn - (mapcar (lambda (pkg) - (let ((cmd (concat "cargo install " pkg))) - (call-process-shell-command cmd nil "*cargo-output*" t))) - '("racer"))) - (message "cargo executable not found"))) - - (defun setup-rust-mode-compile () - "Customize compile command to run go build" - (if (not (string-match "cargo" compile-command)) - (set (make-local-variable 'compile-command) - "cargo build"))) +(defun mjf/rust-prog-init () + "if cargo is install get all depencies for emacs rust packages" + (interactive) + (if (not (eq (executable-find "cargo") nil)) + (progn + (mapcar (lambda (pkg) + (let ((cmd (concat "cargo install " pkg))) + (call-process-shell-command cmd nil "*cargo-output*" t))) + '("racer"))) + (message "cargo executable not found"))) + +(defun mjf/setup-rust-mode-compile () + "Customize compile command to run go build" + (if (not (string-match "cargo" compile-command)) + (set (make-local-variable 'compile-command) + "cargo build"))) - (add-hook 'rust-mode-hook 'setup-rust-mode-compile))) +(use-package rust-mode + :bind + (:map rust-mode-map + ("C-c C-c" . compile) + ("C-c <tab>" . rust-format-buffer)) + :config + (setq rust-format-on-save t) + (add-hook 'rust-mode-hook 'mjf/setup-rust-mode-compile)) -;; depends on racer install with cargo install racer (use-package racer :after (rust-mode) :delight racer-mode - :bind (:map rust-mode-map - ("TAB" . company-indent-or-complete-common) - ("C-c d" . racer-describe)) - :config - (progn (setq racer-cmd "~/.cargo/bin/racer") ;; Rustup binaries PATH - (setq racer-rust-src-path (concat (getenv "HOME") "/prog/rust/src")) ;; Rust source code PATH + :bind + (:map rust-mode-map + ("TAB" . company-indent-or-complete-common) + ("C-c d" . racer-describe)) - (add-hook 'rust-mode-hook #'racer-mode) - (add-hook 'racer-mode-hook #'eldoc-mode) - (add-hook 'racer-mode-hook #'company-mode) + :config + (setq racer-cmd "~/.cargo/bin/racer") ;; Rustup binaries PATH + (setq racer-rust-src-path (concat (getenv "HOME") "/prog/rust/src")) ;; Rust source code PATH + (setq company-tooltip-align-annotations t) - (setq company-tooltip-align-annotations t))) + (add-hook 'rust-mode-hook #'racer-mode) + (add-hook 'racer-mode-hook #'eldoc-mode) + (add-hook 'racer-mode-hook #'company-mode)) (use-package flycheck-rust + :disable :after (flycheck-mode rust-mode) :config (progn (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) diff --git a/dots/.emacs.d/modules/module-undo-tree.el b/dots/.emacs.d/modules/module-undo-tree.el @@ -1,6 +1,8 @@ +(delight 'undo-tree-mode "" "undo-tree") + (use-package undo-tree :disabled - :delight undo-tree-mode + :delight (undo-tree-mode "" "undo-tree") :config (global-undo-tree-mode t)) (provide 'module-undo-tree) diff --git a/dots/.emacs.d/modules/module-vagrant.el b/dots/.emacs.d/modules/module-vagrant.el @@ -1,4 +0,0 @@ -(use-package vagrant) -(use-package vagrant-tramp) - -(provide 'module-vagrant)- \ No newline at end of file diff --git a/dots/.emacs.d/modules/module-yasnippet.el b/dots/.emacs.d/modules/module-yasnippet.el @@ -26,8 +26,8 @@ :delight yas-minor-mode :demand :config - (progn (yas-load-directory "~/.emacs.d/snippets/") - (yas-global-mode 1))) + (yas-load-directory "~/.emacs.d/snippets/") + (yas-global-mode 1)) (provide 'module-yasnippet) diff --git a/dots/.emacs.d/scripts/Center-Window.scpt b/dots/.emacs.d/scripts/Center-Window.scpt Binary files differ. diff --git a/dots/.emacs.d/theme/poet-fork/poet-theme.el b/dots/.emacs.d/theme/poet-fork/poet-theme.el @@ -1,310 +0,0 @@ -;;; poet-theme.el --- A theme for prose. - -;; Copyright 2018-now Kunal Bhalla - -;; Author: Kunal Bhalla <bhalla.kunal@gmail.com> -;; URL: https://github.com/kunalb/poet/ -;; Version: 2.0 - -;;; Commentary: - -;; Emacs has very good support for multiple fonts in a single -;; file. Poet uses this support to make it much more convenient to -;; write prose within Emacs, with particular attention paid to -;; org-mode and markdown-mode. Code blocks, tables, etc are -;; formatted in monospace text with the appropriate backgrounds. - -;; Recommended customizations for using this theme -;; -;; - Set up the base fonts you'd like to use in Emacs before loading Poet -;; (set-face-attribute 'default nil :family "Iosevka" :height 130) -;; (set-face-attribute 'fixed-pitch nil :family "Iosevka") -;; (set-face-attribute 'variable-pitch nil :family "Baskerville") -;; On loading this theme captures the default and treats that for fixed-pitch -;; rendering. -;; -;; - Enable variable pitch mode for editing text -;; (add-hook 'text-mode-hook -;; (lambda () -;; (variable-pitch-mode 1)) -;; -;; - Some other modes I like to enable/disable -;; (olivetti-mode 1) ;; Centers text in the buffer -;; (flyspell-mode 1) ;; Catch Spelling mistakes -;; (typo-mode 1) ;; Good for symbols like em-dash -;; (blink-cursor-mode 0) ;; Reduce visual noise -;; (linum-mode 0) ;; No line numbers for prose -;; -;; - And prettier org mode bullets: -;; (setq org-bullets-bullet-list -;; '("◉" "○")) -;; (org-bullets 1) - -;;; Code: - -(defvar poet--monospace-height - (face-attribute 'fixed-pitch :height nil 'default) - "The original height stored as a defvar to stay constant across reloads.") - -(defun poet--height (multiplier) - "Scale up the height according to the MULTIPLIER." - (truncate (* poet--monospace-height multiplier))) - -(deftheme poet - "A prose friendly theme.") - -(let ( - ;; Primary Colors - (fg "#444444") - (bg "#e1d9c2") - - (white-light "#ffffff") - (yellow-light "#fff59d") - (red-light "#ff1744") - - (black "gray0") - (white "gray88") - (yellow "#fff176") - (blue "#0288D1") - (green "#388E3C") - (red "#bf360c") - (purple "#673AB7") - (brown "#8D6E63") - - ;; dark colors - (cyan-dark "#455A64") - (blue-dark "#3f51b5") - (red-dark "#8E3C38") - (purple-dark "#6C3082") - (brown-dark "#4e342e") - ) - (let ( - (emph "gray13") - (sep "gray80") - (hlt "gray93") - (bg-hlt "#fff8e1") - (meta brown-dark) - (link "#303f9f") - (link-underline "#304ffe") - (vlink-underline "#1a237e") - (button "gray27") - (cursor "gray29") - (paren-match-bg red-light) - (paren-match-fg white-light) - (search-fg red) - (search-bg white-light) - (search-fail-bg "#f8bbd0") - (tooltip-fg "#111111") - (tooltip-bg yellow) - (shadow "grey60") - (secondary-bg yellow-light) - (trailing-bg "#ff8a65") - (fci "grey87") - (mode-line-fg "grey7") - (mode-line-hlt white-light) - (mode-line-inactive "#888888") - (header red-dark) - (header-line-bg white) - (builtin red-dark) - (string green) - (function-name "#444444") - (keyword "#444444") - (constant blue) - (type "#444444") - (variable cyan-dark) - - ;; org - (org-meta brown) - (org-document-info brown) - (org-table white) - (org-quote-fg purple-dark) - (org-quote-bg white) - (org-date "#444444") - (org-title red) - (org-title-underline "#aaaaaa") - (org-checkbox "#aaaaaa") - (org-scheduled "#333333") - (org-scheduled-today "#111111") - (org-done green) - (org-todo red) - (org-tag "#777777") - (org-block-line "#d0d0d0") - (org-block-bg white) - (org-agenda-structure-fg "#555555") - (org-agenda-structure-bg white) - (org-agenda-today-fg "#000000") - (org-agenda-today-bg "#eeeeee") - (org-special-keyword "#777777") - (org-sched-prev "#222222") - (org-agenda-done "#777777") - - (hl-line "#efefef") - (linum-hlt "#555555") - (linum "#aaaaaa") - (markdown-markup brown) - (markdown-metadata "#777777") - (markdown-language purple) - (markdown-list "#000000") - (markdown-code-bg white) - (markdown-pre-bg white) - (markdown-header-delimiter brown) - (imenu brown-dark)) - (custom-theme-set-faces 'poet - `(variable-pitch ((t (:family ,(face-attribute 'variable-pitch :family) :height ,(poet--height 1.23))))) - - `(default ((t (:background ,bg :foreground ,fg)))) - `(italic ((t (:foreground ,emph :slant italic)))) - `(highlight ((t (:background ,hlt :overline nil)))) - `(region ((t (:background ,bg-hlt)))) - `(fringe ((t (:background ,bg)))) - `(button ((t (:inherit default :foreground ,button)))) - `(escape-glyph ((t (:foreground ,purple)))) - `(link ((t (:underline (:color ,link-underline :style line) :foreground ,link)))) - `(link-visited ((t (:inherit link :foreground ,link :underline (:color ,vlink-underline :style line))))) - `(cursor ((t (:background ,cursor)))) - `(show-paren-match ((t (:background ,paren-match-fg :foreground ,paren-match-bg)))) - `(isearch ((t (:foreground ,search-fg :background ,search-bg)))) - `(isearch-fail ((t (:background ,search-fail-bg)))) - `(query-replace ((t (:inherit isearch)))) - `(tooltip ((t (:inherit default :foreground ,tooltip-fg :background ,tooltip-bg)))) - `(shadow ((t (:foreground ,shadow)))) - `(secondary-selection ((t (:background ,secondary-bg)))) - `(trailing-whitespace ((t (:background ,trailing-bg)))) - `(lazy-highlight ((t (:foreground ,black :background ,white-light)))) - `(next-error ((t (:inherit region)))) - `(window-divider ((t (:background ,sep :foreground ,sep)))) - `(vertical-border ((t (:background ,sep :foreground ,sep)))) - `(minibuffer-prompt ((t (:inherit fixed-pitch :weight bold :foreground ,meta)))) - - ;; mode line - `(header-line ((t (:overline nil :background ,header-line-bg :box (:line-width 3 :color ,header-line-bg) :underline ,sep :inherit mode-line)))) - `(mode-line ((t (:inherit fixed-pitch :foreground ,mode-line-fg :background ,bg :overline ,sep :box (:line-width 8 :color ,bg))))) - `(mode-line-inactive ((t (:inherit mode-line :background ,bg :foreground ,mode-line-inactive :box (:color ,bg :line-width 8))))) - `(mode-line-buffer-id ((t (:weight bold)))) - `(mode-line-emphasis ((t (:weight bold)))) - `(mode-line-highlight ((t (:background ,mode-line-hlt)))) - - `(error ((t (:inherit fixed-pitch)))) - - ;; primary font lock - `(font-lock-comment-face ((t (:foreground ,shadow :inherit fixed-pitch)))) - `(font-lock-builtin-face ((t (:foreground ,builtin :inherit fixed-pitch)))) - `(font-lock-string-face ((t (:inherit fixed-pitch :foreground ,string)))) - `(font-lock-function-name-face ((t (:inherit fixed-pitch :foreground ,function-name)))) - `(font-lock-keyword-face ((t (:inherit fixed-pitch :weight bold :foreground ,keyword)))) - `(font-lock-comment-delimiter-face ((t (:inherit fixed-pitch :inherit font-lock-comment-face)))) - `(font-lock-constant-face ((t (:inherit fixed-pitch)))) - `(font-lock-doc-face ((t (:inherit fixed-pitch :inherit font-lock-string-face)))) - `(font-lock-preprocessor-face ((t (:inherit fixed-pitch :inherit font-lock-builtin-face)))) - `(font-lock-regexp-grouping-backslash ((t (:inherit fixed-pitch :inherit bold)))) - `(font-lock-regexp-grouping-construct ((t (:inherit fixed-pitch :inherit bold)))) - `(font-lock-type-face ((t (:inherit fixed-pitch)))) - `(font-lock-variable-name-face ((t (:inherit fixed-pitch :foreground ,variable)))) - `(font-lock-warning-face ((t (:inherit error)))) - - ;; Org - `(org-level-1 ((t (:inherit default :foreground ,header :height ,(poet--height 1.5))))) - `(org-level-2 ((t (:inherit default :foreground ,header :height ,(poet--height 1.4))))) - `(org-level-3 ((t (:inherit default :foreground ,header :height ,(poet--height 1.3))))) - `(org-level-4 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) - `(org-level-5 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) - `(org-level-6 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) - `(org-level-7 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) - `(org-level-8 ((t (:inherit default :foreground ,header :height ,(poet--height 1.23))))) - `(org-meta-line ((t (:inherit fixed-pitch :foreground ,org-meta)))) - `(org-document-info-keyword ((t (:inherit fixed-pitch :foreground ,org-document-info)))) - `(org-document-info ((t (:inherit default :foreground ,org-document-info)))) - `(org-verbatim ((t (:inherit fixed-pitch)))) - `(org-table ((t (:inherit fixed-pitch :background ,org-table)))) - `(org-formula ((t (:inherit org-table :height ,(poet--height 1))))) - `(org-quote ((t (:inherit default :foreground ,org-quote-fg :background ,org-quote-bg)))) - `(org-hide ((t (:inherit fixed-pitch :foreground ,bg)))) - `(org-indent ((t (:inherit org-hide)))) - `(org-date ((t (:inherit fixed-pitch :foreground ,org-date :underline nil)))) - `(org-document-title ((t (:inherit default :foreground ,org-title :height ,(poet--height 1.8) :underline (:color ,org-title-underline))))) - `(org-checkbox ((t (:inherit fixed-pitch :weight bold :foreground ,org-checkbox)))) - `(org-scheduled ((t (:foreground ,org-scheduled)))) - `(org-scheduled-today ((t (:foreground ,org-scheduled-today)))) - `(org-done ((t (:inherit fixed-pitch :foreground ,org-done)))) - `(org-todo ((t (:inherit fixed-pitch :foreground ,org-todo)))) - `(org-tag ((t (:inherit fixed-pitch :height ,(poet--height 1) :foreground ,org-tag)))) - `(org-block-begin-line ((t (:inherit fixed-pitch :background ,org-block-line)))) - `(org-block-end-line ((t (:inherit fixed-pitch :background ,org-block-line)))) - `(org-block ((t (:background ,org-block-bg :inherit fixed-pitch)))) - `(org-priority ((t (:inherit fixed-pitch :weight normal)))) - `(org-agenda-structure ((t (:foreground ,org-agenda-structure-fg :background ,org-agenda-structure-bg :overline ,org-agenda-structure-bg :underline ,org-agenda-structure-bg)))) - `(org-agenda-date-weekend ((t (:inherit org-agenda-structure)))) - `(org-agenda-date-today ((t (:foreground ,org-agenda-today-fg :overline ,org-agenda-today-bg :background ,org-agenda-today-bg :underline ,org-agenda-today-bg)))) - `(org-special-keyword ((t (:inherit fixed-pitch :foreground ,org-special-keyword)))) - `(org-scheduled-previously ((t (:foreground ,org-sched-prev)))) - `(org-agenda-done ((t (:foreground ,org-agenda-done)))) - `(org-footnote ((t (:foreground ,link)))) - `(hl-line ((t (:background ,hl-line)))) - - ;; line numbers - `(line-number ((t (:inherit fixed-pitch :foreground ,linum)))) - `(line-number-current-line ((t (:inherit fixed-pitch :foreground ,linum-hlt)))) - - ;; markdown - `(markdown-header-face-1 ((t (:foreground ,header :inherit default :height ,(poet--height 1.5))))) - `(markdown-header-face-2 ((t (:foreground ,header :inherit default :height ,(poet--height 1.4))))) - `(markdown-header-face-3 ((t (:foreground ,header :inherit default :height ,(poet--height 1.3))))) - `(markdown-header-face-4 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) - `(markdown-header-face-5 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) - `(markdown-header-face-6 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) - `(markdown-header-face-7 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) - `(markdown-header-face-8 ((t (:foreground ,header :inherit default :height ,(poet--height 1.23))))) - `(markdown-markup-face ((t (:inherit fixed-pitch :foreground ,markdown-markup)))) - `(markdown-inline-code-face ((t (:inherit fixed-pitch)))) - `(markdown-metadata-key-face ((t (:inherit fixed-pitch :height ,(poet--height 1) :foreground ,markdown-metadata)))) - `(markdown-metadata-value-face ((t (:inherit fixed-pitch :height ,(poet--height 1) :foreground ,fg)))) - `(markdown-language-keyword-face ((t (:foreground ,markdown-language)))) - `(markdown-list-face ((t (:inherit fixed-pitch :foreground ,markdown-list)))) - `(markdown-code-face ((t (:inherit fixed-pitch :foreground ,fg :background ,markdown-code-bg)))) - `(markdown-pre-face ((t (:inherit fixed-pitch :color ,fg :background ,markdown-pre-bg)))) - `(markdown-header-delimiter-face ((t (:inherit fixed-pitch :foreground ,markdown-header-delimiter)))) - `(markdown-header-rule-face ((t (:inherit fixed-pitch :foreground ,markdown-header-delimiter)))) - `(markdown-url-face ((t (:inherit fixed-pitch :foreground ,link)))) - - ;; ivy - `(ivy-current-match ((t (:inherit fixed-pitch :background ,hlt)))) - `(ivy-minibuffer-match-face-1 ((t (:inherit fixed-pitch :foreground ,cyan-dark)))) - `(ivy-minibuffer-match-face-2 ((t (:inherit fixed-pitch :foreground ,red-dark)))) - `(ivy-minibuffer-match-face-3 ((t (:inherit fixed-pitch :foreground ,blue-dark)))) - `(ivy-minibuffer-match-face-4 ((t (:inherit fixed-pitch :foreground ,brown-dark)))) - - ;; imenu - `(imenu-list-entry-face-0 ((t (:foreground ,imenu)))) - `(imenu-list-entry-face-1 ((t (:foreground ,imenu)))) - `(imenu-list-entry-face-2 ((t (:foreground ,imenu)))) - `(imenu-list-entry-face-3 ((t (:foreground ,imenu)))) - `(imenu-list-entry-face-4 ((t (:foreground ,imenu)))) - `(imenu-list-entry-face-5 ((t (:foreground ,imenu)))) - - ;; tldr - `(tldr-title ((t (:foreground ,red :weight bold :height 1.9)))) - `(tldr-description ((t (:foreground ,green)))) - `(tldr-code-block ((t ()))) - `(tldr-command-argument ((t ()))) - - ;; evil - `(evil-ex-substitute-replacement ((t (:foreground ,white-light :background ,brown-dark :underline nil)))) - `(evil-goggles-delete-face ((t (:inherit 'lazy-highlight)))) - `(evil-goggles-paste-face ((t (:inherit 'lazy-highlight)))) - `(evil-goggles-yank-face ((t (:inherit 'lazy-highlight)))) - - `(helm-source-header ((t (:height ,(poet--height 1)))))) - - (custom-theme-set-variables 'poet - '(line-spacing 0.4) - `(fci-rule-color ,fci)))) - -;;;###autoload -(when (and (boundp 'custom-theme-load-path) - load-file-name) - (add-to-list 'custom-theme-load-path - (file-name-as-directory - (file-name-directory load-file-name)))) - -(provide-theme 'poet) -;;; poet-theme.el ends here