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.

117 lines
4.0 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
  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
  15. editor
  16. shell
  17. email
  18. encryption
  19. desktop
  20. writing
  21. website
  22. capture
  23. projects
  24. development
  25. interface
  26. dashboard)
  27. "All of the available modules.")
  28. (defvar dotfiles/modules dotfiles/modules-p
  29. "All of the enabled modules.")
  30. (defvar dotfiles/font "Fira Code"
  31. "Unified system font family.")
  32. (defvar dotfiles/font-size 96
  33. "Unified system font size.")
  34. (defvar dotfiles/idle 0.0
  35. "Delay time before offering suggestions and completions.")
  36. (defvar dotfiles/leader-key "SPC"
  37. "All powerful leader key.")
  38. (defvar dotfiles/leader-key-global
  39. (concat "C-" dotfiles/leader-key)
  40. "Global prefix for the leader key.")
  41. (defvar dotfiles/projects
  42. (expand-file-name "~/.local/source/")
  43. "Location of source code projects.")
  44. (defvar dotfiles/passwords
  45. (expand-file-name "~/.password-store/")
  46. "Location of local password store.")
  47. (defvar dotfiles/public-key
  48. "37AB1CB72B741E478CA026D43025DCBD46F81C0F"
  49. "GPG key to encrypt org files for.")
  50. ;; Startup
  51. ;; 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.
  52. (load-file "~/.emacs.d/bin/cleanup.el")
  53. (load-file "~/.emacs.d/bin/packages.el")
  54. ;; Hosts
  55. ;; 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:
  56. ;; + [[file:hosts/localhost.org][Termux]]
  57. ;; + [[file:hosts/gamingpc.org][Gamingpc]]
  58. ;; + [[file:hosts/raspberry.org][Raspberry]]
  59. ;; + [[file:hosts/acernitro.org][Acernitro]]
  60. ;; + [[file:hosts/virtualbox.org][Virtualbox]]
  61. ;; Begin the process by loading any host specific overrides. The host configuration tangles, and loads (if it exist) using the systems name.
  62. (let ((host-file (concat dotfiles/home "/hosts/" system-name ".org")))
  63. (when (file-exists-p host-file)
  64. (org-babel-load-file host-file)))
  65. ;; Modules
  66. ;; 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~.
  67. ;; + [[file:modules/core.org][Core]]
  68. ;; + [[file:modules/editor.org][Editor]]
  69. ;; + [[file:modules/email.org][Email]]
  70. ;; + [[file:modules/encryption.org][Encryption]]
  71. ;; + [[file:modules/shell.org][Shell]]
  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/development.org][Development]]
  78. ;; + [[file:modules/interface.org][Interface]]
  79. ;; + [[file:modules/dashboard.org][Dashboard]]
  80. ;; By default all of the modules will load, override the variable ~dotfiles/modules~ in a host configuration.
  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))))