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.

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