Copying command output with the mouse is clumsy, especially a long one. On an X11 desktop I’d pipe it to the clipboard instead.
xsel works with three X selections. By default it uses PRIMARY, the one you fill by selecting text. The graphical copy and paste shortcuts use CLIPBOARD, so add -b:
cat config.yml | xsel -ib
xsel -ob > pasted.txt
-i reads standard input into the selection and -o writes the selection to standard output. -c clears it, which is handy after you copied a secret.
A caveat: xsel talks to an X server, so it needs a graphical session. Without a running X server it has nothing to talk to.
Further reading: xsel man page (Debian)
Going deeper: Guide: advanced tmux, a config that grows with you, formats, layouts and more