mu4e-dashboard
mu4e-dashboard copied to clipboard
feature: Implement sidebar
Hey again @rougier 👋
Just got this thrown together tonight. It implements sidebar functionality, à la NeoTree (in fact, it's mostly gutted NeoTree code 😅 )
I'm opening this as a draft to start the conversation early - there's clean up to do, rough edges to smooth out, and further functionality to add.
Take it for a spin: (setq mu4e-dashboard-file "~/path/to/your/dashboard.org")
and then try out mu4e-dashboard-show
, mu4e-dashboard-hide
, mu4e-dashboard-toggle-window
.
TODO
- [ ] When visiting a link, focus the result buffer
- [ ] Better window handling. It'd be nice if resulting headers (and any associated windows) were the only other window
Using a bit config like this, I can M-x mu4e-dashboard-show
to start my mail flow.
(use-package mu4e-dashboard
:ensure nil
:load-path "~/src/github.com/cmacrae/mu4e-dashboard"
:custom (mu4e-dashboard-file "~/org/mu4e-dashboard.org")
:bind
(:map mu4e-main-mode-map
("C-;" . mu4e-dashboard-show))
(:map mu4e-headers-mode-map
("C-;" . mu4e-dashboard-show)
("C-c C-;" . mu4e-dasboard-toggle-window))
(:map mu4e-dashboard-mode-map
("C-;" . (lambda () (interactive) (select-window (previous-window))))))
Visiting any links in the dashboard open in another window. You have the C-;
binding whilst in the mu4e-headers-mode
to focus (or show, if hidden) the sidebar, pressing C-;
again whilst in the sidebar will re-focus the last focussed window (the headers view). If you want to toggle the sidebar, you've also got C-c C-;
Nice ! By the way, there's pending PR for making dashboard a minor mode. I don't to what extent your PR will be compatible. Can you have multiple opened dashboards? Would that possible to have that as an option?
Ah great, I'll rebase that PR's branch onto mine 👍
As for multiple dashboards, I think that might be possible 🤔 I'll have a play around - what sort of setup were you thinking you'd like with multiple dashboards?
Personally I use a single dashboard, but if we have the option of having multiple dashboards, I wonder to what extent a sidebar would "cancel" that option. If we can still use the minor mode as intended I would be happy.