diff --git a/README.org b/README.org index b3c0491..200ad84 100644 --- a/README.org +++ b/README.org @@ -17,9 +17,14 @@ ** Configuration Variables #+begin_src emacs-lisp :tangle init.el + ;; Font Sizes (defvar sb/default-font-size 110) (defvar sb/default-variable-font-size 110) (defvar sb/modeline-height 10) + + ;; Font Names + (defvar sb/source-code-font "FiraCode Nerd Font") + (defvar sb/document-font "Cantarell") #+end_src * Package System Setup @@ -85,20 +90,21 @@ Turn on the visual bell and add some breathing room. Setup FiraCode and Cantarell fonts with specified size. - #+begin_src emacs-lisp :tangle init.el - (set-face-attribute 'default nil :font "FiraCode Nerd Font" :height sb/default-font-size) + ;; Set the default font + (set-face-attribute 'default nil :font sb/source-code-font :height sb/default-font-size) - ;; Set the fixed pitch face - (set-face-attribute 'fixed-pitch nil :font "FiraCode Nerd Font" :height sb/default-font-size) + ;; Set the fixed pitch font + (set-face-attribute 'fixed-pitch nil :font sb/source-code-font :height sb/default-font-size) - ;; Set the variable pitch face - (set-face-attribute 'variable-pitch nil :font "Cantarell" :height sb/default-font-size :weight 'regular) + ;; Set the variable pitch font + (set-face-attribute 'variable-pitch nil :font sb/document-font :height sb/default-font-size :weight 'regular) #+end_src ** Ligature Support Add ligature support for Fira Code font. + - https://github.com/tonsky/FiraCode/wiki/Emacs-instructions#using-ligatureel #+begin_src emacs-lisp :tangle init.el @@ -143,10 +149,15 @@ Add ligature support for Fira Code font. :global-prefix "C-SPC") (sb/leader-keys + "o" '(:ignore t :which-key "org-mode quick access") + "oa" '(org-agenda :which-key "org agenda") + "oc" '(org-capture :which-key "org capture") ;; "t" '(:ignore t :which-key "toggles") ;; "tc" '(comment-line :which-key "toggle comment") - "s" '(:ignore s :which-key "settings"))) - + "s" '(:ignore s :which-key "settings") + ) + ) + (general-define-key "C-M-j" 'counsel-switch-buffer ) @@ -308,10 +319,10 @@ Use Hydra to design a transient key binding for quickly adjusting the scale of t #+begin_src emacs-lisp :tangle init.el (defun sb/org-font-setup () - ;; Replace list hyphen with dot - (font-lock-add-keywords 'org-mode - '(("^ *\\([-]\\) " - (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) + ;; ;; Replace list hyphen with dot + ;; (font-lock-add-keywords 'org-mode + ;; '(("^ *\\([-]\\) " + ;; (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) ;; Set faces for heading levels (dolist (face '((org-level-1 . 1.2) @@ -334,56 +345,68 @@ Use Hydra to design a transient key binding for quickly adjusting the scale of t (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)) #+end_src -** Basic Config +** Main Config #+begin_src emacs-lisp :tangle init.el (defun sb/org-mode-setup () (org-indent-mode) (variable-pitch-mode 1) - (visual-line-mode 1)) + (auto-fill-mode 0) + (visual-line-mode 1) + (setq evil-auto-indent nil)) (use-package org :hook (org-mode . sb/org-mode-setup) :config + ;; Change elipsis to down arrow (setq org-ellipsis " ▾") + ;; Org Agenda Settings (setq org-agenda-start-with-log-mode t) (setq org-log-done 'time) (setq org-log-into-drawer t) + ;; Org Agenda Files (setq org-agenda-files - '("~/Projects/Code/emacs-from-scratch/OrgFiles/Tasks.org" - "~/Projects/Code/emacs-from-scratch/OrgFiles/Habits.org" - "~/Projects/Code/emacs-from-scratch/OrgFiles/Birthdays.org")) + '( + "~/OrgFiles/Tasks.org" + ;; "~/OrgFiles/Habits.org" + ;; "~/OrgFiles/Birthdays.org" + ) + ) + ;; Org Habit Tracker (require 'org-habit) (add-to-list 'org-modules 'org-habit) (setq org-habit-graph-column 60) + ;; Org TODO Keywords (setq org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)") (sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)" "WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANC(k@)"))) - (setq org-refile-targets - '(("Archive.org" :maxlevel . 1) - ("Tasks.org" :maxlevel . 1))) + ;; ;; Move tasks between documents + ;; (setq org-refile-targets + ;; '(("Archive.org" :maxlevel . 1) + ;; ("Tasks.org" :maxlevel . 1))) - ;; Save Org buffers after refiling! - (advice-add 'org-refile :after 'org-save-all-org-buffers) + ;; ;; Save Org buffers after refiling! + ;; (advice-add 'org-refile :after 'org-save-all-org-buffers) - (setq org-tag-alist - '((:startgroup) - ; Put mutually exclusive tags here - (:endgroup) - ("@errand" . ?E) - ("@home" . ?H) - ("@work" . ?W) - ("agenda" . ?a) - ("planning" . ?p) - ("publish" . ?P) - ("batch" . ?b) - ("note" . ?n) - ("idea" . ?i))) + ;; ;; Org Tags + ;; (setq org-tag-alist + ;; '((:startgroup) + ;; ; Put mutually exclusive tags here + ;; (:endgroup) + ;; ("@errand" . ?E) + ;; ("@home" . ?H) + ;; ("@work" . ?W) + ;; ("agenda" . ?a) + ;; ("planning" . ?p) + ;; ("publish" . ?P) + ;; ("batch" . ?b) + ;; ("note" . ?n) + ;; ("idea" . ?i))) ;; Configure custom agenda views (setq org-agenda-custom-commands @@ -397,13 +420,13 @@ Use Hydra to design a transient key binding for quickly adjusting the scale of t ((todo "NEXT" ((org-agenda-overriding-header "Next Tasks"))))) - ("W" "Work Tasks" tags-todo "+work-email") + ;; ("W" "Work Tasks" tags-todo "+work-email") - ;; Low-effort next actions - ("e" tags-todo "+TODO=\"NEXT\"+Effort<15&+Effort>0" - ((org-agenda-overriding-header "Low Effort Tasks") - (org-agenda-max-todos 20) - (org-agenda-files org-agenda-files))) + ;; ;; Low-effort next actions + ;; ("e" tags-todo "+TODO=\"NEXT\"+Effort<15&+Effort>0" + ;; ((org-agenda-overriding-header "Low Effort Tasks") + ;; (org-agenda-max-todos 20) + ;; (org-agenda-files org-agenda-files))) ("w" "Workflow Status" ((todo "WAIT" @@ -433,39 +456,43 @@ Use Hydra to design a transient key binding for quickly adjusting the scale of t ((org-agenda-overriding-header "Cancelled Projects") (org-agenda-files org-agenda-files))))))) + ;; Org Capture Templates (setq org-capture-templates `(("t" "Tasks / Projects") - ("tt" "Task" entry (file+olp "~/Projects/Code/emacs-from-scratch/OrgFiles/Tasks.org" "Inbox") + ("tt" "Task" entry (file+olp "~/OrgFiles/Tasks.org" "Inbox") "* TODO %?\n %U\n %a\n %i" :empty-lines 1) ("j" "Journal Entries") ("jj" "Journal" entry - (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") + (file+olp+datetree "~/OrgFiles/Journal.org") "\n* %<%I:%M %p> - Journal :journal:\n\n%?\n\n" ;; ,(dw/read-file-as-string "~/Notes/Templates/Daily.org") :clock-in :clock-resume :empty-lines 1) ("jm" "Meeting" entry - (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") + (file+olp+datetree "~/OrgFiles/Journal.org") "* %<%I:%M %p> - %a :meetings:\n\n%?\n\n" :clock-in :clock-resume :empty-lines 1) - ("w" "Workflows") - ("we" "Checking Email" entry (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") - "* Checking Email :email:\n\n%?" :clock-in :clock-resume :empty-lines 1) + ;; ("w" "Workflows") + ;; ("we" "Checking Email" entry (file+olp+datetree "~/OrgFiles/Journal.org") + ;; "* Checking Email :email:\n\n%?" :clock-in :clock-resume :empty-lines 1) - ("m" "Metrics Capture") - ("mw" "Weight" table-line (file+headline "~/Projects/Code/emacs-from-scratch/OrgFiles/Metrics.org" "Weight") - "| %U | %^{Weight} | %^{Notes} |" :kill-buffer t))) + ;; ("m" "Metrics Capture") + ;; ("mw" "Weight" table-line (file+headline "~/OrgFiles/Metrics.org" "Weight") + ;; "| %U | %^{Weight} | %^{Notes} |" :kill-buffer t) + ) + ) - (define-key global-map (kbd "C-c j") - (lambda () (interactive) (org-capture nil "jj"))) + ;; ;; Keybinding for going directly to journal entry + ;; (define-key global-map (kbd "C-c j") + ;; (lambda () (interactive) (org-capture nil "jj"))) (sb/org-font-setup)) #+end_src -*** Nicer Heading Bullets +** Heading Bullets #+begin_src emacs-lisp :tangle init.el (use-package org-bullets @@ -475,7 +502,7 @@ Use Hydra to design a transient key binding for quickly adjusting the scale of t (org-bullets-bullet-list '("◉" "○" "●" "○" "●" "○" "●"))) #+end_src -*** Center Org Buffers +** Center Org Buffers *NOT IN USE* #+begin_src emacs-lisp :tangle no @@ -509,6 +536,7 @@ Use Hydra to design a transient key binding for quickly adjusting the scale of t (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) (add-to-list 'org-structure-template-alist '("py" . "src python")) (add-to-list 'org-structure-template-alist '("hs" . "src haskell")) + (add-to-list 'org-structure-template-alist '("cf" . "src config")) #+end_src ** Auto-Tangle diff --git a/init.el b/init.el index 5afd719..a19dc77 100644 --- a/init.el +++ b/init.el @@ -1,7 +1,12 @@ +;; Font Sizes (defvar sb/default-font-size 110) (defvar sb/default-variable-font-size 110) (defvar sb/modeline-height 10) +;; Font Names +(defvar sb/source-code-font "FiraCode Nerd Font") +(defvar sb/document-font "Cantarell") + ;; Initialize package sources (require 'package) @@ -42,13 +47,14 @@ eshell-mode-hook)) (add-hook mode (lambda () (display-line-numbers-mode 0)))) -(set-face-attribute 'default nil :font "FiraCode Nerd Font" :height sb/default-font-size) +;; Set the default font +(set-face-attribute 'default nil :font sb/source-code-font :height sb/default-font-size) -;; Set the fixed pitch face -(set-face-attribute 'fixed-pitch nil :font "FiraCode Nerd Font" :height sb/default-font-size) +;; Set the fixed pitch font +(set-face-attribute 'fixed-pitch nil :font sb/source-code-font :height sb/default-font-size) -;; Set the variable pitch face -(set-face-attribute 'variable-pitch nil :font "Cantarell" :height sb/default-font-size :weight 'regular) +;; Set the variable pitch font +(set-face-attribute 'variable-pitch nil :font sb/document-font :height sb/default-font-size :weight 'regular) (use-package ligature :load-path "./packages/ligature.el" @@ -85,9 +91,14 @@ :global-prefix "C-SPC") (sb/leader-keys + "o" '(:ignore t :which-key "org-mode quick access") + "oa" '(org-agenda :which-key "org agenda") + "oc" '(org-capture :which-key "org capture") ;; "t" '(:ignore t :which-key "toggles") ;; "tc" '(comment-line :which-key "toggle comment") - "s" '(:ignore s :which-key "settings"))) + "s" '(:ignore s :which-key "settings") + ) +) (general-define-key "C-M-j" 'counsel-switch-buffer @@ -207,10 +218,10 @@ "ss" '(hydra-text-scale/body :which-key "scale text")) (defun sb/org-font-setup () - ;; Replace list hyphen with dot - (font-lock-add-keywords 'org-mode - '(("^ *\\([-]\\) " - (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) + ;; ;; Replace list hyphen with dot + ;; (font-lock-add-keywords 'org-mode + ;; '(("^ *\\([-]\\) " + ;; (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•")))))) ;; Set faces for heading levels (dolist (face '((org-level-1 . 1.2) @@ -235,50 +246,62 @@ (defun sb/org-mode-setup () (org-indent-mode) (variable-pitch-mode 1) - (visual-line-mode 1)) + (auto-fill-mode 0) + (visual-line-mode 1) + (setq evil-auto-indent nil)) (use-package org :hook (org-mode . sb/org-mode-setup) :config + ;; Change elipsis to down arrow (setq org-ellipsis " ▾") + ;; Org Agenda Settings (setq org-agenda-start-with-log-mode t) (setq org-log-done 'time) (setq org-log-into-drawer t) + ;; Org Agenda Files (setq org-agenda-files - '("~/Projects/Code/emacs-from-scratch/OrgFiles/Tasks.org" - "~/Projects/Code/emacs-from-scratch/OrgFiles/Habits.org" - "~/Projects/Code/emacs-from-scratch/OrgFiles/Birthdays.org")) + '( + "~/OrgFiles/Tasks.org" + ;; "~/OrgFiles/Habits.org" + ;; "~/OrgFiles/Birthdays.org" + ) + ) + ;; Org Habit Tracker (require 'org-habit) (add-to-list 'org-modules 'org-habit) (setq org-habit-graph-column 60) + ;; Org TODO Keywords (setq org-todo-keywords '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)") (sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)" "WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANC(k@)"))) - (setq org-refile-targets - '(("Archive.org" :maxlevel . 1) - ("Tasks.org" :maxlevel . 1))) + ;; ;; Move tasks between documents + ;; (setq org-refile-targets + ;; '(("Archive.org" :maxlevel . 1) + ;; ("Tasks.org" :maxlevel . 1))) - ;; Save Org buffers after refiling! - (advice-add 'org-refile :after 'org-save-all-org-buffers) + ;; ;; Save Org buffers after refiling! + ;; (advice-add 'org-refile :after 'org-save-all-org-buffers) - (setq org-tag-alist - '((:startgroup) - ; Put mutually exclusive tags here - (:endgroup) - ("@errand" . ?E) - ("@home" . ?H) - ("@work" . ?W) - ("agenda" . ?a) - ("planning" . ?p) - ("publish" . ?P) - ("batch" . ?b) - ("note" . ?n) - ("idea" . ?i))) + ;; ;; Org Tags + ;; (setq org-tag-alist + ;; '((:startgroup) + ;; ; Put mutually exclusive tags here + ;; (:endgroup) + ;; ("@errand" . ?E) + ;; ("@home" . ?H) + ;; ("@work" . ?W) + ;; ("agenda" . ?a) + ;; ("planning" . ?p) + ;; ("publish" . ?P) + ;; ("batch" . ?b) + ;; ("note" . ?n) + ;; ("idea" . ?i))) ;; Configure custom agenda views (setq org-agenda-custom-commands @@ -292,13 +315,13 @@ ((todo "NEXT" ((org-agenda-overriding-header "Next Tasks"))))) - ("W" "Work Tasks" tags-todo "+work-email") + ;; ("W" "Work Tasks" tags-todo "+work-email") - ;; Low-effort next actions - ("e" tags-todo "+TODO=\"NEXT\"+Effort<15&+Effort>0" - ((org-agenda-overriding-header "Low Effort Tasks") - (org-agenda-max-todos 20) - (org-agenda-files org-agenda-files))) + ;; ;; Low-effort next actions + ;; ("e" tags-todo "+TODO=\"NEXT\"+Effort<15&+Effort>0" + ;; ((org-agenda-overriding-header "Low Effort Tasks") + ;; (org-agenda-max-todos 20) + ;; (org-agenda-files org-agenda-files))) ("w" "Workflow Status" ((todo "WAIT" @@ -328,34 +351,38 @@ ((org-agenda-overriding-header "Cancelled Projects") (org-agenda-files org-agenda-files))))))) + ;; Org Capture Templates (setq org-capture-templates `(("t" "Tasks / Projects") - ("tt" "Task" entry (file+olp "~/Projects/Code/emacs-from-scratch/OrgFiles/Tasks.org" "Inbox") + ("tt" "Task" entry (file+olp "~/OrgFiles/Tasks.org" "Inbox") "* TODO %?\n %U\n %a\n %i" :empty-lines 1) ("j" "Journal Entries") ("jj" "Journal" entry - (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") + (file+olp+datetree "~/OrgFiles/Journal.org") "\n* %<%I:%M %p> - Journal :journal:\n\n%?\n\n" ;; ,(dw/read-file-as-string "~/Notes/Templates/Daily.org") :clock-in :clock-resume :empty-lines 1) ("jm" "Meeting" entry - (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") + (file+olp+datetree "~/OrgFiles/Journal.org") "* %<%I:%M %p> - %a :meetings:\n\n%?\n\n" :clock-in :clock-resume :empty-lines 1) - ("w" "Workflows") - ("we" "Checking Email" entry (file+olp+datetree "~/Projects/Code/emacs-from-scratch/OrgFiles/Journal.org") - "* Checking Email :email:\n\n%?" :clock-in :clock-resume :empty-lines 1) + ;; ("w" "Workflows") + ;; ("we" "Checking Email" entry (file+olp+datetree "~/OrgFiles/Journal.org") + ;; "* Checking Email :email:\n\n%?" :clock-in :clock-resume :empty-lines 1) - ("m" "Metrics Capture") - ("mw" "Weight" table-line (file+headline "~/Projects/Code/emacs-from-scratch/OrgFiles/Metrics.org" "Weight") - "| %U | %^{Weight} | %^{Notes} |" :kill-buffer t))) + ;; ("m" "Metrics Capture") + ;; ("mw" "Weight" table-line (file+headline "~/OrgFiles/Metrics.org" "Weight") + ;; "| %U | %^{Weight} | %^{Notes} |" :kill-buffer t) + ) + ) - (define-key global-map (kbd "C-c j") - (lambda () (interactive) (org-capture nil "jj"))) + ;; ;; Keybinding for going directly to journal entry + ;; (define-key global-map (kbd "C-c j") + ;; (lambda () (interactive) (org-capture nil "jj"))) (sb/org-font-setup)) @@ -379,6 +406,7 @@ (add-to-list 'org-structure-template-alist '("el" . "src emacs-lisp")) (add-to-list 'org-structure-template-alist '("py" . "src python")) (add-to-list 'org-structure-template-alist '("hs" . "src haskell")) +(add-to-list 'org-structure-template-alist '("cf" . "src config")) (use-package org-auto-tangle :defer t