1
0
mirror of https://codeberg.org/cage/tinmop/ synced 2025-02-02 04:36:43 +01:00

- added command to copy a link to clipboard.

This commit is contained in:
cage 2022-03-04 14:33:55 +01:00
parent e60b886c7d
commit 826423c7d7
7 changed files with 55 additions and 33 deletions

View File

@ -55,9 +55,8 @@ All the dependencies above should be available using the package
manager of your distribution (~apt~, ~yum~ etc).
** Lisp Libraries
- alexandria;
- cl-ppcre;
- cl-ppcre-unicode;
- tooter;
- croatoan;
- osicat;
@ -79,7 +78,12 @@ manager of your distribution (~apt~, ~yum~ etc).
- cl-html5-parser;
- unix-opts;
- crypto-shortcuts;
- drakma.
- drakma;
- usocket;
- cffi;
- babel;
- percent-encoding;
- trivial-clipboard.
All these libraries will be downloaded, compiled and installed by
the script ~quick_quicklisp.sh~, see below.

View File

@ -100,7 +100,7 @@ Table of Contents
──────────────────
• alexandria;
• cl-ppcre;
• cl-ppcre-unicode;
• tooter;
• croatoan;
• osicat;
@ -122,7 +122,12 @@ Table of Contents
• cl-html5-parser;
• unix-opts;
• crypto-shortcuts;
• drakma.
• drakma;
• usocket;
• cffi;
• babel;
• percent-encoding;
• trivial-clipboard.
All these libraries will be downloaded, compiled and installed by the
script `quick_quicklisp.sh', see below.

View File

@ -595,6 +595,8 @@
(define-key "C-J" #'open-message-link-perform-opening *open-message-link-keymap*)
(define-key "C-c" #'copy-link-to-clipboard *open-message-link-keymap*)
(define-key "up" #'open-message-link-go-up *open-message-link-keymap*)
(define-key "down" #'open-message-link-go-down *open-message-link-keymap*)

View File

@ -115,34 +115,35 @@ install_dependency () {
# --eval "(ql:quickload \"swank\")" \ <- note the '\'
# --eval "(sb-ext:quit)"; <- keep this line as latest
@LISP_COMPILER@ \
--eval "(ql:quickload \"alexandria\")" \
--eval "(ql:quickload \"cl-ppcre-unicode\")" \
--eval "(ql:quickload \"tooter\")" \
--eval "(ql:quickload \"croatoan\")" \
--eval "(ql:quickload \"osicat\")" \
--eval "(ql:quickload \"cl-spark\")" \
--eval "(ql:quickload \"access\")" \
--eval "(ql:quickload \"sqlite\")" \
--eval "(ql:quickload \"sxql\")" \
--eval "(ql:quickload \"sxql-composer\")" \
--eval "(ql:quickload \"marshal\")" \
--eval "(ql:quickload \"bordeaux-threads\")" \
--eval "(ql:quickload \"log4cl\")" \
--eval "(ql:quickload \"local-time\")" \
--eval "(ql:quickload \"cl-colors2\")" \
--eval "(ql:quickload \"cl-i18n\")" \
--eval "(ql:quickload \"clunit2\")" \
--eval "(ql:quickload \"esrap\")" \
--eval "(ql:quickload \"ieee-floats\")" \
--eval "(ql:quickload \"parse-number\")" \
--eval "(ql:quickload \"cl-html5-parser\")" \
--eval "(ql:quickload \"unix-opts\")" \
--eval "(ql:quickload \"crypto-shortcuts\")" \
--eval "(ql:quickload \"drakma\")" \
--eval "(ql:quickload \"usocket\")" \
--eval "(ql:quickload \"cffi\")" \
--eval "(ql:quickload \"babel\")" \
--eval "(ql:quickload \"percent-encoding\")" \
--eval "(ql:quickload \"alexandria\")" \
--eval "(ql:quickload \"cl-ppcre-unicode\")" \
--eval "(ql:quickload \"tooter\")" \
--eval "(ql:quickload \"croatoan\")" \
--eval "(ql:quickload \"osicat\")" \
--eval "(ql:quickload \"cl-spark\")" \
--eval "(ql:quickload \"access\")" \
--eval "(ql:quickload \"sqlite\")" \
--eval "(ql:quickload \"sxql\")" \
--eval "(ql:quickload \"sxql-composer\")" \
--eval "(ql:quickload \"marshal\")" \
--eval "(ql:quickload \"bordeaux-threads\")" \
--eval "(ql:quickload \"log4cl\")" \
--eval "(ql:quickload \"local-time\")" \
--eval "(ql:quickload \"cl-colors2\")" \
--eval "(ql:quickload \"cl-i18n\")" \
--eval "(ql:quickload \"clunit2\")" \
--eval "(ql:quickload \"esrap\")" \
--eval "(ql:quickload \"ieee-floats\")" \
--eval "(ql:quickload \"parse-number\")" \
--eval "(ql:quickload \"cl-html5-parser\")" \
--eval "(ql:quickload \"unix-opts\")" \
--eval "(ql:quickload \"crypto-shortcuts\")" \
--eval "(ql:quickload \"drakma\")" \
--eval "(ql:quickload \"usocket\")" \
--eval "(ql:quickload \"cffi\")" \
--eval "(ql:quickload \"babel\")" \
--eval "(ql:quickload \"percent-encoding\")" \
--eval "(ql:quickload \"trivial-clipboard\")" \
--eval "(sb-ext:quit)"
}

View File

@ -2709,6 +2709,7 @@
:open-next-visible-link
:go-to-next-link
:go-to-previous-link
:copy-link-to-clipboard
:close-open-message-link-window
:open-message-link-window-scroll-begin
:open-message-link-window-scroll-end

View File

@ -1357,6 +1357,14 @@ This makes sense only for gemini file stream, if not this command performs the s
'open-message-link-perform-opening'"
(%open-message-link-perform-opening t))
(defun copy-link-to-clipboard ()
"Copy the selected link address to clipboard"
(when-let* ((selected-line (line-oriented-window:selected-row *open-message-link-window*))
(url (line-oriented-window:normal-text selected-line)))
(with-notify-errors
(trivial-clipboard:text url)
(info-message (_ "Address copied to clipboard")))))
(defun close-open-message-link-window ()
(when-window-shown (*open-message-link-window*)
(when (message-window:display-gemini-text-p *open-message-link-window*)

View File

@ -51,6 +51,7 @@
:usocket
:babel
:percent-encoding
:trivial-clipboard
:uiop)
:components ((:file "package")
(:file "idn")