From 1e5c351253784ca3bd05c9e0db1e9dc53ab9a1e1 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Thu, 27 Jan 2022 19:26:33 -0600 Subject: Whose birthday is it? --- init.el | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 51 insertions(+), 11 deletions(-) (limited to 'init.el') diff --git a/init.el b/init.el index 526f2dd..d2c41dd 100644 --- a/init.el +++ b/init.el @@ -402,7 +402,9 @@ (setup ispell (:also-load +ispell) - (put 'ispell-buffer-session-localwords 'safe-local-variable #'+ispell-safe-local-p)) + (put 'ispell-buffer-session-localwords + 'safe-local-variable #'+ispell-safe-local-p) + (add-hook 'user-save-hook #'+ispell-move-buffer-words-to-dir-locals-hook)) (setup kmacro (:also-load +kmacro) @@ -1093,7 +1095,8 @@ See also `crux-reopen-as-root-mode'." (setup (:straight electric-cursor) (:option electric-cursor-alist '((overwrite-mode . hbar) - (god-local-mode . box))) + (god-local-mode . box) + (t . bar))) (electric-cursor-mode +1)) (setup (:straight elfeed) @@ -1164,10 +1167,35 @@ See also `crux-reopen-as-root-mode'." (setup (:straight emms) ;; TODO: Definitely need to do more customization here - (:option emms-source-file-default-directory "~/var/music/") + (:option emms-source-file-default-directory "~/var/music/" + emms-player-mpv-update-metadata t + emms-player-mpv-ipc-method 'file) (require 'emms-setup) (emms-all) - (emms-default-players)) + (emms-default-players) + ;; Streaming + (require 'emms-streams) + (:option emms-streams-file (sync/ "emacs/streams.emms")) + ;; Mode line + (:option emms-mode-line-icon-enabled-p t + emms-mode-line-format "%s" + emms-mode-line-mode-line-function ;#'emms-mode-line-icon-function + (defun +emms-mode-line-truncate () + (let ((current-trunc (concat "[ " + (+string-truncate + (emms-mode-line-playlist-current) + 24) + " ] "))) + (if emms-mode-line-icon-enabled-p + (concat " " + emms-mode-line-icon-before-format + (emms-propertize "🎵:" 'display + (emms-mode-line-icon-generate + emms-mode-line-icon-color)) + current-trunc) + current-trunc)))) + (emms-mode-line-mode +1) + (emms-playing-time-mode -1)) (setup (:straight epithet) (dolist (hook '(Info-selection-hook @@ -1223,15 +1251,17 @@ See also `crux-reopen-as-root-mode'." :repo "duckwork/filldent.el")) (:+key "M-q" #'filldent-dwim)) -(setup (:straight flyspell-correct) +(setup (:straight (flyspell-correct + :fork (:host github :repo "duckwork/flyspell-correct" + :branch "metadata-category"))) (:load-after flyspell) (:also-load +flyspell-correct) (:option flyspell-correct--cr-key ";") (:bind-into flyspell "C-;" #'flyspell-correct-wrapper "" #'+flyspell-correct-buffer) - (with-eval-after-load 'vertico-multiform - (setf (alist-get 'flyspell-correct-wrapper vertico-multiform-commands) nil))) + (+with-ensure-after-init ; vertico-multiform + (setf (alist-get 'flyspell vertico-multiform-categories) nil))) (setup (:straight-when (forge :host github :repo "magit/forge") @@ -1358,9 +1388,9 @@ See also `crux-reopen-as-root-mode'." :host nil))) (:also-load +jabber) (:option jabber-account-list '(("acdw@hmm.st")) - jabber-groupchat-buffer-format "%n" - jabber-chat-buffer-format "%n" - jabber-muc-private-buffer-format "%n (%g)" + jabber-groupchat-buffer-format "xmpp:%n" + jabber-chat-buffer-format "xmpp:%n" + jabber-muc-private-buffer-format "xmpp:%n(%g)" jabber-activity-show-p #'ignore) (dolist (mode '(jabber-chat-mode jabber-browse-mode @@ -1725,7 +1755,10 @@ See also `crux-reopen-as-root-mode'." (completion-at-point flat) (indent-for-tab-command flat) (consult-buffer flat) - (insert-char)) + (insert-char) + (flyspell-correct-wrapper) + (+flyspell-correct-buffer) + (flyspell-correct-move)) ;; This is applied /after/ the above, so default is at the end of ;; this alist. vertico-multiform-categories '((file buffer grid) @@ -1824,3 +1857,10 @@ See also `crux-reopen-as-root-mode'." (:require +zzz-to-char) (:option zzz-to-char-reach (+bytes 1 :kib)) (:global "M-z" #'+zzz-to-char)) + +(setup (:straight org-download) + (:option org-download-method 'attach + org-download-backend (cond ((executable-find "curl") 'curl) + ((executable-find "wget") 'wget) + (:else 'url-retrieve))) + (add-hook 'dired-mode-hook 'org-download-enable)) -- cgit 1.4.1-21-gabe81