From 612c16f18adff4cfdddd0128e50691061cbd3fab Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:32:10 -0600 Subject: Remove spurious auth-info files --- init.el | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index bf80b5b..1c769c2 100644 --- a/init.el +++ b/init.el @@ -56,10 +56,7 @@ (+ensure-after-init #'+key-global-mode)) (setup (:require auth-source) - (:option auth-sources (list (private/ "authinfo") - (private/ "authinfo.gpg") - "~/.authinfo" - "~/.authinfo.gpg"))) + (:option auth-sources (list (private/ "authinfo")))) (setup (:require goto-addr) (if (fboundp #'global-goto-address-mode) -- cgit 1.4.1-21-gabe81 From ae6ac318265181a05fe977274d5b0c5d94f5c46b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:32:20 -0600 Subject: Correct typo --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.el') diff --git a/init.el b/init.el index 1c769c2..b35367c 100644 --- a/init.el +++ b/init.el @@ -136,7 +136,7 @@ (cons (+browse-url-secondary-browser-regexps-combine) ; non-text websites browse-url-secondary-browser-function) (cons "." ; everything else - browse-url-browser-function))) + +browse-url-browser-function))) ;; Transform URLs before passing to `browse-url' (:option +browse-url-transformations `((,(rx "//" (or "youtube.com" "youtu.be")) -- cgit 1.4.1-21-gabe81 From 6939d3cffcd44df91065c89699153983b17f317c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:32:31 -0600 Subject: Configure dired --- init.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'init.el') diff --git a/init.el b/init.el index b35367c..2651d14 100644 --- a/init.el +++ b/init.el @@ -190,11 +190,16 @@ dired+) (:option dired-recursive-copies 'always dired-recursive-deletes 'always - dired-create-destination-dirs 'ask + dired-create-destination-dirs 'always + dired-do-revert-buffer t + dired-hide-details-hide-symlink-targets nil + dired-isearch-filenames 'dwim delete-by-moving-to-trash t + dired-auto-revert-buffer t dired-listing-switches "-Al" ls-lisp-dirs-first t dired-ls-F-marks-symlinks t + dired-clean-confirm-killing-deleted-buffers nil dired-no-confirm '(byte-compile load chgrp chmod chown copy move hardlink symlink -- cgit 1.4.1-21-gabe81 From 0ef125fb4de7f624edc9e66e7491deb329cbafd4 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:32:41 -0600 Subject: Add imenu-generic-expression to eshell --- init.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'init.el') diff --git a/init.el b/init.el index 2651d14..e7d9d9e 100644 --- a/init.el +++ b/init.el @@ -258,8 +258,14 @@ (add-hook 'eshell-mode-hook (defun +eshell@setup () "Eshell improperly does loading. Gah." + (interactive) (dolist (setting `((outline-regexp . ,eshell-prompt-regexp) - (page-delimiter . ,eshell-prompt-regexp))) + (page-delimiter . ,eshell-prompt-regexp) + (imenu-generic-expression + . ,`(("Prompt" + ,(concat eshell-prompt-regexp + "\\(.*\\)") + 1))))) (set (make-local-variable (car setting)) (cdr setting))) (dolist (binding `(("C-d" . +eshell-quit-or-delete-char))) (define-key eshell-mode-map -- cgit 1.4.1-21-gabe81 From 0f437d1346856cf15300f767ef80ff749048461c Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:36:52 -0600 Subject: Break out forge config into its own thing --- init.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index e7d9d9e..36bfff0 100644 --- a/init.el +++ b/init.el @@ -336,14 +336,7 @@ ;; This setup is weird because of dependency issues (:straight (transient :host github :repo "magit/transient" :branch "master") (magit :host github :repo "magit/magit") - (git-modes :host github :repo "magit/git-modes")) - (when (eq system-type 'gnu/linux) - (:straight (forge :host github :repo "magit/forge")) - (with-eval-after-load 'magit - (require 'forge) - (add-to-list 'forge-alist - '("tildegit.org" "tildegit.org/api/v1" "tildegit.org" - forge-gitea-repository))))) + (git-modes :host github :repo "magit/git-modes"))) (setup minibuffer (:require +minibuffer) @@ -897,6 +890,14 @@ See also `crux-reopen-as-root-mode'." :repo "duckwork/filldent.el")) (:+key "M-q" #'filldent-dwim)) +(setup (:straight-when (forge + :host github :repo "magit/forge") + (eq system-type 'gnu/linux)) + (require 'forge) + (add-to-list 'forge-alist + '("tildegit.org" "tildegit.org/api/v1" "tildegit.org" + forge-gitea-repository))) + (setup (:straight (frowny :host github :repo "duckwork/frowny.el")) -- cgit 1.4.1-21-gabe81 From e0318de85888e316d723da8e7baf642c7961caa2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:37:34 -0600 Subject: Better-configure elfeed --- init.el | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 36bfff0..d2997fb 100644 --- a/init.el +++ b/init.el @@ -826,19 +826,32 @@ See also `crux-reopen-as-root-mode'." (setup (:straight elfeed) (:also-load +elfeed) - (:option elfeed-use-curl t - elfeed-curl-extra-arguments '("--insecure") - elfeed-show-unique-buffers t - elfeed-db-directory (sync/ "elfeed/db/" t)) + (+define-dir elfeed/ (sync/ "emacs/elfeed/" t)) + (:option + elfeed-curl-program-name (executable-find "curl") + elfeed-use-curl elfeed-curl-program-name + elfeed-curl-extra-arguments '("--insecure") + elfeed-enclosure-default-dir (cl-loop for dir in '("~/var/download/" + "~/Downloads/") + if (file-exists-p dir) + return dir) + elfeed-search-filter "@1-month-ago +unread" + elfeed-search-trailing-width 24 + elfeed-search-title-min-width 24 + elfeed-search-title-max-width 78 + elfeed-show-unique-buffers t + elfeed-db-directory (elfeed/ "db/" t)) ;; https://old.reddit.com/r/emacs/comments/rlli0u/whats_your_favorite_defadvice/hphfh4e/ (advice-add #'elfeed-search-update--force :after #'elfeed-db-save) (:with-mode elfeed-show-mode (:bind "SPC" #'+elfeed-scroll-up-command "S-SPC" #'+elfeed-scroll-down-command) - (:hook #'reading-mode))) + (:hook #'reading-mode) + (define-advice elfeed-show-entry (:after (&rest _)) + (run-at-time 0 nil #'elfeed-show-refresh)))) (setup (:straight elfeed-org) - (:option rmh-elfeed-org-files (list (sync/ "elfeed/elfeed.org" t))) + (:option rmh-elfeed-org-files (list (elfeed/ "/elfeed.org" t))) (elfeed-org)) (setup (:straight embark) -- cgit 1.4.1-21-gabe81 From 010a6ce839edbb254baccecad5d7293c66fc02c2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:37:46 -0600 Subject: Add elpher --- init.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index d2997fb..475ba7e 100644 --- a/init.el +++ b/init.el @@ -854,6 +854,8 @@ See also `crux-reopen-as-root-mode'." (:option rmh-elfeed-org-files (list (elfeed/ "/elfeed.org" t))) (elfeed-org)) +(setup (:straight elpher)) + (setup (:straight embark) (:option prefix-help-command 'embark-prefix-help-command) (:+key "C-." #'embark-act -- cgit 1.4.1-21-gabe81 From a808b5bf015b581f087992c60224c5231de19195 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:37:58 -0600 Subject: Add eshell-bookmark --- init.el | 3 +++ 1 file changed, 3 insertions(+) (limited to 'init.el') diff --git a/init.el b/init.el index 475ba7e..cf5281c 100644 --- a/init.el +++ b/init.el @@ -879,6 +879,9 @@ See also `crux-reopen-as-root-mode'." (:hook-into emacs-lisp-mode lisp-interaction-mode)) +(setup (:straight eshell-bookmark) + (add-hook 'eshell-mode-hook #'eshell-bookmark-setup)) + (setup (:straight eshell-syntax-highlighting) (:hook-into eshell-mode)) -- cgit 1.4.1-21-gabe81 From a67110aefa1d16f7ccb65682b750e4403255c71f Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 3 Jan 2022 22:38:07 -0600 Subject: Don't confirm anything with pdf-tools-install --- init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'init.el') diff --git a/init.el b/init.el index cf5281c..5707ab6 100644 --- a/init.el +++ b/init.el @@ -1104,7 +1104,7 @@ See also `crux-reopen-as-root-mode'." (setup (:straight-when pdf-tools (eq system-type 'gnu/linux)) - (pdf-tools-install)) + (pdf-tools-install t)) (setup (:straight (shell-command+ :host nil -- cgit 1.4.1-21-gabe81 From e9a1034f8c942187ecccdf93e5d3be8c073a79b2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 4 Jan 2022 00:40:11 -0600 Subject: Move stuff around --- init.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 5707ab6..c9cf3c7 100644 --- a/init.el +++ b/init.el @@ -21,20 +21,19 @@ private)) (require (or (car-safe feature) feature) (cdr-safe feature) :noerror)) -(setq debug-on-error t) +(setq debug-on-error (memq system-type '(msdos windows-nt))) (setup (:require +emacs) - (:also-load +lisp) ;; +emacs.el contains super-basic defaults that are basically necessary for ;; good functioning. In this block, I add extra things or more "experimental" ;; ones that might not belong in a separate file. + (:also-load +lisp) (:option truncate-string-ellipsis "…") ;; Bindings (:global "C-x C-k" #'kill-current-buffer "C-x 4 n" #'clone-buffer "C-c v" #'visible-mode - "C-M-;" #'+lisp-comment-or-uncomment-sexp - "" #'consult-buffer) + "C-M-;" #'+lisp-comment-or-uncomment-sexp) ;; Unbind stuff, too. (dolist (key '("C-M-j" "M-j")) -- cgit 1.4.1-21-gabe81 From 800aff834253b7aba899a0202ed36e5f5f161476 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 4 Jan 2022 00:40:26 -0600 Subject: Add more crux stuff --- init.el | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index c9cf3c7..7a98669 100644 --- a/init.el +++ b/init.el @@ -774,8 +774,15 @@ (:option consult--regexp-compiler 'consult--orderless-regexp-compiler)))) (setup (:straight crux) - (:+key "C-o" #'crux-smart-open-line - "C-x 4 t" #'crux-transpose-windows) + ;; yes it's silly I have an addon to this addon. + (:also-load +crux) + (:option crux-shell-func #'crux-eshell) + (:global "C-o" #'crux-smart-open-line + "C-x 4 t" #'crux-transpose-windows + "M-w" #'+crux-kill-ring-save + "C-k" #'crux-kill-and-join-forward + "C-c d" #'+crux-insert-date-or-time) + (:+leader "s" #'crux-visit-shell-buffer) (el-patch-feature crux) (with-eval-after-load 'crux -- cgit 1.4.1-21-gabe81 From 20e6b48dfb5e15f061b5e79c448b2ed9ea2ab087 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 4 Jan 2022 00:40:34 -0600 Subject: Bind transpose-frame commands --- init.el | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'init.el') diff --git a/init.el b/init.el index 7a98669..9a61502 100644 --- a/init.el +++ b/init.el @@ -1193,7 +1193,18 @@ See also `crux-reopen-as-root-mode'." 0)))) (funcall topsy-fn)))))) -(setup (:straight transpose-frame)) +(setup (:straight transpose-frame) + (defvar +transpose-frame-map + (let ((map (make-sparse-keymap))) + (dolist (bind '(("t" . transpose-frame) + ("v" . flip-frame) + ("h" . flop-frame) + ("r" . rotate-frame-clockwise) + ("R" . rotate-frame-anticlockwise))) + (define-key map (car bind) (cdr bind))) + map) + "Map for transposing frames.") + (define-key +key-mode-map (kbd "C-x 5 t") +transpose-frame-map)) (setup (:straight trashed) (:option trashed-action-confirmer #'y-or-n-p)) -- cgit 1.4.1-21-gabe81 From 58976a25718a91bec85769d8dddefc25530b130b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Tue, 4 Jan 2022 00:40:50 -0600 Subject: Clean up whitespace regardless --- init.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'init.el') diff --git a/init.el b/init.el index 9a61502..1376ecb 100644 --- a/init.el +++ b/init.el @@ -1252,7 +1252,8 @@ See also `crux-reopen-as-root-mode'." (:require vlf-setup)) (setup (:straight whitespace-cleanup-mode) - (:option whitespace-cleanup-mode-preserve-point t) + (:option whitespace-cleanup-mode-preserve-point t + whitespace-cleanup-mode-only-if-initially-clean nil) (global-whitespace-cleanup-mode +1)) (setup (:straight zoom-frm)) -- cgit 1.4.1-21-gabe81