-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnight-loader.el
79 lines (69 loc) · 2.26 KB
/
night-loader.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
(defun night/loaded-p ()
(and (boundp 'night-loaded) night-loaded))
;;;
(defun load-path-gitmodules (file)
(add-to-list 'load-path (concat (getenv "DOOMDIR") "/" "gitmodules/" file)))
(defun load-gitmodules (file)
(load! (concat (getenv "DOOMDIR") "/" "gitmodules/" file)))
(defun load-night (file)
(load! (concat (getenv "DOOMDIR") "/" "night-" file ".el")))
(setq nightal-dir (concat (getenv "DOOMDIR") "/" "autoload"))
;;;
(defun night/server-p ()
;; @AKA isServer
;; (not (equalp user-login-name "evar"))
(not (eq system-type 'darwin))
)
(defun night/ssh-p ()
;; @AKA isSSH
(night/server-p))
(defun night/load-last ()
;; autoloaded functions can still get loaded after this; Use:
;; (advice-add 'original-function :override #'something-fixed)
;;;
;; (mapcar #'load '("autoload/night-completion.el"))
(mapcar #'load-night '("doom-overrides" "last"))
;;;
(when (display-graphic-p)
(setq ns-use-native-fullscreen t)
;; Non-nil means to use native fullscreen on Mac OS X 10.7 and later.
(toggle-frame-fullscreen)
(message "Fullscreen activated!"))
;;;
)
(defun night/load-truly-last ()
(mapcar #'load-night '("truly-last")))
(defun night/load-config ()
(interactive)
(message "%s" "night/load-config started ...")
(load "~/.private-config.el" t) ;; loading the private config first
(mapcar #'load-night
'(
"packages"
"brish"
"macros"
"basic"
"doom-keybindings"
"gui"
"macos-gui"))
(load-gitmodules "osx-clipboard-mode/osx-clipboard.el")
(load-gitmodules "fzf.el/fzf.el")
;; (load-gitmodules "emacswiki/HighLight.el")
(mapcar #'load (directory-files-recursively nightal-dir "\.el$"))
(progn ;; with-eval-after-load 'pdf-view
(when (not (night/server-p))
;; (load-gitmodules "pdf-continuous-scroll-mode.el/pdf-continuous-scroll-mode.el")
))
(add-hook
'window-setup-hook
;; 'doom-first-buffer-hook ;; @upstreamBug @hang
#'night/load-truly-last
1000)
(night/load-last)
(message "TERM: %s" (getenv "TERM"))
(night/brishz 'awaysh 'eval "sleep 20 ; bell-sc2-evo-perfection")
)
(cond
((file-exists-p (getenv "DOOMDIR"))
(night/load-config))
(t (message "DOOMDIR does not exist, skipped night/load-config")))