From 692b44d648472fdf52048f6040d223ea7befe755 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Thu, 25 Apr 2024 17:05:06 -0500 Subject: removed unnecessary hardcoded paths & fixed a typo - defined constants for all commonly used paths - replaced hardcoded instances throughout the config with the variables - fixed typo in scripts/reset-to-first-launch.sj --- modules/user-constants.el | 50 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 34 insertions(+), 16 deletions(-) (limited to 'modules/user-constants.el') diff --git a/modules/user-constants.el b/modules/user-constants.el index 6ed74d37..97cba1f4 100644 --- a/modules/user-constants.el +++ b/modules/user-constants.el @@ -10,55 +10,73 @@ ;; ------------------------ Directory And File Constants ----------------------- ;; DIRECTORIES -(defconst user-home-dir (getenv "HOME") - "The user's home directory per the environment variable.") - (defconst emacs-init-file (concat user-emacs-directory "init.el") "The location of Emacs's main init file.") (defconst emacs-early-init-file (concat user-emacs-directory "early-init.el") "The location of Emacs's early init file.") -(defconst code-dir (concat user-home-dir "/code/") +(defconst user-home-dir (getenv "HOME") + "The user's home directory per the environment variable.") + +(defconst books-dir (concat user-home-dir "/sync/books/") + "The location of org-roam files.") + +(defconst code-dir (concat user-home-dir "/code/") "Code repositories are located in this directory.") -(defconst projects-dir (concat user-home-dir "/projects/") +(defconst dl-dir (concat user-home-dir "/downloads/") + "Location of the general downloads directory.") + +(defconst pix-dir (concat user-home-dir "/pictures/") + "Location of where pictures and images are stored.") + +(defconst projects-dir (concat user-home-dir "/projects/") "Non-code projects and repositories are located in this directory.") -(defconst sync-dir (concat user-home-dir "/sync/org/") +(defconst videos-dir (concat user-home-dir "/videos/") + "Location of where videos are stored.") + +(defconst mail-dir (concat user-home-dir ".mail/") + "Root directory where the mail folders are located.") + +(defconst sync-dir (concat user-home-dir "/sync/org/") "This directory is synchronized across machines.") -(defconst roam-dir (concat sync-dir "roam/") +(defconst roam-dir (concat sync-dir "roam/") "The location of org-roam files.") -(defconst drill-dir (concat sync-dir "drill/") +(defconst drill-dir (concat sync-dir "drill/") "The location of org-drill org files.") -(defconst snippets-dir (concat sync-dir "snippets/") +(defconst snippets-dir (concat sync-dir "snippets/") "The location of ya-snippet snippets.") ;; FILES -(defvar schedule-file (concat sync-dir "schedule.org") +(defvar schedule-file (concat sync-dir "schedule.org") "The location of the org file containing scheduled events.") -(defvar inbox-file (concat roam-dir "inbox.org") +(defvar inbox-file (concat roam-dir "inbox.org") "The location of the org file that serves as the task inbox.") -(defvar contacts-file (concat sync-dir "contacts.org") +(defvar contacts-file (concat sync-dir "contacts.org") "The location of the org file containing org-contacts information.") -(defvar article-file (concat sync-dir "article-inbox.org") +(defvar article-file (concat sync-dir "article-inbox.org") "The location of the org file containing new clipped pages to review.") -(defvar article-archive (concat sync-dir "article-archive.org") +(defvar article-archive (concat sync-dir "article-archive.org") "The location of the org file that stores saved articples to keep.") ; -(defvar ledger-file (concat sync-dir "main.ledger") +(defvar ledger-file (concat sync-dir "main.ledger") "The location of the user's ledger file.") -(defvar macros-file (concat sync-dir "macros.el") +(defvar macros-file (concat sync-dir "macros.el") "The location of the macros file for recorded saved macros via M-f3.") +(defvar authinfo-file (concat user-home-dir "/.authinfo.gpg") + "The location of the encrypted .authinfo or .netrc file.") + ;; ------------------------- Verify Or Create Functions ------------------------ (defun cj/verify-or-create-dir (dir) -- cgit v1.2.3