;;; init-const.el --- constant and system stuff -*- lexical-binding: t -*- ;;; Commentary: ;;; Code: (global-display-line-numbers-mode 1) (defconst *is-mac* (eq system-type 'darwin)) (defconst *is-linux* (eq system-type 'gnu/linux)) (defconst *is-windows* (or (eq system-type 'ms-dos) (eq system-type 'windows-nt))) (defconst *is-android* (if (getenv "TERMUX_VERSION") t nil)) (set-selection-coding-system 'utf-8) (when (fboundp 'set-charset-priority) (set-charset-priority 'unicode)) (set-default-coding-systems 'utf-8) (set-buffer-file-coding-system 'utf-8) (set-clipboard-coding-system 'utf-8) (set-file-name-coding-system 'utf-8) (set-keyboard-coding-system 'utf-8) (set-next-selection-coding-system 'utf-8) (set-selection-coding-system 'utf-8) (set-terminal-coding-system 'utf-8) (setq locale-coding-system 'utf-8) (setq system-time-locale "C") (setq backup-directory-alist `((".*" . ,(expand-file-name "backup/" user-emacs-directory))) backup-by-copying t delete-old-versions t kept-new-versions 6 kept-old-versions 2 version-control t) (setq auto-save-file-name-transforms `((".*" ,(expand-file-name "auto-save-list/" user-emacs-directory) t))) (put 'scroll-left 'disabled nil) (setq create-lockfiles nil) (setq ring-bell-function 'ignore) (cond (*is-windows* (add-to-list 'exec-path (expand-file-name "H/appppppppppp/scoop/apps/")) (setenv "PATH" (concat (expand-file-name "H/appppppppppp/scoop/apps/") ";" (getenv "PATH")))) (*is-mac* (add-to-list 'exec-path (expand-file-name "/opt/homebrew/bin/")) (setenv "PATH" (concat (expand-file-name "/opt/homebrew/bin/") ":" (getenv "PATH")))) (*is-linux* (add-to-list 'exec-path (expand-file-name "~/.guix-home/profile/bin/")) (setenv "PATH" (concat (expand-file-name "~/.guix-home/profile/bin/") ":" (getenv "PATH"))))) (global-auto-revert-mode 1) (when (display-graphic-p) (recentf-mode) (setq recentf-max-saved-items 30)) (delete-selection-mode) (setq initial-scratch-message "") (setq native-comp-async-warnings-errors-kind 'silent) (if (boundp 'use-short-answers) (setq use-short-answers t) (fset 'yes-or-no-p 'y-or-n-p)) (setq delete-by-moving-to-trash t) (setq xref-search-program (cond ((or (executable-find "ripgrep") (executable-find "rg")) 'ripgrep) (t 'grep))) (setq word-wrap-by-category t) (setq kill-whole-line t) (provide 'init-terminal-startup) ;;; init-terminal-statup.el ends here