37 lines
1.4 KiB
Org Mode
37 lines
1.4 KiB
Org Mode
#+TITLE: Misc. Settings (Head)
|
|
Settings here can't be categorized or too small to be it's own topic/file, but has to be set before other settings.
|
|
|
|
* Tools
|
|
Functions needed at the start of the configuration
|
|
#+begin_src emacs-lisp
|
|
(defun safe-getenv (env-name sub-env)
|
|
"like getenv, but uses subEnv var as a value substitute if envName isn't found/empty"
|
|
(if (string= nil (getenv env-name)) sub-env (getenv env-name)))
|
|
#+end_src
|
|
|
|
* User Emacs Directories
|
|
set the directory for emacs and it's apps to put stuff.
|
|
#+begin_src emacs-lisp
|
|
(setq user-emacs-directory
|
|
(concat (safe-getenv "XDG_DATA_HOME" "~/.local/share") "/emacs"))
|
|
#+end_src
|
|
|
|
* Custom File
|
|
This emacs feature is currently not used since a way to integrate this feature into this kind of configuration.
|
|
#+begin_src emacs-lisp
|
|
(setq custom-file (concat user-emacs-directory "/custom.el"))
|
|
#+end_src
|
|
|
|
* Personal File
|
|
This file stores variables containing personal information, and is not distributed.
|
|
A sample of this file though is included in this config to be used
|
|
#+begin_src emacs-lisp
|
|
(let ((personal-file-path (concat user-emacs-config-directory "/personal.org"))
|
|
(sample-personal-file-path (concat user-emacs-config-directory "/personal-sample.org")))
|
|
|
|
;; load main personal file if it exists
|
|
(if (file-exists-p personal-file-path)
|
|
(org-babel-load-file personal-file-path)
|
|
(org-babel-load-file sample-personal-file-path)))
|
|
#+end_src
|