summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-01-04 21:10:07 -0600
committerCase Duckworth2022-01-04 21:10:07 -0600
commit3db66f9be62c9142f6b4f4ff7b55db291ead0b1d (patch)
treeb7c7c969471029a343cb3ef113217565dde6c392
parentAdd a function and variable system-system (diff)
downloademacs-3db66f9be62c9142f6b4f4ff7b55db291ead0b1d.tar.gz
emacs-3db66f9be62c9142f6b4f4ff7b55db291ead0b1d.zip
System-itize
-rw-r--r--init.el37
1 files changed, 21 insertions, 16 deletions
diff --git a/init.el b/init.el index 06f92ba..d9d8c00 100644 --- a/init.el +++ b/init.el
@@ -21,8 +21,6 @@
21 private)) 21 private))
22 (require (or (car-safe feature) feature) (cdr-safe feature) :noerror)) 22 (require (or (car-safe feature) feature) (cdr-safe feature) :noerror))
23 23
24(setq debug-on-error (memq system-type '(msdos windows-nt)))
25
26(setup (:require +casing) 24(setup (:require +casing)
27 (with-eval-after-load '+key 25 (with-eval-after-load '+key
28 (define-key +key-mode-map (kbd "C-c c") +casing-map)) 26 (define-key +key-mode-map (kbd "C-c c") +casing-map))
@@ -218,10 +216,10 @@
218 #'hl-line-mode) 216 #'hl-line-mode)
219 (:+key "C-x C-j" #'dired-jump) 217 (:+key "C-x C-j" #'dired-jump)
220 (with-eval-after-load 'dired 218 (with-eval-after-load 'dired
221 (pcase system-type 219 (pcase system-system
222 ((or 'ms-dos 'windows-nt) 220 ('windows
223 (:straight w32-browser)) 221 (:straight w32-browser))
224 ((or 'gnu/linux) 222 ('linux
225 (:straight dired-open) 223 (:straight dired-open)
226 (:option dired-listing-switches 224 (:option dired-listing-switches
227 (concat dired-listing-switches " -F"))))) 225 (concat dired-listing-switches " -F")))))
@@ -907,14 +905,19 @@ See also `crux-reopen-as-root-mode'."
907 (:hook-into eshell-mode)) 905 (:hook-into eshell-mode))
908 906
909(setup (:straight-when exec-path-from-shell 907(setup (:straight-when exec-path-from-shell
910 (eq system-type 'gnu/linux)) 908 (eq system-system 'linux))
911 (when (daemonp) 909 (dolist (var '("SSH_AUTH_SOCK"
912 (exec-path-from-shell-initialize)) 910 "SSH_AGENT_PID"
913 (exec-path-from-shell-copy-envs '("XDG_CONFIG_HOME" 911 "GPG_AGENT_INFO"
914 "XDG_CONFIG_DIRS" 912 "LANG"
915 "XDG_DATA_HOME" 913 "LC_CTYPE"
916 "XDG_DATA_DIRS" 914 "XDG_CONFIG_HOME"
917 "XDG_CACHE_HOME"))) 915 "XDG_CONFIG_DIRS"
916 "XDG_DATA_HOME"
917 "XDG_DATA_DIRS"
918 "XDG_CACHE_HOME"))
919 (add-to-list 'exec-path-from-shell-variables var))
920 (exec-path-from-shell-initialize))
918 921
919(setup (:straight expand-region) 922(setup (:straight expand-region)
920 (:+key "C-=" #'er/expand-region)) 923 (:+key "C-=" #'er/expand-region))
@@ -931,7 +934,7 @@ See also `crux-reopen-as-root-mode'."
931 934
932(setup (:straight-when (forge 935(setup (:straight-when (forge
933 :host github :repo "magit/forge") 936 :host github :repo "magit/forge")
934 (eq system-type 'gnu/linux)) 937 (eq system-system 'linux))
935 (require 'forge) 938 (require 'forge)
936 (add-to-list 'forge-alist 939 (add-to-list 'forge-alist
937 '("tildegit.org" "tildegit.org/api/v1" "tildegit.org" 940 '("tildegit.org" "tildegit.org/api/v1" "tildegit.org"
@@ -1124,7 +1127,9 @@ See also `crux-reopen-as-root-mode'."
1124 scheme-mode)) 1127 scheme-mode))
1125 1128
1126(setup (:straight-when pdf-tools 1129(setup (:straight-when pdf-tools
1127 (eq system-type 'gnu/linux)) 1130 ;; Ensure we can build `pdf-tools'
1131 (or (executable-find "gcc")
1132 (executable-find "g++")))
1128 (pdf-tools-install t)) 1133 (pdf-tools-install t))
1129 1134
1130(setup (:straight (shell-command+ 1135(setup (:straight (shell-command+
@@ -1235,7 +1240,7 @@ See also `crux-reopen-as-root-mode'."
1235 (:option undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'" 1240 (:option undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'"
1236 "/git-rebase-todo\\'") 1241 "/git-rebase-todo\\'")
1237 undo-fu-session-directory (.etc "undo/" t) 1242 undo-fu-session-directory (.etc "undo/" t)
1238 undo-fu-session-compression (eq system-type 'gnu/linux)) 1243 undo-fu-session-compression (executable-find "gzip"))
1239 (global-undo-fu-session-mode +1)) 1244 (global-undo-fu-session-mode +1))
1240 1245
1241(setup (:straight (vertico 1246(setup (:straight (vertico