From ebf18a5209aaf6f79baa536a0686441b60930d5f Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 11 May 2024 13:06:08 +0530 Subject: (Emacs/app)+eww bookmark functionality Search and edit bookmarks very quickly. --- Emacs/.config/emacs/app.org | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/Emacs/.config/emacs/app.org b/Emacs/.config/emacs/app.org index 6448ea5..e5e8cb8 100644 --- a/Emacs/.config/emacs/app.org +++ b/Emacs/.config/emacs/app.org @@ -67,7 +67,9 @@ engine, which makes sense as it's primarily a text interface. :defer t :general (app-leader - "w" #'eww) + "ww" #'eww + "wb" #'+eww/bookmarks-search + "we" #'+eww/bookmarks-edit) (nmmap :keymaps 'eww-mode-map "w" #'evil-forward-word-begin @@ -75,7 +77,22 @@ engine, which makes sense as it's primarily a text interface. :straight nil :config (with-eval-after-load "evil-collection" - (evil-collection-eww-setup))) + (evil-collection-eww-setup)) + (defun bookmark->alist (bookmark) + (cons (plist-get bookmark :title) + (plist-get bookmark :url))) + (defun +eww/bookmarks-edit nil + (interactive) + (find-file (concat eww-bookmarks-directory "eww-bookmarks"))) + (defun +eww/bookmarks-search nil + (interactive) + (let ((bookmarks (mapcar #'bookmark->alist eww-bookmarks))) + (eww + (alist-get (completing-read "Bookmark: " (mapcar #'car bookmarks) nil t) + bookmarks + nil + nil + #'string=))))) #+end_src * Calendar Calendar is a simple inbuilt application that helps with date -- cgit v1.2.3-13-gbd6f