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...
This commit is contained in:
Evie Litherland-Smith 2023-11-22 06:30:54 +00:00
parent 89fbcb8af2
commit 8faad955f9
2 changed files with 156 additions and 167 deletions

View file

@ -332,53 +332,52 @@
)) ))
(let ((citar-base-directory "~/References")) (let ((citar-base-directory "~/References"))
(use-package citar (setq citar-bibliography (expand-file-name "main.bib" citar-base-directory)
:ensure t citar-library-paths (list (expand-file-name "library" citar-base-directory))
:bind (("C-c o c o" . citar-open)) citar-notes-paths (list (expand-file-name "notes" citar-base-directory))))
:config (use-package citar
(defvar citar-indicator-files-icons :ensure t
(citar-indicator-create :bind (("C-c o c o" . citar-open))
:symbol (nerd-icons-octicon :config
"nf-oct-file" (defvar citar-indicator-files-icons
:face 'nerd-icons-green (citar-indicator-create
:v-adjust -0.1) :symbol (nerd-icons-octicon
:function #'citar-has-files "nf-oct-file"
:padding " " ; need this because the default padding is too low for these icons :face 'nerd-icons-green
:tag "has:files")) :v-adjust -0.1)
(defvar citar-indicator-links-icons :function #'citar-has-files
(citar-indicator-create :padding " " ; need this because the default padding is too low for these icons
:symbol (nerd-icons-octicon :tag "has:files"))
"nf-oct-link" (defvar citar-indicator-links-icons
:face 'nerd-icons-orange (citar-indicator-create
:v-adjust 0.01) :symbol (nerd-icons-octicon
:function #'citar-has-links "nf-oct-link"
:padding " " :face 'nerd-icons-orange
:tag "has:links")) :v-adjust 0.01)
(defvar citar-indicator-notes-icons :function #'citar-has-links
(citar-indicator-create :padding " "
:symbol (nerd-icons-octicon :tag "has:links"))
"nf-oct-note" (defvar citar-indicator-notes-icons
:face 'nerd-icons-blue (citar-indicator-create
:v-adjust -0.3) :symbol (nerd-icons-octicon
:function #'citar-has-notes "nf-oct-note"
:padding " " :face 'nerd-icons-blue
:tag "has:notes")) :v-adjust -0.3)
(defvar citar-indicator-cited-icons :function #'citar-has-notes
(citar-indicator-create :padding " "
:symbol (nerd-icons-octicon :tag "has:notes"))
"nf-oct-circle" (defvar citar-indicator-cited-icons
:face 'nerd-icon-green) (citar-indicator-create
:function #'citar-is-cited :symbol (nerd-icons-octicon
:padding " " "nf-oct-circle"
:tag "is:cited")) :face 'nerd-icon-green)
:custom :function #'citar-is-cited
(citar-bibliography (expand-file-name "main.bib" citar-base-directory)) :padding " "
(citar-library-paths (list (expand-file-name "library" citar-base-directory))) :tag "is:cited"))
(citar-notes-paths (list (expand-file-name "notes" citar-base-directory))) (setq citar-indicators (list citar-indicator-files-icons
(citar-indicators (list citar-indicator-files-icons citar-indicator-links-icons
citar-indicator-links-icons citar-indicator-notes-icons
citar-indicator-notes-icons citar-indicator-cited-icons)))
citar-indicator-cited-icons))))
(use-package khalel (use-package khalel
:hook (org-agenda-mode . khalel-import-events) :hook (org-agenda-mode . khalel-import-events)
@ -571,6 +570,8 @@
:ensure t :ensure t
:hook prog-mode) :hook prog-mode)
(setq gnus-select-method '(nnrss "http://www.fsf.org/static/fsforg/rss/news.xml"))
(setq sendmail-program (executable-find "msmtp") (setq sendmail-program (executable-find "msmtp")
send-mail-function #'smtpmail-send-it send-mail-function #'smtpmail-send-it
message-sendmail-f-is-evil t message-sendmail-f-is-evil t
@ -663,21 +664,20 @@
(mu4e-alert-disable-mode-line-display)) (mu4e-alert-disable-mode-line-display))
(let ((elfeed-base-directory "~/.elfeed")) (let ((elfeed-base-directory "~/.elfeed"))
(use-package elfeed (setq elfeed-db-directory (expand-file-name "db" elfeed-base-directory)
:bind (("C-c f f" . elfeed) elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)
("C-c f u" . elfeed-update)) rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))))
:hook (elfeed-search-mode . elfeed-update) (use-package elfeed
:custom :bind (("C-c f f" . elfeed)
(elfeed-db-directory (expand-file-name "db" elfeed-base-directory)) ("C-c f u" . elfeed-update))
(elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)) :hook (elfeed-search-mode . elfeed-update)
(rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))) :config
:config (use-package elfeed-org
(use-package elfeed-org :ensure t
:ensure t :config (elfeed-org))
:config (elfeed-org)) (use-package elfeed-tube
(use-package elfeed-tube :ensure t
:ensure t :config (elfeed-tube-setup)))
:config (elfeed-tube-setup))))
(use-package mastodon (use-package mastodon
:commands mastodon :commands mastodon
@ -704,27 +704,20 @@
:custom :custom
(ement-save-sessions t)) (ement-save-sessions t))
(when (require 'emms-setup nil :noerror) (use-package emms
(setq emms-player-list '(emms-player-mpv) :bind (("C-c e e" . emms-smart-browse)
emms-info-functions '(emms-info-native) ("C-c e b" . emms-browser)
emms-source-file-default-directory "~/Music" ("C-c e p" . emms-playlist-mode-go))
emms-lyrics-dir "~/Music/lyrics" :custom
emms-mode-line-icon-color "white") (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) (emms-all)
(add-hook 'emms-player-started-hook #'emms-show) (add-hook 'emms-player-started-hook #'emms-show)
(add-hook 'emms-player-paused-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))))
(use-package subsonic (use-package subsonic
:commands subsonic :commands subsonic

View file

@ -399,56 +399,55 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
)) ))
#+END_SRC #+END_SRC
** Citar ** TODO Citar
#+begin_src emacs-lisp :results output silent #+begin_src emacs-lisp :results output silent
(let ((citar-base-directory "~/References")) (let ((citar-base-directory "~/References"))
(use-package citar (setq citar-bibliography (expand-file-name "main.bib" citar-base-directory)
:ensure t citar-library-paths (list (expand-file-name "library" citar-base-directory))
:bind (("C-c o c o" . citar-open)) citar-notes-paths (list (expand-file-name "notes" citar-base-directory))))
:config (use-package citar
(defvar citar-indicator-files-icons :ensure t
(citar-indicator-create :bind (("C-c o c o" . citar-open))
:symbol (nerd-icons-octicon :config
"nf-oct-file" (defvar citar-indicator-files-icons
:face 'nerd-icons-green (citar-indicator-create
:v-adjust -0.1) :symbol (nerd-icons-octicon
:function #'citar-has-files "nf-oct-file"
:padding " " ; need this because the default padding is too low for these icons :face 'nerd-icons-green
:tag "has:files")) :v-adjust -0.1)
(defvar citar-indicator-links-icons :function #'citar-has-files
(citar-indicator-create :padding " " ; need this because the default padding is too low for these icons
:symbol (nerd-icons-octicon :tag "has:files"))
"nf-oct-link" (defvar citar-indicator-links-icons
:face 'nerd-icons-orange (citar-indicator-create
:v-adjust 0.01) :symbol (nerd-icons-octicon
:function #'citar-has-links "nf-oct-link"
:padding " " :face 'nerd-icons-orange
:tag "has:links")) :v-adjust 0.01)
(defvar citar-indicator-notes-icons :function #'citar-has-links
(citar-indicator-create :padding " "
:symbol (nerd-icons-octicon :tag "has:links"))
"nf-oct-note" (defvar citar-indicator-notes-icons
:face 'nerd-icons-blue (citar-indicator-create
:v-adjust -0.3) :symbol (nerd-icons-octicon
:function #'citar-has-notes "nf-oct-note"
:padding " " :face 'nerd-icons-blue
:tag "has:notes")) :v-adjust -0.3)
(defvar citar-indicator-cited-icons :function #'citar-has-notes
(citar-indicator-create :padding " "
:symbol (nerd-icons-octicon :tag "has:notes"))
"nf-oct-circle" (defvar citar-indicator-cited-icons
:face 'nerd-icon-green) (citar-indicator-create
:function #'citar-is-cited :symbol (nerd-icons-octicon
:padding " " "nf-oct-circle"
:tag "is:cited")) :face 'nerd-icon-green)
:custom :function #'citar-is-cited
(citar-bibliography (expand-file-name "main.bib" citar-base-directory)) :padding " "
(citar-library-paths (list (expand-file-name "library" citar-base-directory))) :tag "is:cited"))
(citar-notes-paths (list (expand-file-name "notes" citar-base-directory))) (setq citar-indicators (list citar-indicator-files-icons
(citar-indicators (list citar-indicator-files-icons citar-indicator-links-icons
citar-indicator-links-icons citar-indicator-notes-icons
citar-indicator-notes-icons citar-indicator-cited-icons)))
citar-indicator-cited-icons))))
#+end_src #+end_src
** Khalel ** Khalel
@ -683,6 +682,11 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
#+end_src #+end_src
* Internet * 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 ** TODO Email
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq sendmail-program (executable-find "msmtp") (setq sendmail-program (executable-find "msmtp")
@ -778,24 +782,23 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
#+END_SRC #+END_SRC
** Feeds ** TODO Feeds
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(let ((elfeed-base-directory "~/.elfeed")) (let ((elfeed-base-directory "~/.elfeed"))
(use-package elfeed (setq elfeed-db-directory (expand-file-name "db" elfeed-base-directory)
:bind (("C-c f f" . elfeed) elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)
("C-c f u" . elfeed-update)) rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))))
:hook (elfeed-search-mode . elfeed-update) (use-package elfeed
:custom :bind (("C-c f f" . elfeed)
(elfeed-db-directory (expand-file-name "db" elfeed-base-directory)) ("C-c f u" . elfeed-update))
(elfeed-enclosure-default-dir (expand-file-name "enclosures" elfeed-base-directory)) :hook (elfeed-search-mode . elfeed-update)
(rmh-elfeed-org-files (list (expand-file-name "feeds.org" elfeed-base-directory))) :config
:config (use-package elfeed-org
(use-package elfeed-org :ensure t
:ensure t :config (elfeed-org))
:config (elfeed-org)) (use-package elfeed-tube
(use-package elfeed-tube :ensure t
:ensure t :config (elfeed-tube-setup)))
:config (elfeed-tube-setup))))
#+END_SRC #+END_SRC
** Social ** Social
@ -832,34 +835,27 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
#+end_src #+end_src
* [1/2] Media * Media
** TODO EMMS ** EMMS
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(when (require 'emms-setup nil :noerror) (use-package emms
(setq emms-player-list '(emms-player-mpv) :bind (("C-c e e" . emms-smart-browse)
emms-info-functions '(emms-info-native) ("C-c e b" . emms-browser)
emms-source-file-default-directory "~/Music" ("C-c e p" . emms-playlist-mode-go))
emms-lyrics-dir "~/Music/lyrics" :custom
emms-mode-line-icon-color "white") (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) (emms-all)
(add-hook 'emms-player-started-hook #'emms-show) (add-hook 'emms-player-started-hook #'emms-show)
(add-hook 'emms-player-paused-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))))
#+END_SRC #+END_SRC
** DONE subsonic.el ** subsonic.el
#+begin_src emacs-lisp :tangle yes #+begin_src emacs-lisp :tangle yes
(use-package subsonic (use-package subsonic
:commands subsonic :commands subsonic