Generate QR codes via a key binding
This commit is contained in:
parent
46f7a13058
commit
940261786a
1 changed files with 12 additions and 0 deletions
|
|
@ -295,3 +295,15 @@ When DEBUG is set, run the test in the debugger."
|
|||
(emms-player-list '(emms-player-mpv))
|
||||
; keep-sorted end
|
||||
)
|
||||
|
||||
(defun my-qr-selection ()
|
||||
(interactive)
|
||||
(if (use-region-p)
|
||||
(qrencode-region (region-beginning) (region-end))
|
||||
(let ((url (thing-at-point-url-at-point)))
|
||||
(if (null url)
|
||||
(call-interactively #'qrencode-string)
|
||||
(qrencode--encode-to-buffer url)))))
|
||||
|
||||
(use-package qrencode
|
||||
:bind (("C-z q" . my-qr-selection)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue