From 1394b10658f5059aeb5fa45a2985f4cac97f833d Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 17 Jan 2022 13:45:32 -0600 Subject: So! Many! Changes!! --- init.el | 50 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 33 insertions(+), 17 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index a938db0..4eb8cdd 100644 --- a/init.el +++ b/init.el @@ -153,9 +153,11 @@ #'browse-url-default-browser) browse-url-new-window-flag nil browse-url-firefox-arguments '("--new-tab") - browse-url-firefox-new-window-is-tab t - ;; TODO: Add variables for other transformations and what-not. - +invidious-host "invidious.snopyta.org") + browse-url-firefox-new-window-is-tab t) + (defvar +invidious-host + ;; TODO: Add variables for other transformations and what-not. + "invidious.snopyta.org" + "Host for invidious instance.") ;; Set up external browsing URLs. (add-to-list '+custom-variable-allowlist '+browse-url-secondary-browser-regexps) @@ -182,7 +184,7 @@ (t #'eww-browse-url)) args))) (cons (rx (or ;; videos - "youtube.com" "youtu.be" (eval +invidious-host) "invidious" + "youtube.com" "youtu.be" "invidious" "yewtu.be" (seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos) ;; music "soundcloud.com" "bandcamp.com" @@ -281,12 +283,17 @@ (advice-add #'eval-region :around #'+eval-region@pulse)) (setup eshell - (:also-load +eshell - em-smart + (:also-load em-smart em-tramp) - (:option eshell-aliases-file (.etc "eshell/aliases" t) + (:require +eshell) + (+define-dir eshell/ (locate-user-emacs-file "eshell") + "Where to place Eshell-specific files.") + (:option eshell-aliases-file (eshell/ "aliases") + ;; What are these for??? + eshell-rc-script (eshell/ "profile") + eshell-login-script (eshell/ "login") eshell-destroy-buffer-when-process-dies t - eshell-directory-name (.etc "eshell/" t) + eshell-directory-name eshell/ eshell-error-if-no-glob t eshell-hist-ignore-dups t eshell-kill-on-exit nil @@ -298,9 +305,13 @@ eshell-smart-space-goes-to-end t eshell-where-to-jump 'begin eshell-banner-message "") - (setf (alist-get 'eshell-mode mwim-beginning-of-line-function) - #'eshell-bol) + (with-eval-after-load 'mwim + (setf (alist-get 'eshell-mode mwim-beginning-of-line-function) + #'eshell-bol)) (+eshell-eval-after-load + ;; Local modes + (dolist (mode '((hungry-delete-mode . -1))) + (funcall (car mode) (cdr mode))) ;; Set local settings (dolist (setting (list (cons 'outline-regexp eshell-prompt-regexp) (cons 'page-delimiter eshell-prompt-regexp) @@ -523,10 +534,11 @@ org-agenda-file-regexp org-agenda-templates)) (add-to-list '+custom-variable-allowlist var)) - (defvar org-agenda-files nil) - (add-to-list 'org-agenda-files (sync/ "org/" t)) + (with-eval-after-load 'org + (add-to-list 'org-agenda-files (sync/ "org/" t))) (:+leader "a" #'org-agenda "C-a" #'org-agenda) - (:hook #'hl-line-mode)) + (:hook #'hl-line-mode) + (add-hook 'org-agenda-after-show-hook 'org-narrow-to-subtree)) (setup org-capture (:require +org-capture) @@ -609,7 +621,8 @@ (:hook #'turn-on-auto-fill)) (setup time - (:option display-time-format "%H:%M" + ;; TODO: +display-time-mode with MOAR customizations + (:option display-time-format "%H:%M %a %e" display-time-default-load-average nil display-time-mail-file :disable) (display-time-mode +1)) @@ -1086,7 +1099,7 @@ See also `crux-reopen-as-root-mode'." (eshell-vterm-mode +1)) (setup (:straight-when exec-path-from-shell - (eq system-system 'linux)) + (eq system-type 'gnu/linux)) (require 'exec-path-from-shell) (dolist (var '("SSH_AUTH_SOCK" "SSH_AGENT_PID" @@ -1129,7 +1142,7 @@ See also `crux-reopen-as-root-mode'." (setup (:straight-when (forge :host github :repo "magit/forge") - (eq system-system 'linux)) + (eq system-type 'gnu/linux)) (require 'forge) (add-to-list 'forge-alist '("tildegit.org" "tildegit.org/api/v1" "tildegit.org" @@ -1284,6 +1297,7 @@ See also `crux-reopen-as-root-mode'." (minions-mode +1)) (setup (:straight (mode-line-bell + :host github :repo "purcell/mode-line-bell" :fork (:host github :repo "duckwork/mode-line-bell"))) (:option mode-line-bell-flash-time 0.1) (mode-line-bell-mode +1)) @@ -1388,6 +1402,7 @@ See also `crux-reopen-as-root-mode'." (setup (:straight sicp)) (setup (:straight (simple-modeline + :host github :repo "gexplorer/simple-modeline" :fork (:host github :repo "duckwork/simple-modeline"))) (:require +modeline) (:option +modeline-minions-icon ";" @@ -1637,9 +1652,10 @@ See also `crux-reopen-as-root-mode'." (:global "M-z" #'+zzz-to-char)) (setup (:straight (ytdious + :host github :repo "spiderbit/ytdious" :fork (:host github :repo "duckwork/ytdious"))) (:also-load +ytdious) (:option ytdious-invidious-api-url (if +invidious-host - (concat "https://" invidious-host) + (concat "https://" +invidious-host) "https://invidious.snopyta.org")) (:bind "y" #'+ytdious-watch)) -- cgit 1.4.1-21-gabe81