Next: Update define-key, use get-default and add search-engines
parent
ad5169682f
commit
06c53487be
|
@ -1,16 +1,21 @@
|
|||
(in-package :next)
|
||||
|
||||
;; Use development platform port.
|
||||
(setf (slot-value *port* 'path)
|
||||
(setf (get-default 'port 'path)
|
||||
(format nil "~a/common-lisp/next/ports/gtk-webkit/next-gtk-webkit"
|
||||
(uiop:getenv "HOME")))
|
||||
|
||||
(define-key *global-map* (key "C-M-b") #'switch-buffer)
|
||||
(define-key *global-map* (key "C-M-w") #'make-window)
|
||||
(define-key *global-map* (key "C-M-d") #'delete-buffer)
|
||||
(define-key *global-map* (key "C-;") #'execute-extended-command)
|
||||
(define-key *global-map* (key "M-g") #'go-anchor-new-buffer)
|
||||
(define-key *global-map* (key "C-M-C") #'kill)
|
||||
;; (setf (cdr (last (eval (get-default 'window 'search-engines))))
|
||||
;; '(("yt" . "https://www.youtube.com/results?search_query=~a")))
|
||||
(nconc (eval (get-default 'window 'search-engines))
|
||||
'(("yt" . "https://www.youtube.com/results?search_query=~a")))
|
||||
|
||||
(define-key (key "C-M-b") #'switch-buffer
|
||||
(key "C-M-w") #'make-window
|
||||
(key "C-M-d") #'delete-buffer
|
||||
(key "C-;") #'execute-command
|
||||
(key "M-g") #'go-anchor-new-buffer
|
||||
(key "C-M-C") #'kill)
|
||||
|
||||
(defun eval-in-emacs (&rest s-exps)
|
||||
"Evaluate S-EXPS with emacsclient."
|
||||
|
@ -37,7 +42,7 @@
|
|||
:description ,title)))
|
||||
`(org-capture))))
|
||||
|
||||
(define-key *global-map* (key "C-M-o") #'org-capture)
|
||||
(define-key (key "C-M-o") #'org-capture)
|
||||
|
||||
(define-command youtube-dl-current-page ()
|
||||
"Download a video in the currently open buffer."
|
||||
|
@ -46,10 +51,10 @@
|
|||
(if (search "youtu" url)
|
||||
`(progn (youtube-dl ,url) (youtube-dl-list))
|
||||
`(ambrevar/youtube-dl-url ,url)))))
|
||||
(define-key *global-map* (key "C-M-c d") 'youtube-dl-current-page)
|
||||
(define-key (key "C-M-c d") 'youtube-dl-current-page)
|
||||
|
||||
(define-command play-video-in-current-page ()
|
||||
"Play video in the currently open buffer."
|
||||
(with-result (url (buffer-get-url))
|
||||
(uiop:run-program (list "mpv" url))))
|
||||
(define-key *global-map* (key "C-M-c v") 'play-video-in-current-page)
|
||||
(define-key (key "C-M-c v") 'play-video-in-current-page)
|
||||
|
|
Loading…
Reference in New Issue