diff options
author | bd <bdunahu@gmail.com> | 2024-01-05 23:02:43 -0700 |
---|---|---|
committer | bd <bdunahu@gmail.com> | 2024-01-05 23:02:43 -0700 |
commit | 84e394757a183ff5c6a19389684f77f54399918b (patch) | |
tree | 4b18161b08e75823fbe49a1e56d3b06ba3f5646a /.config/emacs/bd-wm.el | |
parent | 1e4a002f480925683ce0aedf39adf42cfc60381a (diff) |
Easier copy-pasting in x-windows, temporary url paste solution.
Diffstat (limited to '.config/emacs/bd-wm.el')
-rw-r--r-- | .config/emacs/bd-wm.el | 12 |
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))) . |