summaryrefslogtreecommitdiff
path: root/.emacs.d/modules/thanos-tools.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-10-13 16:16:40 +0300
committerThanos Apollo <[email protected]>2023-10-13 16:16:40 +0300
commit15555bb7f4bcbbe8cc58ac2456ea17e321393e75 (patch)
treea02db1734d29dd52bddabd8d918d00d054128a6c /.emacs.d/modules/thanos-tools.el
parentfa0c17b42caae8a5b4479bb5f057d7a9f8d0d1e5 (diff)
emacs:(tools) Redo thanos/search with anonymous functions
Diffstat (limited to '.emacs.d/modules/thanos-tools.el')
-rw-r--r--.emacs.d/modules/thanos-tools.el19
1 files changed, 12 insertions, 7 deletions
diff --git a/.emacs.d/modules/thanos-tools.el b/.emacs.d/modules/thanos-tools.el
index 9d58d75..15841cd 100644
--- a/.emacs.d/modules/thanos-tools.el
+++ b/.emacs.d/modules/thanos-tools.el
@@ -78,13 +78,18 @@
(setf register-preview-delay 0.5
register-preview-function #'consult-register-format)
-;; Consult custom functions
-(defun thanos/library-search ()
- "Search for content at ~/Library using consult-find."
- (interactive)
- (consult-find "~/Library"))
-
-(define-key global-map (kbd "C-c s") 'thanos/library-search)
+;; Consult custom lambda functions
+(defvar-keymap thanos/consult-search
+ :doc "Search for files in common folders I regularly use with consult."
+ "l" #'(lambda () (interactive) (consult-find "~/Library"))
+ "m" #'(lambda () (interactive) (yeetube-mpv-play
+ (completing-read "Select video: "
+ (directory-files-recursively
+ "/mnt/external/medical-videos/" ".*\.mp4")))))
+
+(define-key global-map (kbd "C-c s") #'(lambda ()(message "hello")))
+
+(define-key global-map (kbd "C-c s") thanos/consult-search)
(defun insert-brackets (&optional arg)
"Insert ARG brackets."