diff options
| author | Craig Jennings <c@cjennings.net> | 2024-05-06 17:35:40 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2024-05-06 17:35:40 -0500 |
| commit | c9ca7f1ddf0fe52c4621fd26a304e28e42725bbe (patch) | |
| tree | cbcb749fbc04ccc6cbd533e45f456aa9d09a333a /modules | |
| parent | 2e07d7885329db7339d6375f910c55920e49742d (diff) | |
| download | dotemacs-c9ca7f1ddf0fe52c4621fd26a304e28e42725bbe.tar.gz dotemacs-c9ca7f1ddf0fe52c4621fd26a304e28e42725bbe.zip | |
add eww-copy-url to eww-config
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/eww-config.el | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/modules/eww-config.el b/modules/eww-config.el index 3476d068..f418ad57 100644 --- a/modules/eww-config.el +++ b/modules/eww-config.el @@ -5,6 +5,22 @@ ;;; Code: +;; -------------------------------- Eww Copy Url ------------------------------- + +(defun cj/eww-copy-url () + "Copies the eww url to clipboard" + (interactive) + (when (string= major-mode "eww-mode") + (let ((current-url (plist-get eww-data :url))) + (when current-url + (kill-new current-url))))) + +;; (defun cj/eww-copy-url () +;; "Copies the eww url to clipboard" +;; (interactive) +;; (when (string= major-mode "eww-mode") ; Ensure we're in eww-mode +;; (kill-new eww-current-url))) ; Copy to clipboard + ;; ------------------------------------ EWW ------------------------------------ (use-package eww @@ -14,7 +30,8 @@ (:map eww-mode-map ("<" . eww-back-url) ;; in addition to 'l' (">" . eww-forward-url) ;; in addition to 'n' - ("i" . eww-toggle-images) + ("i" . eww-toggle-images) + ("u" . cj/eww-copy-url) ("o" . eww-open-in-new-buffer)) :config (setq shr-use-colors nil) ;; respect colors in the html |
