;; Basic appearence and behaviour. (setq inhibit-startup-message t) (setq auto-save-default nil) (setq make-backup-files nil) (cond ((find-font (font-spec :name "Berkeley Mono")) (set-face-attribute 'default nil :font "Berkeley Mono-13"))) (global-set-key (kbd "") 'keyboard-escape-quit) (scroll-bar-mode -1) (tool-bar-mode -1) (set-fringe-mode 10) (setq column-number-mode t) (menu-bar-mode -1) ;; For Emacs >=29. (pixel-scroll-precision-mode t) ;; Messes with the Terraform LSP, and I don't really need this myself. (setq create-lockfiles nil) (global-tab-line-mode 1) ;; Orgmode tweaks. (setq org-edit-src-content-indentation 0 org-src-tab-acts-natively t org-src-preserve-indentation t) (setq-default tab-width 4) ;; straight.el bootstrapping (defvar bootstrap-version) (let ((bootstrap-file (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (bootstrap-version 5)) (unless (file-exists-p bootstrap-file) (with-current-buffer (url-retrieve-synchronously "https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el" 'silent 'inhibit-cookies) (goto-char (point-max)) (eval-print-last-sexp))) (load bootstrap-file nil 'nomessage)) ;; Packages that we want installed across all use cases. (straight-use-package 'use-package) (use-package request :straight t) (use-package modus-themes :straight t) (use-package simple-modeline :straight t :init (simple-modeline-mode 1)) (use-package all-the-icons :straight t) (use-package which-key :straight t :config (which-key-mode)) (use-package org-modern :straight t) (add-hook 'org-mode-hook #'org-modern-mode) (add-hook 'org-agenda-finalize-hook #'org-modern-agenda) (use-package markdown-mode :straight t) (use-package olivetti :straight t) (use-package vundo :straight t) ;; Adapted from https://github.com/Slackwise/dotfiles/blob/master/emacs/slackwise.el (setq-default functions-file (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "functions.el")) (when (file-exists-p functions-file) (load functions-file)) ;; Keep the customize system from borking up this file. (setq-default custom-file (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "custom.el")) (when (file-exists-p custom-file) (load custom-file)) (defun me/email-client-mode () "Custom more for using emacs as a mail client." (interactive) (load (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "mail/init.el")) (kill-this-buffer) (mu4e)) (defun me/work-mode () "Custom more for using emacs as programing environment." (interactive) (load (concat (or (getenv "XDG_CONFIG_HOME") "~/.emacs.d/") "prog/init.el")) (kill-this-buffer) (treemacs))