rtorrent icon indicating copy to clipboard operation
rtorrent copied to clipboard

Apply color patch from rtorrent-0.9.6_color.patch

Open myallod opened this issue 8 years ago • 10 comments

Please add color to rtorrent

myallod avatar Apr 09 '16 08:04 myallod

Even if Jari accepts this, doing it as an array with names or enum indices is way less code and more extensible.

pyroscope avatar Apr 09 '16 10:04 pyroscope

As said, array and enums is a must.

It also needs to have a proper setting to enable/disable colors, and not to mention this should obviously be in command_ui.cc, under the 'ui.foo.bar' command namespace.

I'm all for adding colors if the code is good. (default to off)

rakshasa avatar Aug 03 '16 15:08 rakshasa

would you please give me a hint about array and enum that needed.

myallod avatar Aug 08 '16 19:08 myallod

You can take a look pyroscope's beautiful code in rtorrent-ps : https://github.com/pyroscope/rtorrent-ps/blob/master/patches/ui_pyroscope.cc

chros73 avatar Aug 08 '16 20:08 chros73

Just for your information: The "official" colorpatch branch is avaliable in my fork of the repository (including prior versions, that's also the one used in the Arch Linux rtorrent-color AUR package): https://github.com/KopfKrieg/rtorrent/tree/colorpatch

KopfKrieg avatar Oct 11 '16 05:10 KopfKrieg

Since my C++ skills are very basic and I have trouble porting the v0.9.6 colorpatch to the shortly released v0.9.7: Is there somebody who could help me rewrite the colorpatch so it could officially be added to rtorrent? Including the above mentioned changes to add the code to the command_ui.cc and using enums (and adding an option to disable colors, which should probably be the default?)?

KopfKrieg avatar Jun 24 '18 13:06 KopfKrieg

+1

With lib v0.9.7 i have to rebuild rtorrent without color recently. Seems worse than early with colors. I do not know cpp and cannot help :( Only can copy-paste and stackoverflow.

myallod avatar Jun 24 '18 13:06 myallod

Look at torrent.list.layout and do something similar for colors – a bool would suffice (ui.colors.enabled), but a string value (ui.colors.theme) would allow different colorization schemes / themes (possibly foregoing variables for different single colors).

Or take my "palette" of functional colors (or parts of it):

  • https://github.com/pyroscope/rtorrent-ps/blob/f2433b3aef285c650372c0c9804068361b3e7577/patches/ui_pyroscope.h#L24-L56
  • https://github.com/pyroscope/rtorrent-ps/blob/42989583ec54a3ad6c81ef83c92a52495d92a395/patches/ui_pyroscope.cc#L65-L126
  • https://github.com/pyroscope/rtorrent-ps/blob/42989583ec54a3ad6c81ef83c92a52495d92a395/patches/ui_pyroscope.cc#L1103-L1136

… and code scattered around the module using those colors.

pyroscope avatar Jun 24 '18 16:06 pyroscope

What's the progress of this?

Hund avatar Jun 08 '21 09:06 Hund

What's the progress of this?

Well, I don't maintain the patch any more, and it doesn't seem like anyone has tried to port it to v0.9.7 yet. So … still the same as 3 years ago, probably.

KopfKrieg avatar Jun 10 '21 18:06 KopfKrieg