Add XDG detection to 'doom install' #4040
Create ~/.config/doom instead of ~/.doom.d if your emacs config lives in ~/.config/emacs.
This commit is contained in:
parent
dbe09f9b43
commit
1255ebdbd7
1 changed files with 6 additions and 0 deletions
|
@ -28,6 +28,12 @@ DOOMDIR environment variable. e.g.
|
|||
;; Create `doom-private-dir'
|
||||
(if noconfig-p
|
||||
(print! (warn "Not copying private config template, as requested"))
|
||||
;; Create DOOMDIR in ~/.config/doom if ~/.config/emacs exists.
|
||||
(when (and (not (file-directory-p doom-private-dir))
|
||||
(not (getenv "DOOMDIR")))
|
||||
(let ((xdg-config-dir (or (getenv "XDG_CONFIG_HOME") "~/.config")))
|
||||
(when (file-in-directory-p doom-emacs-dir xdg-config-dir)
|
||||
(setq doom-private-dir (expand-file-name "doom/" xdg-config-dir)))))
|
||||
(print! (start "Creating %s") (relpath doom-private-dir))
|
||||
(make-directory doom-private-dir 'parents)
|
||||
(print-group!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue