diff --git "a/\n" "b/\n" new file mode 100644 index 0000000..cf9b647 --- /dev/null +++ "b/\n" @@ -0,0 +1,296 @@ +;;; $DOOMDIR/config.el -*- lexical-binding: t; -*- + +;; Place your private configuration here! Remember, you do not need to run 'doom +;; sync' after modifying this file! + + +;; Some functionality uses this to identify you, e.g. GPG configuration, email +;; clients, file templates and snippets. +(setq user-full-name "Francis Kore" + user-mail-address "me@korefrancis.com") + +;; Doom exposes five (optional) variables for controlling fonts in Doom. Here +;; are the three important ones: +;; +;; + `doom-font' +;; + `doom-variable-pitch-font' +;; + `doom-big-font' -- used for `doom-big-font-mode'; use this for +;; presentations or streaming. +;; +;; They all accept either a font-spec, font string ("Input Mono-12"), or xlfd +;; font string. You generally only need these two: +;; (setq doom-font (font-spec :family "monospace" :size 12 :weight 'semi-light) +;; doom-variable-pitch-font (font-spec :family "sans" :size 13)) + +;; There are two ways to load a theme. Both assume the theme is installed and +;; available. You can either set `doom-theme' or manually load a theme with the +;; `load-theme' function. This is the default: +(setq doom-theme 'doom-one) + +;; If you use `org' and don't want your org files in the default location below, +;; change `org-directory'. It must be set before org loads! +(setq org-directory "~/org/") +(setq deft-directory "~/org/deft") +(setq org-superstar-headline-bullets-list '("⁖" "◉" "○" "✸" "✿")) + +;; This determines the style of line numbers in effect. If set to `nil', line +;; numbers are disabled. For relative line numbers, set this to `relative'. +(setq display-line-numbers-type t) + + +;; Here are some additional functions/macros that could help you configure Doom: +;; +;; - `load!' for loading external *.el files relative to this one +;; - `use-package!' for configuring packages +;; - `after!' for running code after a package has loaded +;; - `add-load-path!' for adding directories to the `load-path', relative to +;; this file. Emacs searches the `load-path' when you load packages with +;; `require' or `use-package'. +;; - `map!' for binding new keys +;; +;; To get information about any of these functions/macros, move the cursor over +;; the highlighted symbol at press 'K' (non-evil users must press 'C-c c k'). +;; This will open documentation for it, including demos of how they are used. +;; +;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how +;; they are implemented. + +;; this controls the color of bold, italic, underline, verbatim, strikethrough +(setq org-emphasis-alist + '(("*" (bold :slant italic :weight black )) ;; this make bold both italic and bold, but not color change + ("/" (italic :foreground "dark salmon" )) ;; italic text, the text will be "dark salmon" + ("_" underline :foreground "cyan" ) ;; underlined text, color is "cyan" + ("=" (:background "snow1" :foreground "deep slate blue" )) ;; background of text is "snow1" and text is "deep slate blue" + ("~" (:background "PaleGreen1" :foreground "dim gray" )) + ("+" (:strike-through nil :foreground "dark orange" )))) + +(setq org-hide-emphasis-markers t) ;; hides the emphasis markers + +;; org-roam-server + (setq org-roam-server-host "127.0.0.1" + org-roam-server-port 8080 + org-roam-server-authenticate nil + org-roam-server-export-inline-images t + org-roam-server-serve-files nil + org-roam-server-served-file-extensions '("pdf" "mp4" "ogv") + org-roam-server-network-poll t + org-roam-server-network-arrows nil + org-roam-server-network-label-truncate t + org-roam-server-network-label-truncate-length 60 + org-roam-server-network-label-wrap-length 20) + +(setq ispell-program-name "aspell") +(setq ispell-extra-args '("--sug-mode=ultra" "--lang=en_US")) +(setq spell-fu-directory "~/.config/+STORE/dictionary") ;; Please create this directory manually. +(setq ispell-personal-dictionary "~/.config/+STORE/dictionary/.pws") + +(setq writeroom-fullscreen-effect t) +(setq org-fancy-priorities-list '((?A . "❗") + (?B . "⬆") + (?C . "⬇") + (?D . "☕") + (?1 . "⚡") + (?2 . "⮬") + (?3 . "⮮") + (?4 . "☕") + (?I . "Important"))) + + +(setq +zen-text-scale 0.6) + +(after! writeroom-mode + (add-hook 'writeroom-mode-hook + (defun +zen-cleaner-org () + (when (and (eq major-mode 'org-mode) writeroom-mode) + (setq-local -display-line-numbers display-line-numbers + display-line-numbers nil) + (setq-local -org-indent-mode org-indent-mode) + (org-indent-mode -1) + (when (featurep 'org-superstar) + (setq-local -org-superstar-headline-bullets-list org-superstar-headline-bullets-list + ;; org-superstar-headline-bullets-list '("🙐" "🙑" "🙒" "🙓" "🙔" "🙕" "🙖" "🙗") + org-superstar-headline-bullets-list '("🙘" "🙙" "🙚" "🙛") + -org-superstar-remove-leading-stars org-superstar-remove-leading-stars + org-superstar-remove-leading-stars t) + (org-superstar-restart))))) + (add-hook 'writeroom-mode-disable-hook + (defun +zen-dirty-org () + (when (eq major-mode 'org-mode) + (setq-local display-line-numbers -display-line-numbers) + (when -org-indent-mode + (org-indent-mode 1)) + (when (featurep 'org-superstar) + (setq-local org-superstar-headline-bullets-list -org-superstar-headline-bullets-list + org-superstar-remove-leading-stars -org-superstar-remove-leading-stars) + (org-superstar-restart)))))) + + +(use-package! nov + :mode ("\\.epub\\'" . nov-mode) + :config + (map! :map nov-mode-map + :n "RET" #'nov-scroll-up) + + (defun doom-modeline-segment--nov-info () + (concat + " " + (propertize + (cdr (assoc 'creator nov-metadata)) + 'face 'doom-modeline-project-parent-dir) + " " + (cdr (assoc 'title nov-metadata)) + " " + (propertize + (format "%d/%d" + (1+ nov-documents-index) + (length nov-documents)) + 'face 'doom-modeline-info))) + + (advice-add 'nov-render-title :override #'ignore) + + (defun +nov-mode-setup () + (face-remap-add-relative 'variable-pitch + :family "Merriweather" + :height 1.4 + :width 'semi-expanded) + (face-remap-add-relative 'default :height 1.3) + (setq-local line-spacing 0.2 + next-screen-context-lines 4 + shr-use-colors nil) + (require 'visual-fill-column nil t) + (setq-local visual-fill-column-center-text t + visual-fill-column-width 80 + nov-text-width 80) + (visual-fill-column-mode 1) + (hl-line-mode -1) + + (add-to-list '+lookup-definition-functions #'+lookup/dictionary-definition) + + (setq-local mode-line-format + `((:eval + (doom-modeline-segment--workspace-name)) + (:eval + (doom-modeline-segment--window-number)) + (:eval + (doom-modeline-segment--nov-info)) + ,(propertize + " %P " + 'face 'doom-modeline-buffer-minor-mode) + ,(propertize + " " + 'face (if (doom-modeline--active) 'mode-line 'mode-line-inactive) + 'display `((space + :align-to + (- (+ right right-fringe right-margin) + ,(* (let ((width (doom-modeline--font-width))) + (or (and (= width 1) 1) + (/ width (frame-char-width) 1.0))) + (string-width + (format-mode-line (cons "" '(:eval (doom-modeline-segment--major-mode)))))))))) + (:eval (doom-modeline-segment--major-mode))))) + + (add-hook 'nov-mode-hook #'+nov-mode-setup)) + + +(after! treemacs + (defvar treemacs-file-ignore-extensions '() + "File extension which `treemacs-ignore-filter' will ensure are ignored") + (defvar treemacs-file-ignore-globs '() + "Globs which will are transformed to `treemacs-file-ignore-regexps' which `treemacs-ignore-filter' will ensure are ignored") + (defvar treemacs-file-ignore-regexps '() + "RegExps to be tested to ignore files, generated from `treeemacs-file-ignore-globs'") + (defun treemacs-file-ignore-generate-regexps () + "Generate `treemacs-file-ignore-regexps' from `treemacs-file-ignore-globs'" + (setq treemacs-file-ignore-regexps (mapcar 'dired-glob-regexp treemacs-file-ignore-globs))) + (if (equal treemacs-file-ignore-globs '()) nil (treemacs-file-ignore-generate-regexps)) + (defun treemacs-ignore-filter (file full-path) + "Ignore files specified by `treemacs-file-ignore-extensions', and `treemacs-file-ignore-regexps'" + (or (member (file-name-extension file) treemacs-file-ignore-extensions) + (let ((ignore-file nil)) + (dolist (regexp treemacs-file-ignore-regexps ignore-file) + (setq ignore-file (or ignore-file (if (string-match-p regexp full-path) t nil))))))) + (add-to-list 'treemacs-ignored-file-predicates #'treemacs-ignore-filter)) + +(setq treemacs-file-ignore-extensions + '(;; LaTeX + "aux" + "ptc" + "fdb_latexmk" + "fls" + "synctex.gz" + "toc" + ;; LaTeX - glossary + "glg" + "glo" + "gls" + "glsdefs" + "ist" + "acn" + "acr" + "alg" + ;; LaTeX - pgfplots + "mw" + ;; LaTeX - pdfx + "pdfa.xmpi" + )) +(setq treemacs-file-ignore-globs + '(;; LaTeX + "*/_minted-*" + ;; AucTeX + "*/.auctex-auto" + "*/_region_.log" + "*/_region_.tex")) + + +(use-package! org-super-agenda + :after org-agenda + :init + (setq org-super-agenda-groups '((:name "Today" + :time-grid t + :scheduled today) + (:name "Due Today" + :deadline today) + (:name "Important" + :priority "❗") + (:name "Overdue" + :deadline past) + (:name "Due Soon" + :deadline future) + (:name "Big Outcomes" + :tag "bo"))) + :config + (org-super-agenda-mode)) +;; Configure Zen mode +;; AAutomatically go to full screen mode when activated + (setq writeroom-fullscreen-effect t) + +(setq + global-whitespace-mode t + whitespace-style '(face tabs tab-mark spaces space-mark trailing lines-tail newline newline-mark) + whitespace-display-mappings '( + (space-mark ?\ [?\u00B7] [?.]) + (space-mark ?\xA0 [?\u00A4] [?_]) + (newline-mark ?\n [?¬ ?\n]) + (tab-mark ?\t [?\u00BB ?\t] [?\\ ?\t]))) + +(global-whitespace-mode +1) + +;; Setup spray for reading +(map! :leader + :desc "Change to spray mode" + "" #'spray-mode) + +(after! (:all org pdf-view)) + +(setq + org-noter-notes-window-location 'other-frame + org-noter-always-create-frame nil + org-noter-hide-other nil + org-noter-notes-search-path (list org-directory)) + + +(use-package! mixed-pitch + :hook (org-mode . mixed-pitch-mode) + :config + (setq mixed-pitch-set-heigth t) + (set-face-attribute 'variable-pitch nil :height 180)) \ No newline at end of file diff --git a/config.el b/config.el index 00ad267..25f79c6 100644 --- a/config.el +++ b/config.el @@ -279,3 +279,18 @@ (map! :leader :desc "Change to spray mode" "" #'spray-mode) + +(after! (:all org pdf-view)) + +(setq + org-noter-notes-window-location 'other-frame + org-noter-always-create-frame nil + org-noter-hide-other nil + org-noter-notes-search-path (list org-directory)) + + +(use-package! mixed-pitch + :hook (org-mode . mixed-pitch-mode) + :config + (setq mixed-pitch-set-heigth t) + (set-face-attribute 'variable-pitch nil :height 180)) diff --git a/init.el b/init.el index 5eba1b4..97deedd 100644 --- a/init.el +++ b/init.el @@ -30,7 +30,7 @@ doom ; what makes DOOM look the way it does doom-dashboard ; a nifty splash screen for Emacs doom-quit ; DOOM quit-message prompts when you quit Emacs - (emoji +unicode) ; 🙂 + ;;(emoji +unicode) ; 🙂 ;;fill-column ; a `fill-column' indicator hl-todo ; highlight TODO/FIXME/NOTE/DEPRECATED/HACK/REVIEW ;;hydra @@ -69,15 +69,15 @@ (dired +ranger +icons) ; making dired pretty [functional] electric ; smarter, keyword-based electric-indent ;;ibuffer ; interactive buffer management - (undo +tree) ; persistent, smarter undo for your inevitable mistakes + undo ; persistent, smarter undo for your inevitable mistakes vc ; version-control and Emacs, sitting in a tree :term - ;eshell ; the elisp shell that works everywhere + ;;eshell ; the elisp shell that works everywhere ;;shell ; simple shell REPL for Emacs ;;term ; basic terminal emulator for Emacs - ;;vterm ; the best terminal emulation in Emacs + vterm ; the best terminal emulation in Emacs :checkers syntax ; tasing you for every semicolon you forget @@ -98,9 +98,9 @@ magit ; a git porcelain for Emacs ;;make ; run make tasks from Emacs ;;pass ; password manager for nerds - pdf ; pdf enhancements + pdf ; pdf enhancements ;;prodigy ; FIXME managing external services & code builders - ;;rgb ; creating color strings + rgb ; creating color strings ;;taskrunner ; taskrunner for all your projects ;;terraform ; infrastructure as code tmux ; an API for interacting with tmux diff --git a/packages.el b/packages.el index b703255..b5b29b2 100644 --- a/packages.el +++ b/packages.el @@ -52,3 +52,4 @@ (package! org-roam-server) (package! org-super-agenda) (package! spray) +(package! mixed-pitch)