System-itize

This commit is contained in:
Case Duckworth 2022-01-04 21:10:07 -06:00
parent 7a1ff0c1bc
commit 3db66f9be6
1 changed files with 21 additions and 16 deletions

37
init.el
View File

@ -21,8 +21,6 @@
private))
(require (or (car-safe feature) feature) (cdr-safe feature) :noerror))
(setq debug-on-error (memq system-type '(msdos windows-nt)))
(setup (:require +casing)
(with-eval-after-load '+key
(define-key +key-mode-map (kbd "C-c c") +casing-map))
@ -218,10 +216,10 @@
#'hl-line-mode)
(:+key "C-x C-j" #'dired-jump)
(with-eval-after-load 'dired
(pcase system-type
((or 'ms-dos 'windows-nt)
(pcase system-system
('windows
(:straight w32-browser))
((or 'gnu/linux)
('linux
(:straight dired-open)
(:option dired-listing-switches
(concat dired-listing-switches " -F")))))
@ -907,14 +905,19 @@ See also `crux-reopen-as-root-mode'."
(:hook-into eshell-mode))
(setup (:straight-when exec-path-from-shell
(eq system-type 'gnu/linux))
(when (daemonp)
(exec-path-from-shell-initialize))
(exec-path-from-shell-copy-envs '("XDG_CONFIG_HOME"
"XDG_CONFIG_DIRS"
"XDG_DATA_HOME"
"XDG_DATA_DIRS"
"XDG_CACHE_HOME")))
(eq system-system 'linux))
(dolist (var '("SSH_AUTH_SOCK"
"SSH_AGENT_PID"
"GPG_AGENT_INFO"
"LANG"
"LC_CTYPE"
"XDG_CONFIG_HOME"
"XDG_CONFIG_DIRS"
"XDG_DATA_HOME"
"XDG_DATA_DIRS"
"XDG_CACHE_HOME"))
(add-to-list 'exec-path-from-shell-variables var))
(exec-path-from-shell-initialize))
(setup (:straight expand-region)
(:+key "C-=" #'er/expand-region))
@ -931,7 +934,7 @@ See also `crux-reopen-as-root-mode'."
(setup (:straight-when (forge
:host github :repo "magit/forge")
(eq system-type 'gnu/linux))
(eq system-system 'linux))
(require 'forge)
(add-to-list 'forge-alist
'("tildegit.org" "tildegit.org/api/v1" "tildegit.org"
@ -1124,7 +1127,9 @@ See also `crux-reopen-as-root-mode'."
scheme-mode))
(setup (:straight-when pdf-tools
(eq system-type 'gnu/linux))
;; Ensure we can build `pdf-tools'
(or (executable-find "gcc")
(executable-find "g++")))
(pdf-tools-install t))
(setup (:straight (shell-command+
@ -1235,7 +1240,7 @@ See also `crux-reopen-as-root-mode'."
(:option undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'"
"/git-rebase-todo\\'")
undo-fu-session-directory (.etc "undo/" t)
undo-fu-session-compression (eq system-type 'gnu/linux))
undo-fu-session-compression (executable-find "gzip"))
(global-undo-fu-session-mode +1))
(setup (:straight (vertico