I showed you my source code, pls respond
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
3.9 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. ;; Options
  2. ;; Here's a complete list of all of the options configurable for each host, and their default values.
  3. ;; + All variables prefixed with ~dotfiles/~
  4. ;; + Initialized prior to loading of packages or hosts
  5. (defvar dotfiles/home user-emacs-directory
  6. "Original value of `user-emacs-directory'.")
  7. (defvar dotfiles/cache (expand-file-name "~/.cache/emacs")
  8. "Redirection target of `user-emacs-directory'.")
  9. (defvar dotfiles/browser (getenv "BROWSER")
  10. "Default system web browser.")
  11. (defvar dotfiles/language (getenv "LANG")
  12. "Default system dictionary language.")
  13. (defconst dotfiles/modules-p
  14. '(core editor email encryption desktop
  15. writing website capture projects
  16. development interface dashboard)
  17. "All of the available modules.")
  18. (defvar dotfiles/modules dotfiles/modules-p
  19. "All of the enabled modules.")
  20. (defvar dotfiles/font "Fira Code"
  21. "Unified system font family.")
  22. (defvar dotfiles/font-size 96
  23. "Unified system font size.")
  24. (defvar dotfiles/idle 0.0
  25. "Delay time before offering suggestions and completions.")
  26. (defvar dotfiles/leader-key "SPC"
  27. "All powerful leader key.")
  28. (defvar dotfiles/leader-key-global
  29. (concat "C-" dotfiles/leader-key)
  30. "Global prefix for the leader key.")
  31. (defvar dotfiles/projects
  32. (expand-file-name "~/.local/source/")
  33. "Location of source code projects.")
  34. (defvar dotfiles/passwords
  35. (expand-file-name "~/.password-store/")
  36. "Location of local password store.")
  37. (defvar dotfiles/public-key
  38. "37AB1CB72B741E478CA026D43025DCBD46F81C0F"
  39. "GPG key to encrypt org files for.")
  40. ;; Startup
  41. ;; This project makes heavy use of modern features and libraries. Since *Babel's* [fn:3] used in initialization, *Org* [fn:4] must load prior to importing any of custom modules. This introduces a unique *chicken or the egg* [fn:5] problem. My solution included some initialization code in *Emacs Lisp* [fn:2] called before using any *Babel* [fn:3] APIs.
  42. (load-file "~/.emacs.d/bin/cleanup.el")
  43. (load-file "~/.emacs.d/bin/packages.el")
  44. ;; Hosts
  45. ;; Each host machines configuration loaded immediately after declaring the options, before applying any configuration. This allows system to system control while remaining immutable. Override any of the available options configurations in a host file. Here's some examples to get started:
  46. ;; + [[file:hosts/localhost.org][Termux]]
  47. ;; + [[file:hosts/gamingpc.org][Gamingpc]]
  48. ;; + [[file:hosts/raspberry.org][Raspberry]]
  49. ;; + [[file:hosts/acernitro.org][Acernitro]]
  50. ;; + [[file:hosts/virtualbox.org][Virtualbox]]
  51. ;; Begin the process by loading any host specific overrides. The host configuration tangles, and loads (if it exist) using the systems name.
  52. (let ((host-file (concat dotfiles/home "/hosts/" system-name ".org")))
  53. (when (file-exists-p host-file)
  54. (org-babel-load-file host-file)))
  55. ;; Modules
  56. ;; Breaking down the project into logical units or chapters to keep the code more maintainable and organized. This is also a fundamental requirement to achieve the goal of modularity. Here are all of the available modules, also listed in the variable ~dotfiles/modules-p~.
  57. ;; + [[file:modules/core.org][Core]]
  58. ;; + [[file:modules/editor.org][Editor]]
  59. ;; + [[file:modules/email.org][Email]]
  60. ;; + [[file:modules/encryption.org][Encryption]]
  61. ;; + [[file:modules/desktop.org][Desktop]]
  62. ;; + [[file:modules/writing.org][Writing]]
  63. ;; + [[file:modules/website.org][Website]]
  64. ;; + [[file:modules/capture.org][Capture]]
  65. ;; + [[file:modules/projects.org][Projects]]
  66. ;; + [[file:modules/development.org][Development]]
  67. ;; + [[file:modules/interface.org][Interface]]
  68. ;; + [[file:modules/dashboard.org][Dashboard]]
  69. ;; By default all of the modules will load, override the variable ~dotfiles/modules~ in a host configuration.
  70. (dolist (m dotfiles/modules)
  71. (let ((mod-file (concat dotfiles/home "/modules/" (symbol-name m) ".org")))
  72. (when (file-exists-p mod-file)
  73. (org-babel-load-file mod-file))))