Blog

Trouble with indentation

Added by Christoph Kappel almost 5 years ago

irssi doesn't provide indentation stuff like weechat, but this can be archieved with a little perl trick: Just prepend the nickname with whitespaces or cut it after some letters.

This works fine until nickcolor.pl comes into play. First, I thought this is a bug in irssi and I tested various things and version. Then I asked google and to my surprise someone had the same issue

Based on that, the whole thing was easy to fix. Since nickcolor.pl overwrites the format I need to change exactly that:

 1 --- a/.irssi/scripts/nickcolor.pl    Sat Jan 08 21:47:43 2011 +0100
 2 +++ b/.irssi/scripts/nickcolor.pl    Sat Jan 22 16:13:19 2011 +0100
 3 @@ -93,7 +93,8 @@
 4    }
 5 
 6    $color = "0".$color if ($color < 10);
 7 -  $server->command('/^format pubmsg {pubmsgnick $2 {pubnick '.chr(3).$color.'$0}}$1');
 8 +  #$server->command('/^format pubmsg {pubmsgnick $2 {pubnick '.chr(3).$color.'$0}}$1');
 9 +  $server->command('/^format pubmsg {pubmsgnick $2 {pubnick '.chr(3).$color.'$[-11]0}}$1');
10  }
11 
12  sub sig_private {

irssi vs weechat (2 comment)

Added by Christoph Kappel almost 5 years ago

There are two curses based IRC clients that compete with each other: irssi and weechat

Nowadays most of the guys I know use weechat and I am still a irssi guy. I thought they might use it for a good reason so time for me to give it a try. This whole thing is funny for me, because I usually witness when people try to use subtle and adapt it to their daily workflow and now I am forced to change my own.

First steps

After my first few minutes with weechat, it's somehow different and somehow similar to irssi. It almost felt like they made all scripts that I used in irssi before to builtins. Nickcolor is well included, also the trackbar and a reasonable chanact.

There were many defaults that really confused me, like the behaviour to toggle between the last window and the current one, when I press the window switch key again. This was really easy to turn off, just needed to read the settings thoroughly.

Customization

The docs of weechat are a bit odd and probably need rework, I was usually lost finding the information I needed. The open and very kind community and other weechat users made this still to a solvable task. Another thing that surprised me was, that weechat doesn't use themes files like irssi. Changing the colors can be done via /set which is quite easy during runtime.

Biased comparison

Here is a table of scripts/things I would like to have in my IRC client and if this is possible in both clients:

Script/thing irssi (0.8.15) weechat (0.3.3)
Draw a separator when I switch windows trackbar.pl builtin
Alternate colors of nicknames nickcolor.pl builtin
Activity bar of channels with names chanact builtin
Nickserv integration nickserv.pl None found, probably scriptable
Edit topics via sed topicsed.pl None found, probably scriptable
Search in buffer history builtin (/lastlog) grep.py
Readable /names list (e.g. in columns) builtin (/names) None found, probably scriptable (nicklist is no option)
Multiserver handling (e.g. join channel) builtin (e.g. /join -prefix #channel) builtin (probably scriptable)
Send \a on highlight to set urgency builtin (see Urgent on highlight) None found (probably scriptable1)
Hide status windows /window immortal off; /window close Impossible currently
Nick indentation via theme builtin

I moved back to irssi after two weeks, I don't have time to write all the scripts that I need. Killing argument for me was the names list and the lack of a way to send \a on highlight1.

1 My first attempts caused a freeze of weechat once in a while.

Urgent on highlight

Added by Christoph Kappel almost 5 years ago

I seldom have my irssi urxvt not on a current view, but whenever this happens, a notice about any highlight would be welcome. This can be done with only a few steps:

  1. Launch the irssi urxvt with −urgentOnBell
  2. In case screen is used enable audible bells with ^A^G
  3. Set following values in irssi:
    Numbers: on /off/set beep_when_window_active ON
    /set beep_when_away ON
    /set beep_msg_level MSGS NOTICES DCC DCCMSGS HILIGHT
    /set bell_beeps ON

This basically tells irssi to send a (alarm) on highlights. Then on such an alarm, urxvt sets the urgency hint and the window manager, if it supports urgency at all, will try to inform you about that.

Also available in: Atom RSS