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
  1. ;; This file is controlled by README.org
  2. ;; Please make any modifications there.
  3. ;; The original value of `user-emacs-directory' prior to redirection.
  4. (defconst dotfiles/home
  5. (or (getenv "DOTFILES_HOME")
  6. (expand-file-name user-emacs-directory)))
  7. ;; The redirection target of `user-emacs-directory' during initialization.
  8. (defconst dotfiles/cache
  9. (or (getenv "DOTFILES_CACHE")
  10. (expand-file-name "~/.cache/emacs")))
  11. ;; Make sure `dotfiles/cache' is a valid directory.
  12. (unless (file-exists-p dotfiles/cache)
  13. (make-directory dotfiles/cache t))
  14. ;; Redirect the value of `user-emacs-directory'.
  15. (setq user-emacs-directory dotfiles/cache)
  16. ;; Disable error messages for packages that don't support native-comp.
  17. (setq comp-async-report-warnings-errors nil)
  18. ;; Disable unwanted features.
  19. (setq make-backup-files nil
  20. create-lockfiles nil)
  21. ;; Apply the configurations prior to bootstrapping the package manager.
  22. (setq straight-repository-branch "master"
  23. straight-use-package-by-default t
  24. package-enable-at-startup nil)
  25. ;; Bootstrap the package manager.
  26. (defvar bootstrap-version)
  27. (let ((bootstrap-file
  28. (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
  29. (bootstrap-version 5))
  30. (unless (file-exists-p bootstrap-file)
  31. (with-current-buffer
  32. (url-retrieve-synchronously
  33. "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
  34. 'silent 'inhibit-cookies)
  35. (goto-char (point-max))
  36. (eval-print-last-sexp)))
  37. (load bootstrap-file nil 'nomessage))
  38. ;; Integrate with `use-package' by installing it via `straight'.
  39. (straight-use-package 'use-package)
  40. ;; Specify core package sources.
  41. (straight-use-package 'no-littering)
  42. (straight-use-package '(org :local-repo nil))
  43. ;; All of the modules available sorted in their default load order.
  44. (defconst dotfiles/modules-p
  45. '(trash keys org evil dired magit
  46. shell mu4e elfeed eshell vterm
  47. gpg pass x11 exwm roam agenda
  48. spelling grammar reveal hugo
  49. capture projects docker lsp dap
  50. cc go uml conf python fonts ivy
  51. themes modeline dashboard))
  52. ;; All of the enabled modules.
  53. (defvar dotfiles/modules dotfiles/modules-p)
  54. ;; The default system language.
  55. (defvar dotfiles/language (getenv "LANG"))
  56. ;; Configure a unified system font.
  57. (defvar dotfiles/font "Fira Code")
  58. ;; Default system font size.
  59. (defvar dotfiles/font-size 96)
  60. ;; Delay time before offering suggestions and completions.
  61. (defvar dotfiles/idle 0.0)
  62. ;; The all powerful leader key.
  63. (defvar dotfiles/leader-key "SPC")
  64. ;; Global prefix for the leader key under X11 windows.
  65. (defvar dotfiles/leader-key-global
  66. (concat "C-" dotfiles/leader-key))
  67. ;; The location on disk of source code projects.
  68. (defvar dotfiles/projects
  69. (or (getenv "DOTFILES_PROJECTS")
  70. (expand-file-name "~/.local/source")))
  71. ;; The location on disk of the local copy of the password store.
  72. (defvar dotfiles/passwords
  73. (or (getenv "DOTFILES_PASSWORDS")
  74. (expand-file-name "~/.password-store")))
  75. ;; The public GPG key to encrpyt files, and emails for / to / with.
  76. (defvar dotfiles/public-key "37AB1CB72B741E478CA026D43025DCBD46F81C0F")
  77. ;; Load a host configuration.
  78. (defun dotfiles/load-host (host-name)
  79. "Load the host configuration file for the system `host-name'."
  80. (interactive)
  81. (let ((host-file (concat dotfiles/home "/hosts/" host-name ".org")))
  82. (when (file-exists-p host-file)
  83. (org-babel-load-file host-file))))
  84. ;; Load a module definition.
  85. (defun dotfiles/load-modules (modules)
  86. "Load the `modules' in sequential order."
  87. (interactive)
  88. (dolist (m modules)
  89. (let ((mod-file (concat dotfiles/home "/modules/" (symbol-name m) ".org")))
  90. (when (file-exists-p mod-file)
  91. (org-babel-load-file mod-file)))))