init-terminal-startup.el (2562B)
1 ;;; init-const.el --- constant and system stuff -*- lexical-binding: t -*- 2 3 ;;; Commentary: 4 5 ;;; Code: 6 7 (global-display-line-numbers-mode 1) 8 9 (defconst *is-mac* (eq system-type 'darwin)) 10 (defconst *is-linux* (eq system-type 'gnu/linux)) 11 (defconst *is-windows* (or (eq system-type 'ms-dos) (eq system-type 'windows-nt))) 12 (defconst *is-android* (if (getenv "TERMUX_VERSION") t nil)) 13 14 (set-selection-coding-system 'utf-8) 15 (when (fboundp 'set-charset-priority) 16 (set-charset-priority 'unicode)) 17 (set-default-coding-systems 'utf-8) 18 (set-buffer-file-coding-system 'utf-8) 19 (set-clipboard-coding-system 'utf-8) 20 (set-file-name-coding-system 'utf-8) 21 (set-keyboard-coding-system 'utf-8) 22 (set-next-selection-coding-system 'utf-8) 23 (set-selection-coding-system 'utf-8) 24 (set-terminal-coding-system 'utf-8) 25 (setq locale-coding-system 'utf-8) 26 (setq system-time-locale "C") 27 28 (setq backup-directory-alist 29 `((".*" . ,(expand-file-name "backup/" user-emacs-directory))) 30 backup-by-copying t 31 delete-old-versions t 32 kept-new-versions 6 33 kept-old-versions 2 34 version-control t) 35 36 (setq auto-save-file-name-transforms 37 `((".*" ,(expand-file-name "auto-save-list/" user-emacs-directory) t))) 38 39 (put 'scroll-left 'disabled nil) 40 41 (setq create-lockfiles nil) 42 43 (setq ring-bell-function 'ignore) 44 45 (cond 46 (*is-windows* 47 (add-to-list 'exec-path (expand-file-name "H/appppppppppp/scoop/apps/")) 48 (setenv "PATH" (concat (expand-file-name "H/appppppppppp/scoop/apps/") ";" (getenv "PATH")))) 49 (*is-mac* 50 (add-to-list 'exec-path (expand-file-name "/opt/homebrew/bin/")) 51 (setenv "PATH" (concat (expand-file-name "/opt/homebrew/bin/") ":" (getenv "PATH")))) 52 (*is-linux* 53 (add-to-list 'exec-path (expand-file-name "~/.guix-home/profile/bin/")) 54 (setenv "PATH" (concat (expand-file-name "~/.guix-home/profile/bin/") ":" (getenv "PATH"))))) 55 56 (global-auto-revert-mode 1) 57 58 (when (display-graphic-p) 59 (recentf-mode) 60 (setq recentf-max-saved-items 30)) 61 62 (delete-selection-mode) 63 64 (setq initial-scratch-message 65 "") 66 67 (setq native-comp-async-warnings-errors-kind 'silent) 68 69 (if (boundp 'use-short-answers) 70 (setq use-short-answers t) 71 (fset 'yes-or-no-p 'y-or-n-p)) 72 73 (setq delete-by-moving-to-trash t) 74 75 (setq xref-search-program 76 (cond 77 ((or (executable-find "ripgrep") 78 (executable-find "rg")) 79 'ripgrep) 80 (t 'grep))) 81 82 (setq word-wrap-by-category t) 83 84 (setq-default indent-tabs-mode nil) 85 86 (setq kill-whole-line t) 87 88 (setq epg-pinentry-mode 'loopback) 89 90 (provide 'init-terminal-startup) 91 ;;; init-terminal-statup.el ends here