Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

256 colour support for Irssi #48

Merged
merged 2 commits into from
Jul 2, 2014
Merged

Conversation

ailin-nemui
Copy link
Contributor

These two patches implement 256 colour and true colour support for
Irssi.

For more details, please refer to the patch documentation at either
http://irssi-docs.wikispaces.com/Notes-256-Colour or
https://github.com/shabble/irssi-docs/wiki/Notes-256-Colour

@ahf
Copy link
Member

ahf commented Jun 18, 2014

Let's get as many eyes as possible on this set of patches :-)

@dequis
Copy link
Member

dequis commented Jun 19, 2014

Yay PR!
Referencing #3

shabble and others added 2 commits June 30, 2014 00:54
This patch implements some 256 colour support for Irssi up from the
previous 16 colours. Initial parsing of the %x/%X format codes is
implemented and the parser accounts in advances the char* for
that.

The colour attributes are widened from 4 to 8 bit. The colour protocol
is changed to a new format. Some pointers to remaining work are
written in the comment in textbuffer.h.

Note that Irssi already does support requesting 256 colours from the
terminal in the original source code, so this part did not have to be
touched.
256 colour patch is cleaned up and the remaining cases are made work,
this includes especially Theme support, which was not implemented
before. Changes not related to colours were reverted again, making a
review of the two patches against master easier to follow.

As a byproduct of the Hex-colour code parser, the 24bit colours are
also implemented. Actually using them in the terminal is guarded by a
compile time switch (as well as a run time switch), as it breaks the
existing colour protocol and requires additional storage.

To make a seamless usage, down-conversion is provided for 8 and 16
colours.

Diverging from Tom's approach, the colour protocol is reverted back to
the original one. Unfortunately, the changes required in the Theme
engine will break the API.

For more details, please refer to the patch documentation at either
http://irssi-docs.wikispaces.com/Notes-256-Colour or
https://github.com/shabble/irssi-docs/wiki/Notes-256-Colour
ahf added a commit that referenced this pull request Jul 2, 2014
@ahf ahf merged commit fd3676e into irssi:master Jul 2, 2014
@ailin-nemui ailin-nemui deleted the 256-colour-history branch July 2, 2014 21:28
@ticklemynausea
Copy link

I can't use the cubes command. It does not seem to exist.

@ailin-nemui
Copy link
Contributor Author

@ticklemynausea did you compile Irssi from git with this patch and try with a fresh config? cubes is only a new default alias in new configs

@ticklemynausea
Copy link

Ok, I must need the newer config file. That's it :) Thanks

On Thu, Jul 3, 2014 at 8:10 AM, ailin-nemui notifications@github.com
wrote:

@ticklemynausea https://github.com/ticklemynausea did you compile Irssi
from git with this patch and try with a fresh config? cubes is only a
new default alias in new configs


Reply to this email directly or view it on GitHub
#48 (comment).

Cumprimentos,
Mário Carneiro

http://mariocarneiro.info

@ticklemynausea
Copy link

Hi. Sadly this isn't working for me. I've recompiled with --enable-true-color and set colors_ansi_24bit to on. /cubes only shows 16 colors: http://i.imgur.com/QdMmSB9.png

I don't think this is an issue with my terminal since https://gist.github.com/hSATAC/1095100 seems to show 256 colors in all their glory: http://i.imgur.com/Hz4Qcpn.png

Any suggestions on what I could be missing?

@ailin-nemui
Copy link
Contributor Author

@ticklemynausea please check the value of $TERM by doing /eval echo $TERM inside Irssi or echo $TERM on your shell. such is most common issue

@ticklemynausea
Copy link

Yes, I just found out about that :) I still had some issues with using irssi inside screen also, this fixed it: http://askubuntu.com/questions/87169/using-gnu-screen-with-256-colors

@ailin-nemui
Copy link
Contributor Author

@ticklemynausea there are many wrong advices on the internet, inside screen, TERM should be screen-256color. other values may cause surprising display glitches inside applications that depend on this value. you can also join #irssi@freenode for live support if you have any more questions

@ticklemynausea
Copy link

Hi. Thanks for your help, as I wasn't really aware of that fact.

term "screen-256color" (in ~/.screenrc) and export TERM=xterm-256color (in
~/.bash_profile) is working for me and is more correct as per your
suggestion

On Fri, Jul 4, 2014 at 12:46 PM, ailin-nemui notifications@github.com
wrote:

@ticklemynausea https://github.com/ticklemynausea there are many wrong
advices on the internet, inside screen, TERM should be screen-256color.
other values may cause surprising display glitches inside applications that
depend on this value. you can also join #irssi@freenode
https://github.com/freenode for live support if you have any more
questions


Reply to this email directly or view it on GitHub
#48 (comment).

Cumprimentos,
Mário Carneiro

http://mariocarneiro.info

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants