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.

114 lines
3.7 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. ;; Startup
  2. ;; This project makes heavy use of modern features and libraries. Since *Babel's* used in initialization, *Org* must load prior to importing any of custom modules. This introduces a unique *chicken before the egg* problem. My solution included some initialization code in *Emacs Lisp* called before using any *Babel* APIs.
  3. (load-file "~/.emacs.d/bin/cleanup.el")
  4. (load-file "~/.emacs.d/bin/packages.el")
  5. ;; Options
  6. ;; Here's a complete list of all of the options configurable for each host, and their default values. All variables prefixed with ~dotfiles/~. If you need to make configurations to another variable, consider creating a new option.
  7. (defvar dotfiles/font
  8. "Fira Code"
  9. "Unified system font family.")
  10. (defvar dotfiles/font-size
  11. 96
  12. "Unified system font size.")
  13. (defvar dotfiles/browser
  14. (getenv "BROWSER")
  15. "Default system web browser.")
  16. (defvar dotfiles/language
  17. (getenv "LANG")
  18. "Default system dictionary language.")
  19. (defconst dotfiles/modules-p
  20. '(core
  21. editor
  22. email
  23. desktop
  24. writing
  25. website
  26. capture
  27. projects
  28. interface)
  29. "All of the available modules.")
  30. (defvar dotfiles/modules
  31. dotfiles/modules-p
  32. "All of the enabled modules.")
  33. (defvar dotfiles/home
  34. user-emacs-directory
  35. "Original value of `user-emacs-directory'.")
  36. (defvar dotfiles/cache
  37. (expand-file-name "~/.cache/emacs")
  38. "Redirection target of `user-emacs-directory'.")
  39. (defvar dotfiles/idle
  40. 0.0
  41. "Delay time before offering suggestions and completions.")
  42. (defvar dotfiles/leader-key
  43. "SPC"
  44. "All powerful leader key.")
  45. (defvar dotfiles/leader-key-global
  46. (concat "C-" dotfiles/leader-key)
  47. "Global prefix for the leader key.")
  48. (defvar dotfiles/projects
  49. (expand-file-name "~/.local/source/")
  50. "Location of source code projects.")
  51. (defvar dotfiles/passwords
  52. (expand-file-name "~/.password-store/")
  53. "Location of local password store.")
  54. (defvar dotfiles/public-key
  55. "37AB1CB72B741E478CA026D43025DCBD46F81C0F"
  56. "GPG key to encrypt org files for.")
  57. ;; Hosts machines
  58. ;; 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:
  59. ;; + [[file:hosts/localhost.org][Termux]]
  60. ;; + [[file:hosts/raspberry.org][Raspberry]]
  61. ;; + [[file:hosts/acernitro.org][Acernitro]]
  62. ;; + [[file:hosts/virtualbox.org][Virtualbox]]
  63. ;; Begin the process by loading any host specific overrides. The host configuration tangles, and loads (if it exist) using the systems name.
  64. (let ((host-file (concat dotfiles/home "/hosts/" system-name ".org")))
  65. (when (file-exists-p host-file)
  66. (org-babel-load-file host-file)))
  67. ;; Module directory
  68. ;; 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~.
  69. ;; + [[file:modules/core.org][Core]]
  70. ;; + [[file:modules/editor.org][Editor]]
  71. ;; + [[file:modules/email.org][Email]]
  72. ;; + [[file:modules/desktop.org][Desktop]]
  73. ;; + [[file:modules/writing.org][Writing]]
  74. ;; + [[file:modules/website.org][Website]]
  75. ;; + [[file:modules/capture.org][Capture]]
  76. ;; + [[file:modules/projects.org][Projects]]
  77. ;; + [[file:modules/interface.org][Interface]]
  78. ;; By default all of the modules will load, override the variable ~dotfiles/modules~ in a host configuration to override this.
  79. (dolist (m dotfiles/modules)
  80. (let ((mod-file (concat dotfiles/home "/modules/" (symbol-name m) ".org")))
  81. (when (file-exists-p mod-file)
  82. (org-babel-load-file mod-file))))