diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-05-11 13:06:08 +0530 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-05-11 13:06:08 +0530 |
commit | ebf18a5209aaf6f79baa536a0686441b60930d5f (patch) | |
tree | feb04a98db450d6706dc3af626396bc377f5714f /Emacs/.config/emacs/app.org | |
parent | 6aa3c170e93ea9a88b16816a3396778def524a01 (diff) | |
download | dotfiles-ebf18a5209aaf6f79baa536a0686441b60930d5f.tar.gz dotfiles-ebf18a5209aaf6f79baa536a0686441b60930d5f.tar.bz2 dotfiles-ebf18a5209aaf6f79baa536a0686441b60930d5f.zip |
(Emacs/app)+eww bookmark functionality
Search and edit bookmarks very quickly.
Diffstat (limited to 'Emacs/.config/emacs/app.org')
-rw-r--r-- | Emacs/.config/emacs/app.org | 21 |
1 files 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 |