From 6b9ec0057ff11549833e56a94a880d461b1477a4 Mon Sep 17 00:00:00 2001 From: coolneng Date: Sun, 18 Sep 2022 19:03:52 +0200 Subject: [PATCH] Open wallabag on its own workspace --- +ui.el | 5 +++++ config.el | 20 +++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/+ui.el b/+ui.el index 053a4c3..5e9de71 100644 --- a/+ui.el +++ b/+ui.el @@ -56,3 +56,8 @@ :when (featurep! :app rss) :face (:inherit (doom-dashboard-menu-title bold)) :action =rss) t) +(add-to-list '+doom-dashboard-menu-sections + '("Read saved articles" + :icon (all-the-icons-octicon "book" :face 'doom-dashboard-menu-title) + :face (:inherit (doom-dashboard-menu-title bold)) + :action =wallabag) t) diff --git a/config.el b/config.el index ab31be5..d6b1466 100644 --- a/config.el +++ b/config.el @@ -86,9 +86,23 @@ wallabag-show-entry-switch 'switch-to-buffer url-automatic-caching t) (add-hook 'wallabag-after-render-hook 'wallabag-search-update-and-clear-filter)) - (add-hook! 'doom-real-buffer-functions - (defun +rss-buffer-p (buf) - (string-match-p "^\\*wallabag" (buffer-name buf)))) +(add-hook! 'doom-real-buffer-functions + (defun +rss-buffer-p (buf) + (string-match-p "^\\*wallabag" (buffer-name buf)))) +(defvar +wallabag-workspace-name "*wallabag*") +(defun =wallabag () + "Activate (or switch to) `wallabag' in its workspace." + (interactive) + (if (modulep! :ui workspaces) + (progn + (+workspace-switch +wallabag-workspace-name t) + (doom/switch-to-scratch-buffer) + (wallabag) + (+workspace/display)) + (setq +wallabag--wconf (current-window-configuration)) + (delete-other-windows) + (switch-to-buffer (doom-fallback-buffer)) + (wallabag))) ;; Set up elfeed (after! elfeed (setq elfeed-use-curl t)