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.

146 lines
6.5 KiB

4 years ago
4 years ago
  1. ;; Options
  2. ;; All of the options available for configuration are defined here. They may be overriden in a host configuration, and are read by the definitions in the modules. All of the variables are prefixed with ~dotfiles/~ to avoid name collision with other functions and packages. All of the available modules are defined in ~dotfiles/modules-p~. The variable is constant, meaning it cannot be modified. Each time a new module is added, it must be included in this list.
  3. (defconst dotfiles/modules-p
  4. '(core
  5. editor
  6. shell
  7. email
  8. feeds
  9. terminal
  10. encryption
  11. desktop
  12. writing
  13. presentations
  14. website
  15. capture
  16. projects
  17. development
  18. interface
  19. dashboard)
  20. "All of the available modules.")
  21. ;; After the host configuration has loaded, the modules defined in ~dotfiles/modules~ are loaded sequentially. By default, the value of ~dotfiles/modules~ is equal to ~dotfiles/modules-p~. This means that all of the modules will load by default. Remove symbols from this list in a host configuration, or override it entirely to modify this behaviour.
  22. (defvar dotfiles/modules dotfiles/modules-p
  23. "All of the enable modules, default value equal to `dotfiles/modules-p'.")
  24. ;; Environment variables
  25. ;; Some of the behaviour in Emacs depends on the values of mutable environment variables. To reduce confusion in my own configuration, the values are read when Emacs starts, and then written to once the configuration has loaded. This allows the values to be overriden in a host configuration, without modifying the environment variable prior to starting.
  26. (defvar dotfiles/browser (getenv "BROWSER")
  27. "Default system web browser.")
  28. (defvar dotfiles/language (getenv "LANG")
  29. "Default system dictionary language.")
  30. ;; Look and feel
  31. ;; Define the options for the unified system font. The default is =Fira Code= due to its readability and support for ligatures. All font faces will be set with this value. Any variations to the font sizes are based on the value defined here as well, reducing the number of places to make modifications to when changing fonts.
  32. (defvar dotfiles/font "Fira Code"
  33. "Unified system font family.")
  34. (defvar dotfiles/font-size 96
  35. "Unified system font size.")
  36. ;; Certain actions like code completions, or binding suggestions, can be configured to wait for a specific delay before offering their respective choices. I prefer to keep this value low, so that suggestions are shown immediately. This can have an affect on the performance of Emacs on older hardware. Adjust accordingly.
  37. (defvar dotfiles/idle 0.0
  38. "Delay time before offering suggestions and completions.")
  39. ;; Prefix all of the custom keybinding actions with =SPC=, a tehcnique that comes from Doom / Spacemacs. In some situations, namely when using the [[file:modules/desktop.org][Desktop]] module, the leader key may not always be available. The global prefix should be used in these circumstances.
  40. (defvar dotfiles/leader-key "SPC"
  41. "The all-powerful leader key.")
  42. (defvar dotfiles/leader-key-global
  43. (concat "C-" dotfiles/leader-key)
  44. "Global prefix for the all-powerful leader key.")
  45. ;; Productivity
  46. ;; The location of source code projects for indexing in the [[file:modules/projects.org][Projects]] module are defined here. These projects will integrate their TODOs with the local Agenda. Override this setting in a host configuration, with the =DOTFILES_PROJECTS= environment variable, or use the default value of =~/.local/source/= in compliance with the XDG Base Directory specification.
  47. (defvar dotfiles/projects
  48. (or (getenv "DOTFILES_PROJECTS")
  49. (expand-file-name "~/.local/source"))
  50. "Location of source code projects.")
  51. ;; Security
  52. ;; The local password store should be cloned prior to initialization. Override this setting in a host configuration, with the =DOTFILES_PASSWORDS= environment variable, or use the default value of =~/.password-store=, which is what GNU pass will assume.
  53. (defvar dotfiles/passwords
  54. (or (getenv "DOTFILES_PASSWORDS")
  55. (expand-file-name "~/.password-store"))
  56. "Location of the local password store.")
  57. ;; Since I keep all of my writing in this repository, I encrypt *most* of my Org files with GPG. Define the key to encrypt them for / to. Override this in a host configuration file.
  58. (defvar dotfiles/public-key "37AB1CB72B741E478CA026D43025DCBD46F81C0F"
  59. "GPG kley to encrpy org files for/to.")
  60. ;; Hosts
  61. ;; 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:
  62. ;; + [[file:hosts/acernitro.org][Acernitro]]
  63. ;; + [[file:hosts/gamingpc.org][GamingPC]]
  64. ;; + [[file:hosts/localhost.org][Termux]]
  65. ;; + [[file:hosts/raspberry.org][Raspberry]]
  66. ;; + [[file:hosts/virtualbox.org][VirtualBox]]
  67. ;; Begin the process by loading any host specific option overrides. The host configuration tangles, and loads (if it exist) using the systems name. If a host definition doesn't exist the default values remain.
  68. (let ((host-file (concat dotfiles/home "/hosts/" system-name ".org")))
  69. (when (file-exists-p host-file)
  70. (org-babel-load-file host-file)))
  71. ;; Modules
  72. ;; 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. Below are details of the modules, and their respective dependencies.
  73. ;; + [[file:modules/capture.org][Capture]]
  74. ;; + [[file:modules/core.org][Core]]
  75. ;; + [[file:modules/dashboard.org][Dashboard]]
  76. ;; + [[file:modules/desktop.org][Desktop]]
  77. ;; + [[file:modules/development.org][Development]]
  78. ;; + [[file:modules/editor.org][Editor]]
  79. ;; + [[file:modules/email.org][Email]]
  80. ;; + [[file:modules/encryption.org][Encryption]]
  81. ;; + [[file:modules/interface.org][Interface]]
  82. ;; + [[file:modules/presentations.org][Presentations]]
  83. ;; + [[file:modules/projects.org][Projects]]
  84. ;; + [[file:modules/shell.org][Shell]]
  85. ;; + [[file:modules/terminal.org][Terminal]]
  86. ;; + [[file:modules/website.org][Website]]
  87. ;; + [[file:modules/writing.org][Writing]]
  88. ;; All of the modules in ~dotfiles/modules~ load after the host overrides. By default, all of the packages defined in ~dotfiles/modules-p~ load. Override this behaviour in a host configuration file.
  89. (dolist (m dotfiles/modules)
  90. (let ((mod-file (concat dotfiles/home "/modules/" (symbol-name m) ".org")))
  91. (when (file-exists-p mod-file)
  92. (org-babel-load-file mod-file))))