From 2d531217c586a45fbbf9e26a9792cb3a8e35c2ac Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sun, 20 Aug 2023 16:55:32 +0200 Subject: ec: Create a configuration file for ‘ec’ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .config/ec/init.el | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .config/ec/init.el (limited to '.config/ec/init.el') diff --git a/.config/ec/init.el b/.config/ec/init.el new file mode 100644 index 0000000..6de9f3c --- /dev/null +++ b/.config/ec/init.el @@ -0,0 +1,43 @@ +;; Disable useless visual elements +(menu-bar-mode -1) +(tool-bar-mode -1) +(scroll-bar-mode -1) + +;; XDG Directories +(defconst xdg-cache-home + (or (getenv "XDG_CACHE_HOME") + (expand-file-name ".cache" (getenv "HOME")))) +(defconst xdg-config-home + (or (getenv "XDG_CONFIG_HOME") + (expand-file-name ".config" (getenv "HOME")))) + +;; Keep the config directory clean +(let ((cache-dir (expand-file-name "ec" xdg-cache-home))) + (setq user-emacs-directory cache-dir + auto-save-list-file-prefix (expand-file-name + "auto-save-list/" + cache-dir) + backup-directory-alist `(("." . ,(expand-file-name + "backups" + cache-dir))))) + +;; Themeing +(add-to-list 'custom-theme-load-path (expand-file-name "emacs" xdg-config-home)) +(add-to-list 'default-frame-alist '(alpha-background . 90)) +(add-hook 'after-make-frame-functions + (lambda (_) + (dolist (face '(default fixed-pitch)) + (set-face-attribute face nil + :font "Iosevka Smooth" + :weight 'regular + :height 162)))) +(load-theme 'mango t) + +;; Set default settings +(with-eval-after-load 'calc + (setopt calc-show-banner nil + initial-buffer-choice (lambda () (get-buffer "*Calculator*"))) + (keymap-set calc-mode-map "q" #'delete-frame)) + +;; Enter ‘full-calc’ mode +(full-calc) -- cgit v1.2.3