Display a filtered search from Elfeed in Dashboard widget.
- have up to 5 sections if user wants
- specify filters for each section to use
- open entry straight from dashboard in a popup buffer
You will need the following packages which are all available on Melpa:
- dashboard - https://github.com/emacs-dashboard/emacs-dashboard
- elfeed - https://github.com/skeeto/elfeed
- (optional) elfeed-org - https://github.com/remyhonig/elfeed-org
Currently, the package is not available on melpa yet, so you will have to use this repository. You can either clone it or use quelpa.
(use-package dashboard
:config
(use-package dashboard-elfeed
:load-path "/path/to/emacs-dashboard-elfeed"
:custom
(de/key "b")
(de/dashboard-search-filter "+friends")
:config
(add-to-list 'dashboard-item-generators '(elfeed . dashboard-elfeed))
(add-to-list 'dashboard-items '(elfeed) t))
(setq dashboard-items '((recents . 5)
(agenda . 5)
(elfeed . 1))))
(use-package dashboard
:config
(use-package dashboard-elfeed
:load-path "/path/to/emacs-dashboard-elfeed"
:custom
(de/key "b")
(de/dashboard-search-filter "+friends")
(de/dashboard-search-filter-1 "+me")
:config
(add-to-list 'dashboard-item-generators '(elfeed . dashboard-elfeed))
(add-to-list 'dashboard-items '(elfeed) t)
(add-to-list 'dashboard-item-generators '(elfeed-1 . dashboard-elfeed-1))
(add-to-list 'dashboard-items '(elfeed-1) t)
(add-to-list 'dashboard-item-generators '(elfeed-2 . dashboard-elfeed-2))
(add-to-list 'dashboard-items '(elfeed-2) t))
(setq dashboard-items '((recents . 5)
(agenda . 5)
(elfeed . 5)
(elfeed-1 . 1)
(elfeed-2 . 3))))
Variables the user can set:
(de/key "<key>")
– sets the dashboard shortcut jump key for the widget- default value is =” “=, effectively setting no key for the widget
- Any conflicts with other shortcuts (some that dashboard uses) will mess up the dashboard
(de/dashboard-search-filter "<filter terms>")
– set what the filter the widget should use- default value is =”@6-months-ago +unread”=
- Look at this for a better idea of filter terms
To add in another section, simply use the configuration for a singular and add -[1, 2, 3, 4]
to the
variable.
Eg:
- To add in a key for a second widget, do
(de/key-1 "c")
- For a third widget, do
(de/key-1 "o")
- [X] Ability for multiple widgets
- [ ] Have faces for color
- [ ] Prettify display
- [ ] Asynchronous updates
- [ ] Possibly cleaner code for duplicates
- Doesn’t update for new feeds (requires user manually updating first)
- If a feed published 2 entries with the same title and attributes, it won’t return them properly
- This is unlikely to happen, but it may be worth looking into hashtables
- Another possible solution (simpler/ foolproof) may be assigning an arbitrary key in display text
- When the user views the entry from dashboard, the entry is unmarked unread
Feel free to fork and make a pull request. I check github quite often, so I’ll reply if I want any clarification, and accept/ reject (rejections will receive a justified reason as to why they were rejected). Looking for contributors and maintainers!