LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What X terminal emulators support copying of coloured text? (https://www.linuxquestions.org/questions/linux-software-2/what-x-terminal-emulators-support-copying-of-coloured-text-4175554172/)

basht 09-22-2015 08:02 AM

What X terminal emulators support copying of coloured text?
 
Hello,

Let me have a coloured text in x terminal emulator, say it is a colordiff output, or I have a coloured command line prompt.

When copying this text I expect the terminal emulator to save colours into HTML clipboard buffer to make it pasted in HTML-aware fields with colours (and boldness, and other decorations) preserved.

However, gnome-terminal copies bare text. What terminal emulators can copy text style?

Please do not mention pipeline converters such as aha. They are cute, but they solve slightly another problem.

Thanks in advance.

dugan 09-22-2015 04:19 PM

There are no terminal emulators that can do that. Period.

Thanks for introducing me to aha, btw :)

basht 09-30-2015 04:31 AM

http://www.joachim-breitner.de/blog/...gnome-terminal
here is an example
but it is not in repositories

ondoho 10-08-2015 01:43 PM

the answer is the same as to so many other questions:
if you want it bad enough, make it.
it seems like the guy linked in your previous post already went a fair bit along the way, and if you're really lucky it will still compile with recent versions of gnome-terminal.

another approach could be to look at rxvt, or rxvt-unicode or urxvt, because it has the ability to use perl plugins, so maybe you can script it in perl...

dugan 04-28-2016 01:09 AM

https://github.com/tweekmonster/tmux2html

astrogeek 04-28-2016 01:18 AM

Thanks dugan!

I spend most of my days inside tmux'd terminals, but was completely unaware of this.

Honestly, it is a use case that has never occurred to me, but now that I've seen it I'll probably find a use for it!

*** UPDATE

I tried to think of how I might actually use this, and come up empty! ;)
I frequently redirect text to files, but do not want the color info in those cases...
I infrequently use a screenshot of a terminal, but HTML would not be a good substitute in those...

But it looks cool, and the rationale from the github site is sufficient!

Quote:

Rationale

This was a weekend project I made for fun and I have no particular use for it beyond annoying my friends about how bad they should feel for not using tmux.

ondoho 05-03-2016 11:49 PM

Quote:

Originally Posted by dugan (Post 5537664)

that's awesome.
look at the example "screenshots"!
i'm not using tmux, but now i'm having a look at the "Similar projects" (scroll down in the README).


All times are GMT -5. The time now is 01:15 PM.