summaryrefslogtreecommitdiff
path: root/.config/emacs/bd-wm.el
diff options
context:
space:
mode:
Diffstat (limited to '.config/emacs/bd-wm.el')
-rw-r--r--.config/emacs/bd-wm.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/.config/emacs/bd-wm.el b/.config/emacs/bd-wm.el
index 068d180..ee63985 100644
--- a/.config/emacs/bd-wm.el
+++ b/.config/emacs/bd-wm.el
@@ -23,9 +23,13 @@ dedicated buffer will never be automatically orphaned."
(defun insert-bookmark ()
"Inserts a url or string from permanent
-bookmark file."
+bookmark file. If an x window, place in kill-ring."
+ ;; note xdotool had issues with repeated keys when sending to windowid
(interactive)
- (insert (car (last (split-string (choose-line-from-file "~/Personal/scripts/bookmarks.txt"))))))
+ (let ((url (car (last (split-string (choose-line-from-file "~/Personal/scripts/bookmarks.txt"))))))
+ (if (exwm--buffer->id (current-buffer))
+ (kill-new url)
+ (insert url))))
(defun choose-line-from-file (file)
"Uses completion-framework to allow user to
@@ -126,7 +130,9 @@ select a line from a file."
([?\M-v] . [prior])
([?\C-v] . [next])
([?\C-d] . [delete])
- ([?\C-k] . [S-end delete])))
+ ([?\C-k] . [S-end delete])
+ ([?\M-w] . [C-c])
+ ([?\C-y] . [C-v])))
;; ,@(mapcar (lambda (i)
;; `(,(kbd (format "s-%s" (car i))) .