From 5fd1fc2b0e8f3038871fa8d4bde07e782c12645c Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Sun, 14 Jan 2024 14:41:33 -0500 Subject: [PATCH] [emacs] Fix module loading and keymappings --- emacs/.config/doom/config.el | 29 +++++++++++++++++++++-- emacs/.config/doom/hosts/init-erriapus.el | 14 +++++++++++ emacs/.config/doom/packages.el | 1 + 3 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 emacs/.config/doom/hosts/init-erriapus.el diff --git a/emacs/.config/doom/config.el b/emacs/.config/doom/config.el index 3694624..6b28409 100644 --- a/emacs/.config/doom/config.el +++ b/emacs/.config/doom/config.el @@ -33,7 +33,19 @@ (:map evil-treemacs-state-map "C-h" 'evil-window-left - "C-l" 'evil-window-right)) + "C-l" 'evil-window-right) + + :leader + (:prefix "f" + :desc "Find file in dotfiles" "t" #'+hlissner/find-in-dotfiles + :desc "Browse dotfiles" "T" #'+hlissner/browse-dotfiles) + (:prefix "b" + :desc "Black format buffer" "f" #'blacken-buffer + :desc "isort buffer" "I" #'py-isort-buffer + :desc "Links in buffer" "l" #'ace-link-org) + (:prefix "e" + :desc "Goto URL in eww" "e" #'eww + :desc "Search in eww" "w" #'eww-search-words)) (defun unfill-paragraph () "Takes a multi-line paragraph and makes it into a single line of text." @@ -51,7 +63,6 @@ (file-notify-rm-watch key)) file-notify-descriptors)) - (setq frame-title-format '("" (:eval @@ -76,3 +87,17 @@ lsp-modeline-diagnostics-enable 1 lsp-completion-show-detail 1 lsp-file-watch-threshold nil) + + +;; check for hosts folder and find any init-HOSTNAME.el files in there and load them +(defvar host (substring (shell-command-to-string "hostname") 0 -1)) +(defvar host-dir "~/.config/doom/hosts/") +(add-load-path! host-dir) + +;;(let ((init-host-feature (intern (concat "init-" host ".el")))) +;; (load-file init-host-feature)) + +(defvar host-init (concat "~/.config/doom/hosts/init-" host ".el")) +(if (file-exists-p host-init) + (load-file host-init)) +(load-file "~/.config/doom/+agenda-fix.el") diff --git a/emacs/.config/doom/hosts/init-erriapus.el b/emacs/.config/doom/hosts/init-erriapus.el new file mode 100644 index 0000000..843bb9d --- /dev/null +++ b/emacs/.config/doom/hosts/init-erriapus.el @@ -0,0 +1,14 @@ +;;; ../../.dotfiles/emacs/.config/doom/hosts/init-erriapus.el -*- lexical-binding: t; -*- + + ;(add-to-list 'default-frame-alist '(width . 80)) + ;(add-to-list 'default-frame-alist '(height . 24)) + ;(add-to-list 'default-frame-alist ; High DPI Fix + ; `(font . ,(let ((dims (nth 1 (frame-monitor-attributes))) + ; (m (/ 1.0 388800.0)) (b (/ 23.0 3.0))) + ; (format "Iosevka-%d" (+ (* m (nth 3 dims) (nth 3 dims)) b))))) + +(setq doom-font (font-spec :family "Iosevka" :size 26 :weight 'regular) + doom-big-font (font-spec :family "Iosevka" :size 30 :weight 'regular) + doom-variable-pitch-font (font-spec :family "Overpass" :size 26)) + +(add-to-list 'default-frame-alist '(fullscreen . maximized)) diff --git a/emacs/.config/doom/packages.el b/emacs/.config/doom/packages.el index 75124e8..3a74535 100644 --- a/emacs/.config/doom/packages.el +++ b/emacs/.config/doom/packages.el @@ -13,6 +13,7 @@ (package! ef-themes) (package! nyan-mode) (package! w3m) +(package! ace-link) ;; To install a package directly from a remote git repo, you must specify a ;; `:recipe'. You'll find documentation on what `:recipe' accepts here: