{"id":80,"date":"2010-09-02T22:52:08","date_gmt":"2010-09-02T20:52:08","guid":{"rendered":"http:\/\/blog.garion.org\/?p=80"},"modified":"2011-04-26T20:14:49","modified_gmt":"2011-04-26T18:14:49","slug":"irssi-tricks-ignores-and-hilights","status":"publish","type":"post","link":"https:\/\/joost.vunderink.net\/blog\/2010\/09\/02\/irssi-tricks-ignores-and-hilights\/","title":{"rendered":"Irssi tricks: ignores and hilights"},"content":{"rendered":"<p>I like the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Internet_Relay_Chat\">IRC<\/a> client <a href=\"http:\/\/irssi.org\/\">irssi<\/a> <a href=\"http:\/\/hyperboleandahalf.blogspot.com\/2010\/04\/alot-is-better-than-you-at-everything.html\">a lot<\/a>. I&#8217;ve been using it for many years now, and have learned many tricks about it. In these irssi blog entries, I&#8217;ll be sharing some tricks with you.<\/p>\n<p>The <strong>\/ignore<\/strong> command is quite powerful and can be used to remove lots of unwanted lines. If there is someone you don&#8217;t want to see in your channel, you can use it like this:<\/p>\n<pre>\/ignore *!username@host.example.com ALL<\/pre>\n<p>to ignore all messages from this person, on channels and in private, as well as things like joins and topic changes.<\/p>\n<p>But it gets better. If other people are talking to this person in the channel, using the standard &#8220;Nickname: text here&#8221; structure, you can ignore this as well:<\/p>\n<pre>\/ignore -replies *!username@host.example.com ALL<\/pre>\n<p>Some channels have people who use expressions like &#8220;lol&#8221; and &#8220;rofl&#8221; a lot, including many variations like &#8220;lawl&#8221; and &#8220;rulf&#8221;. I don&#8217;t like it when such expressions appear as the only word on a line, and this ignore helps me avoid seeing them:<\/p>\n<pre>\/ignore -regexp -pattern ^l[aoeui]+w?lz?|r[aoeui]+[lfk][lfk]z?$<\/pre>\n<p>With the\u00a0<strong>-regexp<\/strong> flag, you indicate that this hilight is a <a href=\"http:\/\/www.regular-expressions.info\/tutorial.html\">regular expression<\/a>. With regexps, you can match very specific strings.\u00a0As you can see, you can just go wild with such regular expressions.<\/p>\n<p>Sometimes, you&#8217;re on a channel with a lot of activity. All the joins, parts, and modes can really pollute the window. You can hide those lines with this command:<\/p>\n<pre>\/ignore #channel JOINS PARTS QUITS TOPICS MODES<\/pre>\n<div id=\"attachment_84\" style=\"width: 174px\" class=\"wp-caption alignright\"><a href=\"http:\/\/blog.garion.org\/wp-content\/uploads\/2010\/09\/Screen-shot-2010-09-02-at-21.58.30-.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-84\" class=\"size-full wp-image-84\" title=\"Activity bar\" src=\"http:\/\/blog.garion.org\/wp-content\/uploads\/2010\/09\/Screen-shot-2010-09-02-at-21.58.30-.png\" alt=\"The irssi activity bar\" width=\"164\" height=\"23\" \/><\/a><p id=\"caption-attachment-84\" class=\"wp-caption-text\">The irssi activity bar<\/p><\/div>\n<p>You might also not want that channel to show up in your activity bar. You can accomplish that with:<\/p>\n<pre>\/set activity_hide_targets #channel #channel2 #channel3<\/pre>\n<p>Actually, why would you want a channel to show up in your activity bar when someone parts it? Or voices someone? I have the following setting in my irssi:<\/p>\n<pre>\/set activity_hide_level QUITS JOINS PARTS KICKS MODES TOPIC NICKS<\/pre>\n<p>To get a list of all the existing message levels, type this:<\/p>\n<pre>\/help levels<\/pre>\n<p>My friends are sometimes a bit creative with my nickname, <span style=\"color: #339966;\">Garion<\/span>. To make sure that their creative versions are hilighted properly, I&#8217;ve done this:<\/p>\n<pre>\/hilight -regexp ga+ri+o+n+<\/pre>\n<pre>\/hilight -regexp gaa+r(k|tj)e+<\/pre>\n<div id=\"attachment_86\" style=\"width: 316px\" class=\"wp-caption alignright\"><a href=\"http:\/\/blog.garion.org\/wp-content\/uploads\/2010\/09\/Screen-shot-2010-09-02-at-22.05.04-.png\"><img loading=\"lazy\" decoding=\"async\" aria-describedby=\"caption-attachment-86\" class=\"size-full wp-image-86 \" title=\"Gaaarioooon\" src=\"http:\/\/blog.garion.org\/wp-content\/uploads\/2010\/09\/Screen-shot-2010-09-02-at-22.05.04-.png\" alt=\"Gaaarioooon\" width=\"306\" height=\"22\" \/><\/a><p id=\"caption-attachment-86\" class=\"wp-caption-text\">This interesting version of my nickname hilights as well.<\/p><\/div>\n<p>So, if someone calls me <span style=\"color: #339966;\">Gaaaarioon<\/span> or\u00a0<span style=\"color: #339966;\">gaaartjeeee<\/span>, it will still hilight properly.<\/p>\n<p>Hilighted text, by default, appears as a purple\/red\/pink (depending on your terminal and colour perception) number in your activity bar. I like to have different subjects trigger different hilight colours in my activity bar, for example:<\/p>\n<pre>\/hilight -full -color %G -actcolor %Y tea<\/pre>\n<p>The <strong>-full<\/strong> flag makes sure that only the full word &#8220;tea&#8221; causes a hilight, and &#8220;steam&#8221; does not, even though it contains &#8220;tea&#8221;. The <strong>-color %G<\/strong> flag makes sure that the nickname of the hilighter is shown in green, instead of the default yellow. This flag also causes the activity number in your statusbar to turn green. The <strong>-actcolor %Y<\/strong> flag overrides this green-ness, and turns the activity number yellow instead.<\/p>\n<p>I don&#8217;t think there is a way to manipulate the contents of messages themselves via built-in irssi commands. For example, you might want to remove &#8220;lol&#8221; from the end of sentences, or replace &#8220;god&#8221; by &#8220;flying spaghetti monster&#8221;.<\/p>\n<p>If you want to modify messages, one option is to use <a href=\"http:\/\/wouter.coekaerts.be\/site\/\">Wouter Coekaerts<\/a>&#8216;s script <a href=\"http:\/\/wouter.coekaerts.be\/site\/irssi\/trigger\">trigger.pl<\/a>, also available from the <a href=\"http:\/\/scripts.irssi.org\/\">Irssi script archive<\/a>.<\/p>\n<p>Stay tuned for more irssi tricks!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I like the IRC client irssi a lot. I&#8217;ve been using it for many years now, and have learned many tricks about it. In these irssi blog entries, I&#8217;ll be sharing some tricks with you. The \/ignore command is quite &hellip; <a href=\"https:\/\/joost.vunderink.net\/blog\/2010\/09\/02\/irssi-tricks-ignores-and-hilights\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[38,39,217,214],"class_list":["post-80","post","type-post","status-publish","format-standard","hentry","category-irssi","tag-hilight","tag-ignore","tag-irssi","tag-linux"],"_links":{"self":[{"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/posts\/80"}],"collection":[{"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":16,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"predecessor-version":[{"id":95,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/posts\/80\/revisions\/95"}],"wp:attachment":[{"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/joost.vunderink.net\/blog\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}