From c285815a9fc8c0e14ea0714f8990694270c77c70 Mon Sep 17 00:00:00 2001 From: Jacob McDonnell Date: Wed, 6 Nov 2024 13:55:15 -0500 Subject: iterm2 Colors and Emacs Config --- .emacs.d/init.el | 46 ++++++++++ .emacs.d/themes/naysayer-theme.el | 182 ++++++++++++++++++++++++++++++++++++++ .emacs.d/themes/witness-theme.el | 33 +++++++ 3 files changed, 261 insertions(+) create mode 100644 .emacs.d/init.el create mode 100644 .emacs.d/themes/naysayer-theme.el create mode 100644 .emacs.d/themes/witness-theme.el (limited to '.emacs.d') diff --git a/.emacs.d/init.el b/.emacs.d/init.el new file mode 100644 index 0000000..1bf3490 --- /dev/null +++ b/.emacs.d/init.el @@ -0,0 +1,46 @@ +(add-to-list 'custom-theme-load-path "~/.emacs.d/themes") +(load-theme 'naysayer t) +(custom-set-variables + ;; custom-set-variables was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(display-line-numbers-type 'relative) + '(indent-tabs-mode t) + '(indent-tabs-mode-hook nil) + '(package-selected-packages '(evil)) + '(standard-indent 4) + '(tool-bar-mode nil) + '(tool-bar-style nil)) +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + ) + +;; window +(add-to-list 'default-frame-alist '(ns-transparent-titlebar . t)) +(add-to-list 'default-frame-alist '(ns-appearance . dark)) + +;; Prevent Extraneous Tabs +(setq-default indent-tabs-mode t) + +;; Relative Line Numbers +(display-line-numbers-mode) +(setq display-line-numbers 'relative) + +;; Set up package.el to work with MELPA +(require 'package) +(add-to-list 'package-archives + '("melpa" . "https://melpa.org/packages/")) +(package-initialize) +(package-refresh-contents) + +;; Download Evil +(unless (package-installed-p 'evil) + (package-install 'evil)) + +;; Enable Evil +(require 'evil) +(evil-mode 1) diff --git a/.emacs.d/themes/naysayer-theme.el b/.emacs.d/themes/naysayer-theme.el new file mode 100644 index 0000000..5af5de3 --- /dev/null +++ b/.emacs.d/themes/naysayer-theme.el @@ -0,0 +1,182 @@ +;;; naysayer-theme.el --- The naysayer color theme + +;; Author: Nick Aversano +;; Version: 0.33 +;; Filename: naysayer-theme.el +;; Package-Requires: ((emacs "24")) +;; URL: https://github.com/nickav/naysayer-theme.el +;; License: GPL-3+ + +;;; Commentary: + +;; Dark green blue color scheme with tan colors. Inspired by Jonathan Blow's compiler livestreams. + +;;; Code: + +(unless (>= emacs-major-version 24) + (error "The naysayer theme requires Emacs 24 or later!")) + +(deftheme naysayer "The naysayer color theme") + +;; Monokai colors +(defcustom naysayer-theme-yellow "#E6DB74" "Primary colors - yellow" :type 'string :group 'monokai) +(defcustom naysayer-theme-orange "#FD971F" "Primary colors - orange" :type 'string :group 'monokai) +(defcustom naysayer-theme-red "#F92672" "Primary colors - red" :type 'string :group 'monokai) +(defcustom naysayer-theme-magenta "#FD5FF0" "Primary colors - magenta" :type 'string :group 'monokai) +(defcustom naysayer-theme-blue "#66D9EF" "Primary colors - blue" :type 'string :group 'monokai) +(defcustom naysayer-theme-green "#A6E22E" "Primary colors - green" :type 'string :group 'monokai) +(defcustom naysayer-theme-cyan "#A1EFE4" "Primary colors - cyan" :type 'string :group 'monokai) +(defcustom naysayer-theme-violet "#AE81FF" "Primary colors - violet" :type 'string :group 'monokai) + +(let ((background "#062329") + (gutters "#062329") + (gutter-fg "#062329") + (gutters-active "#062329") + (builtin "#ffffff") + (selection "#0000ff") + (text "#d1b897") + (comments "#44b340") + (punctuation "#8cde94") + (keywords "#ffffff") + (variables "#c1d1e3") + (functions "#ffffff") + (methods "#c1d1e3") + (strings "#2ec09c") + (constants "#7ad0c6") + (macros "#8cde94") + (numbers "#7ad0c6") + (white "#ffffff") + (error "#ff0000") + (warning "#ffaa00") + (highlight-line "#0b3335") + (line-fg "#126367")) + + (custom-theme-set-faces + 'naysayer + + ;; Default colors + ;; ***************************************************************************** + + `(default ((t (:foreground ,text :background ,background, :weight normal)))) + `(region ((t (:foreground nil :background ,selection)))) + `(cursor ((t (:background ,white )))) + `(fringe ((t (:background ,background :foreground ,white)))) + `(linum ((t (:background ,background :foreground ,gutter-fg)))) + `(highlight ((t (:foreground nil :background ,selection)))) + + ;; Font lock faces + ;; ***************************************************************************** + + `(font-lock-keyword-face ((t (:foreground ,keywords)))) + `(font-lock-type-face ((t (:foreground ,punctuation)))) + `(font-lock-constant-face ((t (:foreground ,constants)))) + `(font-lock-variable-name-face ((t (:foreground ,variables)))) + `(font-lock-builtin-face ((t (:foreground ,builtin)))) + `(font-lock-string-face ((t (:foreground ,strings)))) + `(font-lock-comment-face ((t (:foreground ,comments)))) + `(font-lock-comment-delimiter-face ((t (:foreground ,comments)))) + `(font-lock-doc-face ((t (:foreground ,comments)))) + `(font-lock-function-name-face ((t (:foreground ,functions)))) + `(font-lock-doc-string-face ((t (:foreground ,strings)))) + `(font-lock-preprocessor-face ((t (:foreground ,macros)))) + `(font-lock-warning-face ((t (:foreground ,warning)))) + + ;; Plugins + ;; ***************************************************************************** + `(trailing-whitespace ((t (:foreground nil :background ,warning)))) + `(whitespace-trailing ((t (:background nil :foreground ,warning :inverse-video t)))) + + `(linum ((t (:foreground ,line-fg :background ,background)))) + `(linum-relative-current-face ((t (:foreground ,white :background ,background)))) + `(line-number ((t (:foreground ,line-fg :background ,background)))) + `(line-number-current-line ((t (:foreground ,white :background ,background)))) + + ;; hl-line-mode + `(hl-line ((t (:background ,highlight-line)))) + `(hl-line-face ((t (:background ,highlight-line)))) + + ;; rainbow-delimiters + `(rainbow-delimiters-depth-1-face ((t (:foreground ,naysayer-theme-violet)))) + `(rainbow-delimiters-depth-2-face ((t (:foreground ,naysayer-theme-blue)))) + `(rainbow-delimiters-depth-3-face ((t (:foreground ,naysayer-theme-green)))) + `(rainbow-delimiters-depth-4-face ((t (:foreground ,naysayer-theme-yellow)))) + `(rainbow-delimiters-depth-5-face ((t (:foreground ,naysayer-theme-orange)))) + `(rainbow-delimiters-depth-6-face ((t (:foreground ,naysayer-theme-red)))) + `(rainbow-delimiters-depth-7-face ((t (:foreground ,naysayer-theme-violet)))) + `(rainbow-delimiters-depth-8-face ((t (:foreground ,naysayer-theme-blue)))) + `(rainbow-delimiters-depth-9-face ((t (:foreground ,naysayer-theme-green)))) + `(rainbow-delimiters-depth-10-face ((t (:foreground ,naysayer-theme-yellow)))) + `(rainbow-delimiters-depth-11-face ((t (:foreground ,naysayer-theme-orange)))) + `(rainbow-delimiters-depth-12-face ((t (:foreground ,naysayer-theme-red)))) + + ;; which-func + `(which-func ((t (:inverse-video unspecified + :underline unspecified + :foreground ,background + :weight bold + :box nil)))) + + ;; mode-line and powerline + `(mode-line-buffer-id ((t (:foreground ,background :distant-foreground ,text :text ,text :weight bold)))) + `(mode-line ((t (:inverse-video unspecified + :underline unspecified + :foreground ,background + :background ,text + :box nil)))) + `(powerline-active1 ((t (:background ,text :foreground ,background)))) + `(powerline-active2 ((t (:background ,text :foreground ,background)))) + + `(mode-line-inactive ((t (:inverse-video unspecified + :underline unspecified + :foreground ,text + :background ,background + :box nil)))) + `(powerline-inactive1 ((t (:background ,background :foreground ,text)))) + `(powerline-inactive2 ((t (:background ,background :foreground ,text)))) + + ;; better compatibility with default DOOM mode-line + `(error ((t (:foreground nil :weight normal)))) + `(doom-modeline-project-dir ((t (:foreground nil :weight bold)))) + + ;; js2-mode + `(js2-function-call ((t (:inherit (font-lock-function-name-face))))) + `(js2-function-param ((t (:foreground ,text)))) + `(js2-jsdoc-tag ((t (:foreground ,keywords)))) + `(js2-jsdoc-type ((t (:foreground ,constants)))) + `(js2-jsdoc-value((t (:foreground ,text)))) + `(js2-object-property ((t (:foreground ,text)))) + `(js2-external-variable ((t (:foreground ,constants)))) + `(js2-error ((t (:foreground ,error)))) + `(js2-warning ((t (:foreground ,warning)))) + + ;; highlight numbers + `(highlight-numbers-number ((t (:foreground ,numbers)))) + + ;; tab-bar-mode + `(tab-bar ((t (:inherit modeline)))) + `(tab-bar-tab ((t (:foreground ,background :background ,text)))) + `(tab-bar-tab-inactive ((t (:foreground ,text :background ,background)))) + ) + + (custom-theme-set-variables + 'naysayer + '(linum-format " %5i ") + ) +) + +;;;###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 'naysayer) + +;; Local Variables: +;; no-byte-compile: t +;; End: + +(provide 'naysayer-theme) + +;;; naysayer-theme.el ends here diff --git a/.emacs.d/themes/witness-theme.el b/.emacs.d/themes/witness-theme.el new file mode 100644 index 0000000..4ce4c57 --- /dev/null +++ b/.emacs.d/themes/witness-theme.el @@ -0,0 +1,33 @@ +(custom-set-faces + ;; custom-set-faces was added by Custom. + ;; If you edit it by hand, you could mess it up, so be careful. + ;; Your init file should contain only one such instance. + ;; If there is more than one, they won't work right. + '(default ((t (:foreground "#d3b58d" :background "#041818")))) + '(custom-group-tag-face ((t (:underline t :foreground "lightblue"))) t) + '(custom-variable-tag-face ((t (:underline t :foreground "lightblue"))) t) + '(font-lock-builtin-face ((t nil))) + ; '(font-lock-comment-face ((t (:foreground "yellow")))) + '(font-lock-comment-face ((t (:foreground "#3fdflf")))) + '(font-lock-function-name-face ((((class color) (background dark)) (:foreground "white")))) + '(font-lock-keyword-face ((t (:foreground "white" )))) + ; '(font-lock-string-face ((t (:foreground "gray160" :background "gray16")))) + '(font-lock-string-face ((t (:foreground "#0fdfaf")))) + '(font-lock-variable-name-face ((((class color) (background dark)) (:foreground "#c8d4ec")))) +; '(font-lock-warning-face ((t (:foreground "#695a46")))) + '(font-lock-warning-face ((t (:foreground "#504038")))) + '(highlight ((t (:foreground "navyblue" :background "darkseagreen2")))) + '(mode-line ((t (:inverse-video t)))) + '(region ((t (:background "blue")))) + '(widget-field-face ((t (:foreground "white"))) t) + '(widget-single-line-field-face ((t (:background "darkgray"))) t)) + +(global-font-lock-mode 1) +(set-cursor-color "lightgreen") +(set-background-color "#072626") +(global-set-key [C-return] 'save-buffer) + +;(set-face-attribute 'default nil :font "Anonymous Pro-14") +(set-face-attribute 'default nil :font "Consolas-17") + +(set-face-foreground 'font-lock-builtin-face "lightgreen") -- cgit v1.2.3