From 8faad955f9e8f90998cd5d7d0ae808f4b233b9e2 Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Wed, 22 Nov 2023 06:30:54 +0000 Subject: [PATCH] Quick fix for elfeed and citar customise not working Update EMMS binds to remove need for hydra, was overkill anyway Start adding Gnus config, aim to replace elfeed and mu4e eventually... --- home/emacs/init.el | 155 +++++++++++++++++++--------------------- home/emacs/init.org | 168 +++++++++++++++++++++----------------------- 2 files changed, 156 insertions(+), 167 deletions(-) diff --git a/home/emacs/init.el b/home/emacs/init.el index e3e08207..cf7490c0 100644 --- a/home/emacs/init.el +++ b/home/emacs/init.el @@ -332,53 +332,52 @@ )) (let ((citar-base-directory "~/References")) - (use-package citar - :ensure t - :bind (("C-c o c o" . citar-open)) - :config - (defvar citar-indicator-files-icons - (citar-indicator-create - :symbol (nerd-icons-octicon - "nf-oct-file" - :face 'nerd-icons-green - :v-adjust -0.1) - :function #'citar-has-files - :padding " " ; need this because the default padding is too low for these icons - :tag "has:files")) - (defvar citar-indicator-links-icons - (citar-indicator-create - :symbol (nerd-icons-octicon - "nf-oct-link" - :face 'nerd-icons-orange - :v-adjust 0.01) - :function #'citar-has-links - :padding " " - :tag "has:links")) - (defvar citar-indicator-notes-icons - (citar-indicator-create - :symbol (nerd-icons-octicon - "nf-oct-note" - :face 'nerd-icons-blue - :v-adjust -0.3) - :function #'citar-has-notes - :padding " " - :tag "has:notes")) - (defvar citar-indicator-cited-icons - (citar-indicator-create - :symbol (nerd-icons-octicon - "nf-oct-circle" - :face 'nerd-icon-green) - :function #'citar-is-cited - :padding " " - :tag "is:cited")) - :custom - (citar-bibliography (expand-file-name "main.bib" citar-base-directory)) - (citar-library-paths (list (expand-file-name "library" citar-base-directory))) - (citar-notes-paths (list (expand-file-name "notes" citar-base-directory))) - (citar-indicators (list citar-indicator-files-icons - citar-indicator-links-icons - citar-indicator-notes-icons - citar-indicator-cited-icons)))) + (setq citar-bibliography (expand-file-name "main.bib" citar-base-directory) + citar-library-paths (list (expand-file-name "library" citar-base-directory)) + citar-notes-paths (list (expand-file-name "notes" citar-base-directory)))) +(use-package citar + :ensure t + :bind (("C-c o c o" . citar-open)) + :config + (defvar citar-indicator-files-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-file" + :face 'nerd-icons-green + :v-adjust -0.1) + :function #'citar-has-files + :padding " " ; need this because the default padding is too low for these icons + :tag "has:files")) + (defvar citar-indicator-links-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-link" + :face 'nerd-icons-orange + :v-adjust 0.01) + :function #'citar-has-links + :padding " " + :tag "has:links")) + (defvar citar-indicator-notes-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-note" + :face 'nerd-icons-blue + :v-adjust -0.3) + :function #'citar-has-notes + :padding " " + :tag "has:notes")) + (defvar citar-indicator-cited-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-circle" + :face 'nerd-icon-green) + :function #'citar-is-cited + :padding " " + :tag "is:cited")) + (setq citar-indicators (list citar-indicator-files-icons + citar-indicator-links-icons + citar-indicator-notes-icons + citar-indicator-cited-icons))) (use-package khalel :hook (org-agenda-mode . khalel-import-events) @@ -571,6 +570,8 @@ :ensure t :hook prog-mode) +(setq gnus-select-method '(nnrss "http://www.fsf.org/static/fsforg/rss/news.xml")) + (setq sendmail-program (executable-find "msmtp") send-mail-function #'smtpmail-send-it message-sendmail-f-is-evil t @@ -663,21 +664,20 @@ (mu4e-alert-disable-mode-line-display)) (let ((elfeed-base-directory "~/.elfeed")) - (use-package elfeed - :bind (("C-c f f" . elfeed) - ("C-c f u" . elfeed-update)) - :hook (elfeed-search-mode . elfeed-update) - :custom - (elfeed-db-directory (expand-file-name "db" elfeed-base-directory)) - (elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)) - (rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))) - :config - (use-package elfeed-org - :ensure t - :config (elfeed-org)) - (use-package elfeed-tube - :ensure t - :config (elfeed-tube-setup)))) + (setq elfeed-db-directory (expand-file-name "db" elfeed-base-directory) + elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory) + rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory)))) +(use-package elfeed + :bind (("C-c f f" . elfeed) + ("C-c f u" . elfeed-update)) + :hook (elfeed-search-mode . elfeed-update) + :config + (use-package elfeed-org + :ensure t + :config (elfeed-org)) + (use-package elfeed-tube + :ensure t + :config (elfeed-tube-setup))) (use-package mastodon :commands mastodon @@ -704,27 +704,20 @@ :custom (ement-save-sessions t)) -(when (require 'emms-setup nil :noerror) - (setq emms-player-list '(emms-player-mpv) - emms-info-functions '(emms-info-native) - emms-source-file-default-directory "~/Music" - emms-lyrics-dir "~/Music/lyrics" - emms-mode-line-icon-color "white") - +(use-package emms + :bind (("C-c e e" . emms-smart-browse) + ("C-c e b" . emms-browser) + ("C-c e p" . emms-playlist-mode-go)) + :custom + (emms-player-list '(emms-player-mpv)) + (emms-info-functions '(emms-info-native)) + (emms-source-file-default-directory "~/Music") + (emms-lyrics-dir "~/Music/lyrics") + (emms-mode-line-icon-color "white") + :config (emms-all) (add-hook 'emms-player-started-hook #'emms-show) - (add-hook 'emms-player-paused-hook #'emms-show) - - (when (require 'hydra nil :noerror) - (defhydra emms (global-map "C-c e") - "emms" - ("b" emms-smart-browse) - ("d" emms-show) - ("s" emms-start) - ("S" emms-stop) - ("n" emms-next) - ("p" emms-previous) - ("P" emms-pause)))) + (add-hook 'emms-player-paused-hook #'emms-show)) (use-package subsonic :commands subsonic diff --git a/home/emacs/init.org b/home/emacs/init.org index 5506bcbc..e79d25f1 100644 --- a/home/emacs/init.org +++ b/home/emacs/init.org @@ -399,56 +399,55 @@ For reference information, see [[https://orgmode.com][Org-mode website]] )) #+END_SRC -** Citar +** TODO Citar #+begin_src emacs-lisp :results output silent (let ((citar-base-directory "~/References")) - (use-package citar - :ensure t - :bind (("C-c o c o" . citar-open)) - :config - (defvar citar-indicator-files-icons - (citar-indicator-create - :symbol (nerd-icons-octicon - "nf-oct-file" - :face 'nerd-icons-green - :v-adjust -0.1) - :function #'citar-has-files - :padding " " ; need this because the default padding is too low for these icons - :tag "has:files")) - (defvar citar-indicator-links-icons - (citar-indicator-create - :symbol (nerd-icons-octicon - "nf-oct-link" - :face 'nerd-icons-orange - :v-adjust 0.01) - :function #'citar-has-links - :padding " " - :tag "has:links")) - (defvar citar-indicator-notes-icons - (citar-indicator-create - :symbol (nerd-icons-octicon - "nf-oct-note" - :face 'nerd-icons-blue - :v-adjust -0.3) - :function #'citar-has-notes - :padding " " - :tag "has:notes")) - (defvar citar-indicator-cited-icons - (citar-indicator-create - :symbol (nerd-icons-octicon - "nf-oct-circle" - :face 'nerd-icon-green) - :function #'citar-is-cited - :padding " " - :tag "is:cited")) - :custom - (citar-bibliography (expand-file-name "main.bib" citar-base-directory)) - (citar-library-paths (list (expand-file-name "library" citar-base-directory))) - (citar-notes-paths (list (expand-file-name "notes" citar-base-directory))) - (citar-indicators (list citar-indicator-files-icons - citar-indicator-links-icons - citar-indicator-notes-icons - citar-indicator-cited-icons)))) + (setq citar-bibliography (expand-file-name "main.bib" citar-base-directory) + citar-library-paths (list (expand-file-name "library" citar-base-directory)) + citar-notes-paths (list (expand-file-name "notes" citar-base-directory)))) + (use-package citar + :ensure t + :bind (("C-c o c o" . citar-open)) + :config + (defvar citar-indicator-files-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-file" + :face 'nerd-icons-green + :v-adjust -0.1) + :function #'citar-has-files + :padding " " ; need this because the default padding is too low for these icons + :tag "has:files")) + (defvar citar-indicator-links-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-link" + :face 'nerd-icons-orange + :v-adjust 0.01) + :function #'citar-has-links + :padding " " + :tag "has:links")) + (defvar citar-indicator-notes-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-note" + :face 'nerd-icons-blue + :v-adjust -0.3) + :function #'citar-has-notes + :padding " " + :tag "has:notes")) + (defvar citar-indicator-cited-icons + (citar-indicator-create + :symbol (nerd-icons-octicon + "nf-oct-circle" + :face 'nerd-icon-green) + :function #'citar-is-cited + :padding " " + :tag "is:cited")) + (setq citar-indicators (list citar-indicator-files-icons + citar-indicator-links-icons + citar-indicator-notes-icons + citar-indicator-cited-icons))) #+end_src ** Khalel @@ -683,6 +682,11 @@ For reference information, see [[https://orgmode.com][Org-mode website]] #+end_src * Internet + +** TODO Gnus +#+begin_src emacs-lisp :tangle yes + (setq gnus-select-method '(nnrss "http://www.fsf.org/static/fsforg/rss/news.xml")) +#+end_src ** TODO Email #+BEGIN_SRC emacs-lisp (setq sendmail-program (executable-find "msmtp") @@ -778,24 +782,23 @@ For reference information, see [[https://orgmode.com][Org-mode website]] #+END_SRC -** Feeds +** TODO Feeds #+BEGIN_SRC emacs-lisp (let ((elfeed-base-directory "~/.elfeed")) - (use-package elfeed - :bind (("C-c f f" . elfeed) - ("C-c f u" . elfeed-update)) - :hook (elfeed-search-mode . elfeed-update) - :custom - (elfeed-db-directory (expand-file-name "db" elfeed-base-directory)) - (elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)) - (rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))) - :config - (use-package elfeed-org - :ensure t - :config (elfeed-org)) - (use-package elfeed-tube - :ensure t - :config (elfeed-tube-setup)))) + (setq elfeed-db-directory (expand-file-name "db" elfeed-base-directory) + elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory) + rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory)))) + (use-package elfeed + :bind (("C-c f f" . elfeed) + ("C-c f u" . elfeed-update)) + :hook (elfeed-search-mode . elfeed-update) + :config + (use-package elfeed-org + :ensure t + :config (elfeed-org)) + (use-package elfeed-tube + :ensure t + :config (elfeed-tube-setup))) #+END_SRC ** Social @@ -832,34 +835,27 @@ For reference information, see [[https://orgmode.com][Org-mode website]] #+end_src -* [1/2] Media +* Media -** TODO EMMS +** EMMS #+BEGIN_SRC emacs-lisp - (when (require 'emms-setup nil :noerror) - (setq emms-player-list '(emms-player-mpv) - emms-info-functions '(emms-info-native) - emms-source-file-default-directory "~/Music" - emms-lyrics-dir "~/Music/lyrics" - emms-mode-line-icon-color "white") - + (use-package emms + :bind (("C-c e e" . emms-smart-browse) + ("C-c e b" . emms-browser) + ("C-c e p" . emms-playlist-mode-go)) + :custom + (emms-player-list '(emms-player-mpv)) + (emms-info-functions '(emms-info-native)) + (emms-source-file-default-directory "~/Music") + (emms-lyrics-dir "~/Music/lyrics") + (emms-mode-line-icon-color "white") + :config (emms-all) (add-hook 'emms-player-started-hook #'emms-show) - (add-hook 'emms-player-paused-hook #'emms-show) - - (when (require 'hydra nil :noerror) - (defhydra emms (global-map "C-c e") - "emms" - ("b" emms-smart-browse) - ("d" emms-show) - ("s" emms-start) - ("S" emms-stop) - ("n" emms-next) - ("p" emms-previous) - ("P" emms-pause)))) + (add-hook 'emms-player-paused-hook #'emms-show)) #+END_SRC -** DONE subsonic.el +** subsonic.el #+begin_src emacs-lisp :tangle yes (use-package subsonic :commands subsonic