summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbd <bdunahu@gmail.com>2024-01-05 23:02:43 -0700
committerbd <bdunahu@gmail.com>2024-01-05 23:02:43 -0700
commit84e394757a183ff5c6a19389684f77f54399918b (patch)
tree4b18161b08e75823fbe49a1e56d3b06ba3f5646a
parent1e4a002f480925683ce0aedf39adf42cfc60381a (diff)
Easier copy-pasting in x-windows, temporary url paste solution.
-rw-r--r--.config/emacs/bd-shells.el2
-rw-r--r--.config/emacs/bd-wm.el12
2 files changed, 10 insertions, 4 deletions
diff --git a/.config/emacs/bd-shells.el b/.config/emacs/bd-shells.el
index c6e6722..9628c66 100644
--- a/.config/emacs/bd-shells.el
+++ b/.config/emacs/bd-shells.el
@@ -37,7 +37,7 @@ status, and path."
("C-q" . 'delete-window) ; mostly for side window
("<tab>" . completion-at-point))
:config
- (eshell/addpath ~/Personal/scripts/)
+ (eshell/addpath "~/Personal/scripts/")
:custom
(eshell-prompt-function 'bd/eshell-prompt)
(eshell-prompt-regexp "^> ")
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))) .