summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/eww-config.el19
1 files changed, 18 insertions, 1 deletions
diff --git a/modules/eww-config.el b/modules/eww-config.el
index 3476d068b..f418ad57e 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