Files
memex/projects/dotemacs/modules/emacs-core.el
Amr Gharbeia cc6c552d5a refactor: Move Emacs config from system/ to projects/dotemacs/
- Delete deprecated system/ configuration files
- Update projects/dotemacs/modules/ with reorganized config
- Add .opencode/ directory for agent state
- Clean up attachments and unused documentation files
2026-04-25 18:41:20 -04:00

92 lines
2.8 KiB
EmacsLisp

;;; emacs-core.el --- Summary
;;; Commentary:
;;; Code:
;; -*- lexical-binding: t; -*-
(setq gc-cons-threshold (* 500 1024 1024))
(add-hook 'after-init-hook (lambda () (setq gc-cons-threshold (* 5 1024 1024))))
(setq straight-use-package-by-default t)
(require 'use-package)
(straight-use-package 'diminish)
(require 'diminish)
(unless (file-directory-p (expand-file-name "~/.emacs.d/straight/versions")) (make-directory (expand-file-name "~/.emacs.d/straight/versions") t))
(use-package org)
(use-package ef-themes
:config
;; If you like two specific themes and want to switch between them, you
;; can specify them in `ef-themes-to-toggle' and then invoke the command
;; `ef-themes-toggle'. All the themes are included in the variable
;; `ef-themes-collection'.
(setq ef-themes-to-toggle '(ef-summer ef-winter))
(setq ef-themes-headings ; read the manual's entry or the doc string
'((0 variable-pitch light 1.9)
(1 variable-pitch light 1.8)
(2 variable-pitch regular 1.7)
(3 variable-pitch regular 1.6)
(4 variable-pitch regular 1.5)
(5 variable-pitch 1.4) ; absence of weight means `bold'
(6 variable-pitch 1.3)
(7 variable-pitch 1.2)
(t variable-pitch 1.1)))
;; They are nil by default...
(setq ef-themes-mixed-fonts t)
(setq ef-themes-variable-pitch-ui t)
;; Disable all other themes to avoid awkward blending:
(mapc #'disable-theme custom-enabled-themes)
;; Load the theme of choice:
(load-theme 'ef-winter :no-confirm)
)
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(when (file-exists-p custom-file) (load custom-file))
(defvar my-laptop-p (equal (system-name) "lilitop"))
(defvar my-server-p (and (equal (system-name) "localhost") (equal user-login-name "root")))
(defvar my-phone-p (not (null (getenv "ANDROID_ROOT")))
"If non-nil, GNU Emacs is running on Termux.")
(when my-phone-p (defvar gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3"))
(global-auto-revert-mode) ; simplifies syncing
(savehist-mode)
(when (fboundp 'flycheck-mode)
(setq flycheck-global-modes nil)
(global-flycheck-mode -1))
(when (fboundp 'flymake-mode)
(setq help-at-pt-display-when-idle t)
;; Disable flymake in all buffers
(add-hook 'find-file-hook (lambda () (flymake-mode -1))))
(use-package magit)
(setq user-full-name "Amr Gharbeia")
(defvar email-address "amr@gharbeia.net")
(defvar calendar-latitude 39.0)
(defvar calendar-longitude -77.1)
(defvar calendar-location-name "Washington, DC")
(defvar calendar-time-zone -300)
(defvar calendar-standard-time-zone-name "EST")
(defvar calendar-daylight-time-zone-name "EDT")
(add-hook 'server-done-hook (lambda () (delete-frame)))
;; (desktop-save-mode t)
(use-package password-store)
(use-package auth-source
:config (auth-source-pass-enable)
)
(provide 'emacs-core)
;;; emacs-core.el ends here