settings

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 50cbcccc8e1227831671e79659c2aed20b342634
parent 69c56d866cc2800b6261fae038817d16f05c61bb
Author: Paul Longtine <paul@nanner.co>
Date:   Mon May  4 18:40:04 2015

updated irssi

Diffstat:
 irssi/asdf.theme                        | 296 +---------------------------------
 irssi/config                            |  29 ++-
 irssi/default.theme                     | 294 +---------------------------------
 irssi/greenish.theme                    | 294 +++++++++++++++++++++++++++++++++-
 irssi/scripts/autorun/nickcolor.pl      | 156 +++++++++++++++++-
 irssi/scripts/autorun/xchatnickcolor.pl |   1 +-
 irssi/scripts/xchatnickcolor.pl         | 160 +------------------
 7 files changed, 470 insertions(+), 760 deletions(-)

diff --git a/irssi/asdf.theme b/irssi/asdf.theme @@ -1,296 +0,0 @@ - -# default foreground color (%N) - -1 is the "default terminal color" -default_color = "-1"; - -# print timestamp/servertag at the end of line, not at beginning -info_eol = "false"; - -# these characters are automatically replaced with specified color -# (dark grey by default) -replaces = { "[]" = "%g$*%n"; }; - -abstracts = { - - ############# generic ############################### - - indent_default = " │ "; - #indent_default = ""; - - # text to insert at the beginning of each non-message line - # line_start = "%g//%n "; - line_start = ""; - - # timestamp styling, nothing by default - #timestamp = "%K$0-%n"; - timestamp = ""; - - # any kind of text that needs hilighting, default is to bold - hilight = "%_$*%_"; - - # any kind of error message, default is bright red - error = "%R$*%n"; - - # channel name is printed - channel = "%b$*%n"; - - # nick is printed - #nick = "%_$*%_"; - nick = ""; - - # nick host is printed - nickhost = "%g$*"; - - # server name is printed - server = "%_$*%_"; - - # some kind of comment is printed - comment = "%n(%b\"$*\"%n);"; - - # reason for something is printed (part, quit, kick, ..) - reason = "{comment $*}"; - - # mode change is printed ([+o nick]) - mode = "{comment $*}"; - - ## channel specific messages - - # highlighted nick/host is printed (joins) - channick_hilight = "%g$*%N"; - chanhost_hilight = "{nickhost $*}"; - - # nick/host is printed (parts, quits, etc.) - channick = "$*"; - chanhost = "{nickhost $*}"; - - # highlighted channel name is printed - channelhilight = "%g$*%n"; - - # ban/ban exception/invite list mask is printed - ban = "$*"; - - ########### messages ################################# - - # the basic styling of how to print message, $0 = nick mode, $1 = nick - # msgnick = "$1-$0%K·%N %|"; - #msgnick = "%K$0%N $1 %K│ %|%N"; - # msgnick = "%K$0%N $1 %K· %|%N"; - msgnick = "%K%N $1 %K│ %N"; - - # $0 = nick mode, $1 = nick - ownmsgnick = "{msgnick $0 $1}"; - ownnick = "%Y$*%n"; - - # public message in channel, $0 = nick mode, $1 = nick - pubmsgnick = "{msgnick $0 $1}"; - pubnick = "%N$*%n"; - - # public highlighted message in channel - pubmsghinick = "{msgnick $0 $1}%r"; - menick = "%R$*%n"; - - # channel name is printed with message - msgchannel = "%K:%m$*%n"; - - # private message, $0 = nick, $1 = host - privmsg = "$0=%b\"$1-\"%n "; - - # private message from you, $0 = "msg", $1 = target nick - ownprivmsg = "$0=%b\"$1-\"%n "; - - # private message in query - # privmsgnick = "{msgnick $*}"; - privmsgnick = " %g<%N "; - - # own private message in query - #ownprivmsgnick = "{privmsgnick $*}"; - ownprivmsgnick = " %r>%N "; - #ownprivnick = "$*"; - - - ########## Actions (/ME stuff) ######################### - # used internally by this theme - action_core = " %n$* │"; - - # generic one that's used by most actions - action = "{action_core $*} "; - - # own action, both private/public - ownaction = "{action %p$*}"; - - # own action with target, both private/public - ownaction_target = "{action_core $0}%Y:%c$1%n "; - - # private action sent by others - pvtaction = "%y (*) $*%n "; - pvtaction_query = "{action $* }"; - - # public action sent by others - pubaction = "{action $*}"; - - # generic one that's used by most actions - # action = " %m$* │ %N%m"; - - # own action, both private/public - # ownaction = "{action $*}"; - # ownaction = " %m$* │ %N%m"; - - # own action with target, both private/public - # ownaction_target = " {action $*}"; - - # private action sent by others - # pvtaction = "{ $*}"; - # pvtaction_query = "{ $*}"; - - # public action sent by others - # pubaction = " {action}"; - - - ########## other IRC events ############################# - - # whois - whois = "%# $[8]0 = $1-;"; - - # notices - ownnotice = "%NNote n = %Mnew%n $0 ($1-) "; - notice = "%M$*%n "; - pubnotice_channel = " %N($*)"; - pvtnotice_host = " %N($*)"; - servernotice = " %N($*)"; - - # CTCPs - ownctcp = "%NCTCP c = %Mnew%n $0 ($1-) "; - ctcp = "%N$*%n"; - - # wallops - wallop = "%K$*%n: "; - wallop_nick = "%n$*"; - wallop_action = "%K * $*%n "; - - # netsplits - netsplit = " %Knsplit %R│ %b\"$*\"%n"; - netjoin = " %Knjoin %G│ %b\"$*\"%n"; - - # /names list - names_prefix = " %Y│%n "; - names_nick = "%_$2$0%_%n$1- "; - names_nick_op = "{names_nick $* %R}"; - names_nick_halfop = "{names_nick $* %C}"; - names_nick_voice = "{names_nick $* %K}"; - names_users = " %Y│%n $1"; - names_channel = "\"%b$*\"%n"; - - # DCC - dcc = "%g$*%n"; - dccfile = "%_$*%_"; - - # DCC chat, own msg/action - dccownmsg = "%g /* $0 ($1-) */"; - dccownnick = "$*%n"; - dccownquerynick = "$*%n"; - dccownaction = "{action $*}"; - dccownaction_target = "{action $*}"; - - # DCC chat, others - dccmsg = "%g/* $1- ($0) */"; - dccquerynick = "%g$*%n"; - dccaction = "{action $*}"; - - ######## statusbar/topicbar ############################ - - # default background for all statusbars. You can also give - # the default foreground color for statusbar items. - sb_background = "%9"; - - # default backround for "default" statusbar group - #sb_default_bg = "%4"; - # background for prompt / input line - sb_prompt_bg = "%n"; - # background for info statusbar - #sb_info_bg = "%1"; - # background for topicbar (same default) - #sb_topic_bg = "%4"; - - # text at the beginning of statusbars. sb-item already puts - # space there,so we don't use anything by default. - sbstart = "%K │"; - # text at the end of statusbars. Use space so that it's never - # used for anything. - sbend = ""; - - topicsbstart = "%K╘━━━━━━━━━━━━━┑ %K$N on $C: $S%N$*"; - topicsbend = "$*"; - - prompt = "%K └─ %n"; - - sb = "%K$*%N "; - sbmode = " %K[%g+%n$*%K]"; - sbaway = " %g/* zZzZ */"; - sbservertag = ":%g$0"; - sbnickmode = "$0"; - - # Usercount - sb_usercount = "{sb %_$0%_ nicks ($1-)}"; - sb_uc_ircops = "%_*%_$*"; - sb_uc_ops = "%_@%r$*%n"; - sb_uc_halfops = "%_%%%g$*%n"; - sb_uc_voices = "%_+%y$*%n"; - sb_uc_normal = "%w$*%n"; - sb_uc_space = " "; - # activity in statusbar - - # ',' separator - sb_act_sep = " "; - # normal text - sb_act_text = "%g%9$*%n"; - # public message - sb_act_msg = "%Y%9$*%n"; - # hilight - sb_act_hilight = "%R%9$*%n"; - # hilight with specified color, $0 = color, $1 = text - sb_act_hilight_color = "%R%9$1-%n"; -}; - -######################################################## - -formats = { - "fe-common/core" = { - line_start = "{line_start}"; - line_start_irssi = "{line_start}"; - - join = " join %g│ %n {channick $0}"; - part = " part %r│ %n {channick $0}"; - kick = " kicked %r│ %n {channick $0}"; - quit = " quit %r│ %n {channick $0}"; - quit_once = "{channel $3} {channick $0} {chanhost $1} %kquit {reason %C$2}"; - - nick_changed = "%K{channick $[-13]0}%G│ %n {channick $1}"; - your_nick_changed = "%K you %G│ %n {channick $1}"; - - pubmsg = "%b%w$2\00313$[-11]0%b%K │ %n $1"; - - own_msg = "{ownmsgnick $2 {ownnick $[-11]0}}$1"; - own_msg_channel = "{ownmsgnick $3 {ownnick $[-11]0}{msgchannel $1}}$2"; - own_msg_private_query = "{ownprivmsgnick {ownprivnick $[-11]2}}$1"; - - pubmsg_me = "{pubmsghinick $2 {menick $[-11]0}}$1"; - pubmsg_me_channel = "{pubmsghinick $3 {menick $[-11]0}{msgchannel $1}}$2"; - - pubmsg_hilight = "{pubmsghinick $3 {menick $[-11]1}}$2"; - pubmsg_hilight_channel = "{pubmsghinick $0 $[-11]1$4{msgchannel $2}}$3"; - - pubmsg_channel = "{pubmsgnick {pubnick %G$[-11]0}$2}$1"; - msg_private_query = "{privmsgnick $[-11]0}$2"; - new_topic = " %ctopic %K│ %B'$2' %non %b$1%n%K[set by {nick %y$0}]"; - - endofnames = " names %Y│%m Total: {hilight $2} ops, {hilight $3} halfops, {hilight $4} voices, {hilight $5} normal%n"; - }; - "fe-common/irc" = { - chanmode_change = " mode %y│ %n {channick $1}"; - server_chanmode_change = "% mode %y│ %n {channick $1}"; - - own_action = "{ownaction $[-11]0} $1"; - action_private = "{pvtaction $[-11]0}$1"; - action_private_query = "{pvtaction_query $[-11]0} $2"; - action_public = "{pubaction $[-11]0}$1"; - }; -}; diff --git a/irssi/config b/irssi/config @@ -31,6 +31,18 @@ servers = ( use_ssl = "no"; ssl_verify = "no"; autoconnect = "yes"; + }, + { + address = "irc.iotek.org"; + chatnet = "iotek"; + port = "6667"; + autoconnect = "yes"; + }, + { + address = "irc.freenode.net"; + chatnet = "freenode"; + port = "6667"; + autoconnect = "yes"; } ); @@ -99,12 +111,14 @@ chatnets = { SILC = { type = "SILC"; }; Ubuntu = { type = "IRC"; }; esper = { type = "IRC"; }; + iotek = { type = "IRC"; }; + freenode = { type = "IRC"; nick = "bannanalord"; }; }; channels = ( - { name = "#irssi"; chatnet = "ircnet"; autojoin = "No"; }, - { name = "silc"; chatnet = "silc"; autojoin = "No"; }, - { name = "#squirrels"; chatnet = "esper"; autojoin = "yes"; } + { name = "#squirrels"; chatnet = "esper"; autojoin = "yes"; }, + { name = "#nixers"; chatnet = "iotek"; autojoin = "yes"; }, + { name = "#OREChat"; chatnet = "freenode"; autojoin = "yes"; } ); aliases = { @@ -268,11 +282,8 @@ statusbar = { }; }; settings = { - core = { - real_name = "Paul"; - user_name = "paul"; - nick = "paull"; - }; + core = { real_name = "Paul"; user_name = "paul"; nick = "paull"; }; "fe-text" = { actlist_sort = "refnum"; indent = "10"; }; - "fe-common/core" = { theme = "asdf"; }; + "fe-common/core" = { theme = "greenish"; }; }; +ignores = ( ); diff --git a/irssi/default.theme b/irssi/default.theme @@ -1,294 +0,0 @@ -# When testing changes, the easiest way to reload the theme is with /RELOAD. -# This reloads the configuration file too, so if you did any changes remember -# to /SAVE it first. Remember also that /SAVE overwrites the theme file with -# old data so keep backups :) - -# TEMPLATES: - -# The real text formats that irssi uses are the ones you can find with -# /FORMAT command. Back in the old days all the colors and texts were mixed -# up in those formats, and it was really hard to change the colors since you -# might have had to change them in tens of different places. So, then came -# this templating system. - -# Now the /FORMATs don't have any colors in them, and they also have very -# little other styling. Most of the stuff you need to change is in this -# theme file. If you can't change something here, you can always go back -# to change the /FORMATs directly, they're also saved in these .theme files. - -# So .. the templates. They're those {blahblah} parts you see all over the -# /FORMATs and here. Their usage is simply {name parameter1 parameter2}. -# When irssi sees this kind of text, it goes to find "name" from abstracts -# block below and sets "parameter1" into $0 and "parameter2" into $1 (you -# can have more parameters of course). Templates can have subtemplates. -# Here's a small example: -# /FORMAT format hello {colorify {underline world}} -# abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; } -# When irssi expands the templates in "format", the final string would be: -# hello %G%Uworld%U%n -# ie. underlined bright green "world" text. -# and why "$0-", why not "$0"? $0 would only mean the first parameter, -# $0- means all the parameters. With {underline hello world} you'd really -# want to underline both of the words, not just the hello (and world would -# actually be removed entirely). - -# COLORS: - -# You can find definitions for the color format codes in docs/formats.txt. - -# There's one difference here though. %n format. Normally it means the -# default color of the terminal (white mostly), but here it means the -# "reset color back to the one it was in higher template". For example -# if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would -# print yellow "foo" (as set with %Y) but "bar" would be green, which was -# set at the beginning before the {foo} template. If there wasn't the %g -# at start, the normal behaviour of %n would occur. If you _really_ want -# to use the terminal's default color, use %N. - -############################################################################# - -# default foreground color (%N) - -1 is the "default terminal color" -default_color = "-1"; - -# print timestamp/servertag at the end of line, not at beginning -info_eol = "false"; - -# these characters are automatically replaced with specified color -# (dark grey by default) -replaces = { "[]=" = "%K$*%n"; }; - -abstracts = { - ## - ## generic - ## - - # text to insert at the beginning of each non-message line - line_start = "%B-%n!%B-%n "; - - # timestamp styling, nothing by default - timestamp = "$*"; - - # any kind of text that needs hilighting, default is to bold - hilight = "%_$*%_"; - - # any kind of error message, default is bright red - error = "%R$*%n"; - - # channel name is printed - channel = "%_$*%_"; - - # nick is printed - nick = "%_$*%_"; - - # nick host is printed - nickhost = "[$*]"; - - # server name is printed - server = "%_$*%_"; - - # some kind of comment is printed - comment = "[$*]"; - - # reason for something is printed (part, quit, kick, ..) - reason = "{comment $*}"; - - # mode change is printed ([+o nick]) - mode = "{comment $*}"; - - ## - ## channel specific messages - ## - - # highlighted nick/host is printed (joins) - channick_hilight = "%C$*%n"; - chanhost_hilight = "{nickhost %c$*%n}"; - - # nick/host is printed (parts, quits, etc.) - channick = "%c$*%n"; - chanhost = "{nickhost $*}"; - - # highlighted channel name is printed - channelhilight = "%c$*%n"; - - # ban/ban exception/invite list mask is printed - ban = "%c$*%n"; - - ## - ## messages - ## - - # the basic styling of how to print message, $0 = nick mode, $1 = nick - msgnick = "%K<%n$0$1-%K>%n %|"; - - # message from you is printed. "msgownnick" specifies the styling of the - # nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the - # whole line. - - # Example1: You want the message text to be green: - # ownmsgnick = "{msgnick $0 $1-}%g"; - # Example2.1: You want < and > chars to be yellow: - # ownmsgnick = "%Y{msgnick $0 $1-%Y}%n"; - # (you'll also have to remove <> from replaces list above) - # Example2.2: But you still want to keep <> grey for other messages: - # pubmsgnick = "%K{msgnick $0 $1-%K}%n"; - # pubmsgmenick = "%K{msgnick $0 $1-%K}%n"; - # pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n"; - # ownprivmsgnick = "%K{msgnick $*%K}%n"; - # privmsgnick = "%K{msgnick %R$*%K}%n"; - - # $0 = nick mode, $1 = nick - ownmsgnick = "{msgnick $0 $1-}"; - ownnick = "%_$*%n"; - - # public message in channel, $0 = nick mode, $1 = nick - pubmsgnick = "{msgnick $0 $1-}"; - pubnick = "%N$*%n"; - - # public message in channel meant for me, $0 = nick mode, $1 = nick - pubmsgmenick = "{msgnick $0 $1-}"; - menick = "%Y$*%n"; - - # public highlighted message in channel - # $0 = highlight color, $1 = nick mode, $2 = nick - pubmsghinick = "{msgnick $1 $0$2-%n}"; - - # channel name is printed with message - msgchannel = "%K:%c$*%n"; - - # private message, $0 = nick, $1 = host - privmsg = "[%R$0%K(%r$1-%K)%n] "; - - # private message from you, $0 = "msg", $1 = target nick - ownprivmsg = "[%r$0%K(%R$1-%K)%n] "; - - # own private message in query - ownprivmsgnick = "{msgnick $*}"; - ownprivnick = "%_$*%n"; - - # private message in query - privmsgnick = "{msgnick %R$*%n}"; - - ## - ## Actions (/ME stuff) - ## - - # used internally by this theme - action_core = "%_ * $*%n"; - - # generic one that's used by most actions - action = "{action_core $*} "; - - # own action, both private/public - ownaction = "{action $*}"; - - # own action with target, both private/public - ownaction_target = "{action_core $0}%K:%c$1%n "; - - # private action sent by others - pvtaction = "%_ (*) $*%n "; - pvtaction_query = "{action $*}"; - - # public action sent by others - pubaction = "{action $*}"; - - - ## - ## other IRC events - ## - - # whois - whois = "%# $[8]0 : $1-"; - - # notices - ownnotice = "[%r$0%K(%R$1-%K)]%n "; - notice = "%K-%M$*%K-%n "; - pubnotice_channel = "%K:%m$*"; - pvtnotice_host = "%K(%m$*%K)"; - servernotice = "%g!$*%n "; - - # CTCPs - ownctcp = "[%r$0%K(%R$1-%K)] "; - ctcp = "%g$*%n"; - - # wallops - wallop = "%_$*%n: "; - wallop_nick = "%n$*"; - wallop_action = "%_ * $*%n "; - - # netsplits - netsplit = "%R$*%n"; - netjoin = "%C$*%n"; - - # /names list - names_prefix = ""; - names_nick = "[%_$0%_$1-] "; - names_nick_op = "{names_nick $*}"; - names_nick_halfop = "{names_nick $*}"; - names_nick_voice = "{names_nick $*}"; - names_users = "[%g$*%n]"; - names_channel = "%G$*%n"; - - # DCC - dcc = "%g$*%n"; - dccfile = "%_$*%_"; - - # DCC chat, own msg/action - dccownmsg = "[%r$0%K($1-%K)%n] "; - dccownnick = "%R$*%n"; - dccownquerynick = "%_$*%n"; - dccownaction = "{action $*}"; - dccownaction_target = "{action_core $0}%K:%c$1%n "; - - # DCC chat, others - dccmsg = "[%G$1-%K(%g$0%K)%n] "; - dccquerynick = "%G$*%n"; - dccaction = "%_ (*dcc*) $*%n %|"; - - ## - ## statusbar - ## - - # default background for all statusbars. You can also give - # the default foreground color for statusbar items. - sb_background = "%4%w"; - - # default backround for "default" statusbar group - #sb_default_bg = "%4"; - # background for prompt / input line - sb_prompt_bg = "%n"; - # background for info statusbar - sb_info_bg = "%8"; - # background for topicbar (same default) - #sb_topic_bg = "%4"; - - # text at the beginning of statusbars. sb-item already puts - # space there,so we don't use anything by default. - sbstart = ""; - # text at the end of statusbars. Use space so that it's never - # used for anything. - sbend = " "; - - topicsbstart = "{sbstart $*}"; - topicsbend = "{sbend $*}"; - - prompt = "[$*] "; - - sb = " %c[%n$*%c]%n"; - sbmode = "(%c+%n$*)"; - sbaway = " (%GzZzZ%n)"; - sbservertag = ":$0 (change with ^X)"; - sbnickmode = "$0"; - - # activity in statusbar - - # ',' separator - sb_act_sep = "%c$*"; - # normal text - sb_act_text = "%c$*"; - # public message - sb_act_msg = "%W$*"; - # hilight - sb_act_hilight = "%M$*"; - # hilight with specified color, $0 = color, $1 = text - sb_act_hilight_color = "$0$1-%n"; -}; diff --git a/irssi/greenish.theme b/irssi/greenish.theme @@ -0,0 +1,294 @@ +# When testing changes, the easiest way to reload the theme is with /RELOAD. +# This reloads the configuration file too, so if you did any changes remember +# to /SAVE it first. Remember also that /SAVE overwrites the theme file with +# old data so keep backups :) + +# TEMPLATES: + +# The real text formats that irssi uses are the ones you can find with +# /FORMAT command. Back in the old days all the colors and texts were mixed +# up in those formats, and it was really hard to change the colors since you +# might have had to change them in tens of different places. So, then came +# this templating system. + +# Now the /FORMATs don't have any colors in them, and they also have very +# little other styling. Most of the stuff you need to change is in this +# theme file. If you can't change something here, you can always go back +# to change the /FORMATs directly, they're also saved in these .theme files. + +# So .. the templates. They're those {blahblah} parts you see all over the +# /FORMATs and here. Their usage is simply {name parameter1 parameter2}. +# When irssi sees this kind of text, it goes to find "name" from abstracts +# block below and sets "parameter1" into $0 and "parameter2" into $1 (you +# can have more parameters of course). Templates can have subtemplates. +# Here's a small example: +# /FORMAT format hello {colorify {underline world}} +# abstracts = { colorify = "%G$0-%n"; underline = "%U$0-%U"; } +# When irssi expands the templates in "format", the final string would be: +# hello %G%Uworld%U%n +# ie. underlined bright green "world" text. +# and why "$0-", why not "$0"? $0 would only mean the first parameter, +# $0- means all the parameters. With {underline hello world} you'd really +# want to underline both of the words, not just the hello (and world would +# actually be removed entirely). + +# COLORS: + +# You can find definitions for the color format codes in docs/formats.txt. + +# There's one difference here though. %n format. Normally it means the +# default color of the terminal (white mostly), but here it means the +# "reset color back to the one it was in higher template". For example +# if there was /FORMAT test %g{foo}bar, and foo = "%Y$0%n", irssi would +# print yellow "foo" (as set with %Y) but "bar" would be green, which was +# set at the beginning before the {foo} template. If there wasn't the %g +# at start, the normal behaviour of %n would occur. If you _really_ want +# to use the terminal's default color, use %N. + +############################################################################# + +# default foreground color (%N) - -1 is the "default terminal color" +default_color = "-1"; + +# print timestamp/servertag at the end of line, not at beginning +info_eol = "false"; + +# these characters are automatically replaced with specified color +# (dark grey by default) +replaces = { "[]=" = "%K$*%n"; }; + +abstracts = { + ## + ## generic + ## + + # text to insert at the beginning of each non-message line + line_start = "%B-%n!%B-%n "; + + # timestamp styling, nothing by default + timestamp = "$*"; + + # any kind of text that needs hilighting, default is to bold + hilight = "%_$*%_"; + + # any kind of error message, default is bright red + error = "%R$*%n"; + + # channel name is printed + channel = "%_$*%_"; + + # nick is printed + nick = "%_$*%_"; + + # nick host is printed + nickhost = "[$*]"; + + # server name is printed + server = "%_$*%_"; + + # some kind of comment is printed + comment = "[$*]"; + + # reason for something is printed (part, quit, kick, ..) + reason = "{comment $*}"; + + # mode change is printed ([+o nick]) + mode = "{comment $*}"; + + ## + ## channel specific messages + ## + + # highlighted nick/host is printed (joins) + channick_hilight = "%G$*%n"; + chanhost_hilight = "{nickhost %g$*%n}"; + + # nick/host is printed (parts, quits, etc.) + channick = "%g$*%n"; + chanhost = "{nickhost $*}"; + + # highlighted channel name is printed + channelhilight = "%g$*%n"; + + # ban/ban exception/invite list mask is printed + ban = "%g$*%n"; + + ## + ## messages + ## + + # the basic styling of how to print message, $0 = nick mode, $1 = nick + msgnick = "%K<%n$0$1-%K>%n %|"; + + # message from you is printed. "msgownnick" specifies the styling of the + # nick ($0 part in msgnick) and "ownmsgnick" specifies the styling of the + # whole line. + + # Example1: You want the message text to be green: + # ownmsgnick = "{msgnick $0 $1-}%g"; + # Example2.1: You want < and > chars to be yellow: + # ownmsgnick = "%Y{msgnick $0 $1-%Y}%n"; + # (you'll also have to remove <> from replaces list above) + # Example2.2: But you still want to keep <> grey for other messages: + # pubmsgnick = "%K{msgnick $0 $1-%K}%n"; + # pubmsgmenick = "%K{msgnick $0 $1-%K}%n"; + # pubmsghinick = "%K{msgnick $1 $0$2-%n%K}%n"; + # ownprivmsgnick = "%K{msgnick $*%K}%n"; + # privmsgnick = "%K{msgnick %R$*%K}%n"; + + # $0 = nick mode, $1 = nick + ownmsgnick = "{msgnick $0 $1-}"; + ownnick = "%_$*%n"; + + # public message in channel, $0 = nick mode, $1 = nick + pubmsgnick = "{msgnick $0 $1-}"; + pubnick = "%N$*%n"; + + # public message in channel meant for me, $0 = nick mode, $1 = nick + pubmsgmenick = "{msgnick $0 $1-}"; + menick = "%Y$*%n"; + + # public highlighted message in channel + # $0 = highlight color, $1 = nick mode, $2 = nick + pubmsghinick = "{msgnick $1 $0$2-%n}"; + + # channel name is printed with message + msgchannel = "%K:%g$*%n"; + + # private message, $0 = nick, $1 = host + privmsg = "[%R$0%K(%r$1-%K)%n] "; + + # private message from you, $0 = "msg", $1 = target nick + ownprivmsg = "[%r$0%K(%R$1-%K)%n] "; + + # own private message in query + ownprivmsgnick = "{msgnick $*}"; + ownprivnick = "%_$*%n"; + + # private message in query + privmsgnick = "{msgnick %R$*%n}"; + + ## + ## Actions (/ME stuff) + ## + + # used internally by this theme + action_core = "%_ * $*%n"; + + # generic one that's used by most actions + action = "{action_core $*} "; + + # own action, both private/public + ownaction = "{action $*}"; + + # own action with target, both private/public + ownaction_target = "{action_core $0}%K:%g$1%n "; + + # private action sent by others + pvtaction = "%_ (*) $*%n "; + pvtaction_query = "{action $*}"; + + # public action sent by others + pubaction = "{action $*}"; + + + ## + ## other IRC events + ## + + # whois + whois = "%# $[8]0 : $1-"; + + # notices + ownnotice = "[%r$0%K(%R$1-%K)]%n "; + notice = "%K-%M$*%K-%n "; + pubnotice_channel = "%K:%m$*"; + pvtnotice_host = "%K(%m$*%K)"; + servernotice = "%g!$*%n "; + + # CTCPs + ownctcp = "[%r$0%K(%R$1-%K)] "; + ctcp = "%g$*%n"; + + # wallops + wallop = "%_$*%n: "; + wallop_nick = "%n$*"; + wallop_action = "%_ * $*%n "; + + # netsplits + netsplit = "%R$*%n"; + netjoin = "%G$*%n"; + + # /names list + names_prefix = ""; + names_nick = "[%_$0%_$1-] "; + names_nick_op = "{names_nick $*}"; + names_nick_halfop = "{names_nick $*}"; + names_nick_voice = "{names_nick $*}"; + names_users = "[%g$*%n]"; + names_channel = "%G$*%n"; + + # DCC + dcc = "%g$*%n"; + dccfile = "%_$*%_"; + + # DCC chat, own msg/action + dccownmsg = "[%r$0%K($1-%K)%n] "; + dccownnick = "%R$*%n"; + dccownquerynick = "%_$*%n"; + dccownaction = "{action $*}"; + dccownaction_target = "{action_core $0}%K:%g$1%n "; + + # DCC chat, others + dccmsg = "[%G$1-%K(%g$0%K)%n] "; + dccquerynick = "%G$*%n"; + dccaction = "%_ (*dcc*) $*%n %|"; + + ## + ## statusbar + ## + + # default background for all statusbars. You can also give + # the default foreground color for statusbar items. + sb_background = "%0%w"; + + # default backround for "default" statusbar group + #sb_default_bg = "%4"; + # background for prompt / input line + sb_prompt_bg = "%n"; + # background for info statusbar + sb_info_bg = "%8"; + # background for topicbar (same default) + #sb_topic_bg = "%4"; + + # text at the beginning of statusbars. sb-item already puts + # space there,so we don't use anything by default. + sbstart = ""; + # text at the end of statusbars. Use space so that it's never + # used for anything. + sbend = " "; + + topicsbstart = "{sbstart $*}"; + topicsbend = "{sbend $*}"; + + prompt = "[$*] "; + + sb = " %g[%n$*%g]%n"; + sbmode = "(%g+%n$*)"; + sbaway = " (%GzZzZ%n)"; + sbservertag = ":$0 (change with ^X)"; + sbnickmode = "$0"; + + # activity in statusbar + + # ',' separator + sb_act_sep = "%g$*"; + # normal text + sb_act_text = "%g$*"; + # public message + sb_act_msg = "%W$*"; + # hilight + sb_act_hilight = "%M$*"; + # hilight with specified color, $0 = color, $1 = text + sb_act_hilight_color = "$0$1-%n"; +}; diff --git a/irssi/scripts/autorun/nickcolor.pl b/irssi/scripts/autorun/nickcolor.pl @@ -0,0 +1,156 @@ +use strict; +use Irssi 20020101.0250 (); +use vars qw($VERSION %IRSSI); +$VERSION = "1"; +%IRSSI = ( + authors => "Timo Sirainen, Ian Peters", + contact => "tss\@iki.fi", + name => "Nick Color", + description => "assign a different color for each nick", + license => "Public Domain", + url => "http://irssi.org/", + changed => "2002-03-04T22:47+0100" +); + +# hm.. i should make it possible to use the existing one.. +Irssi::theme_register([ + 'pubmsg_hilight', '{pubmsghinick $0 $3 $1}$2' +]); + +my %saved_colors; +my %session_colors = {}; +my @colors = qw/2 3 4 5 6 7 9 10 11 12 13/; + +sub load_colors { + open COLORS, "$ENV{HOME}/.irssi/saved_colors"; + + while (<COLORS>) { + # I don't know why this is necessary only inside of irssi + my @lines = split "\n"; + foreach my $line (@lines) { + my($nick, $color) = split ":", $line; + $saved_colors{$nick} = $color; + } + } + + close COLORS; +} + +sub save_colors { + open COLORS, ">$ENV{HOME}/.irssi/saved_colors"; + + foreach my $nick (keys %saved_colors) { + print COLORS "$nick:$saved_colors{$nick}\n"; + } + + close COLORS; +} + +# If someone we've colored (either through the saved colors, or the hash +# function) changes their nick, we'd like to keep the same color associated +# with them (but only in the session_colors, ie a temporary mapping). + +sub sig_nick { + my ($server, $newnick, $nick, $address) = @_; + my $color; + + $newnick = substr ($newnick, 1) if ($newnick =~ /^:/); + + if ($color = $saved_colors{$nick}) { + $session_colors{$newnick} = $color; + } elsif ($color = $session_colors{$nick}) { + $session_colors{$newnick} = $color; + } +} + +# This gave reasonable distribution values when run across +# /usr/share/dict/words + +sub simple_hash { + my ($string) = @_; + chomp $string; + my @chars = split //, $string; + my $counter; + + foreach my $char (@chars) { + $counter += ord $char; + } + + $counter = $colors[$counter % 11]; + + return $counter; +} + +# FIXME: breaks /HILIGHT etc. +sub sig_public { + my ($server, $msg, $nick, $address, $target) = @_; + my $chanrec = $server->channel_find($target); + return if not $chanrec; + my $nickrec = $chanrec->nick_find($nick); + return if not $nickrec; + my $nickmode = $nickrec->{op} ? "@" : $nickrec->{voice} ? "+" : ""; + + # Has the user assigned this nick a color? + my $color = $saved_colors{$nick}; + + # Have -we- already assigned this nick a color? + if (!$color) { + $color = $session_colors{$nick}; + } + + # Let's assign this nick a color + if (!$color) { + $color = simple_hash $nick; + $session_colors{$nick} = $color; + } + + $color = "0".$color if ($color < 10); + $server->command('/^format pubmsg {pubmsgnick $2 {pubnick '.chr(3).$color.'$0}}$1'); +} + +sub cmd_color { + my ($data, $server, $witem) = @_; + my ($op, $nick, $color) = split " ", $data; + + $op = lc $op; + + if (!$op) { + Irssi::print ("No operation given"); + } elsif ($op eq "save") { + save_colors; + } elsif ($op eq "set") { + if (!$nick) { + Irssi::print ("Nick not given"); + } elsif (!$color) { + Irssi::print ("Color not given"); + } elsif ($color < 2 || $color > 14) { + Irssi::print ("Color must be between 2 and 14 inclusive"); + } else { + $saved_colors{$nick} = $color; + } + } elsif ($op eq "clear") { + if (!$nick) { + Irssi::print ("Nick not given"); + } else { + delete ($saved_colors{$nick}); + } + } elsif ($op eq "list") { + Irssi::print ("\nSaved Colors:"); + foreach my $nick (keys %saved_colors) { + Irssi::print (chr (3) . "$saved_colors{$nick}$nick" . + chr (3) . "1 ($saved_colors{$nick})"); + } + } elsif ($op eq "preview") { + Irssi::print ("\nAvailable colors:"); + foreach my $i (2..14) { + Irssi::print (chr (3) . "$i" . "Color #$i"); + } + } +} + +load_colors; + +Irssi::command_bind('color', 'cmd_color'); + +Irssi::signal_add('message public', 'sig_public'); +Irssi::signal_add('event nick', 'sig_nick'); diff --git a/irssi/scripts/autorun/xchatnickcolor.pl b/irssi/scripts/autorun/xchatnickcolor.pl @@ -1 +0,0 @@ -../xchatnickcolor.pl- \ No newline at end of file diff --git a/irssi/scripts/xchatnickcolor.pl b/irssi/scripts/xchatnickcolor.pl @@ -1,160 +0,0 @@ -use strict; -use Irssi 20020101.0250 (); -use vars qw($VERSION %IRSSI); -$VERSION = "1"; -%IRSSI = ( - authors => "Timo Sirainen, Ian Peters", - contact => "tss\@iki.fi", - name => "Nick Color", - description => "assign a different color for each nick", - license => "Public Domain", - url => "http://irssi.org/", - changed => "2002-03-04T22:47+0100" -); - -# hm.. i should make it possible to use the existing one.. -Irssi::theme_register([ - 'pubmsg_hilight', '{pubmsghinick $0 $3 $1}$2' -]); - -my %saved_colors; -my %session_colors = {}; -my @colors = qw/ 2 3 4 5 6 7 9 10 11 12 13 14 15/; - -sub load_colors { - open COLORS, "$ENV{HOME}/.irssi/saved_colors"; - - while (<COLORS>) { - # I don't know why this is necessary only inside of irssi - my @lines = split "\n"; - foreach my $line (@lines) { - my($nick, $color) = split ":", $line; - $saved_colors{$nick} = $color; - } - } - - close COLORS; -} - -sub save_colors { - open COLORS, ">$ENV{HOME}/.irssi/saved_colors"; - - foreach my $nick (keys %saved_colors) { - print COLORS "$nick:$saved_colors{$nick}\n"; - } - - close COLORS; -} - -# If someone we've colored (either through the saved colors, or the hash -# function) changes their nick, we'd like to keep the same color -# associated -# with them (but only in the session_colors, ie a temporary mapping). - -sub sig_nick { - my ($server, $newnick, $nick, $address) = @_; - my $color; - - $newnick = substr ($newnick, 1) if ($newnick =~ /^:/); - - if ($color = $saved_colors{$nick}) { - $session_colors{$newnick} = $color; - } elsif ($color = $session_colors{$nick}) { - $session_colors{$newnick} = $color; - } -} - -# This gave reasonable distribution values when run across -# /usr/share/dict/words - -sub simple_hash { - my ($string) = @_; - chomp $string; - my @chars = split //, $string; - my $counter; - - foreach my $char (@chars) { - $counter += ord $char; - } - - $counter = $colors[$counter % 11]; - - return $counter; -} - -# FIXME: breaks /HILIGHT etc. -sub sig_public { - my ($server, $msg, $nick, $address, $target) = @_; - my $chanrec = $server->channel_find($target); - return if not $chanrec; - my $nickrec = $chanrec->nick_find($nick); - return if not $nickrec; - my $nickmode = $nickrec->{op} ? "@" : $nickrec->{voice} ? "+" : ""; - - # Has the user assigned this nick a color? - my $color = $saved_colors{$nick}; - - # Have -we- already assigned this nick a color? - if (!$color) { - $color = $session_colors{$nick}; - } - - # Let's assign this nick a color - if (!$color) { - $color = simple_hash $nick; - $session_colors{$nick} = $color; - } - - $color = "0".$color if ($color < 10); - $server->command('/^format pubmsg %b%w$2'.chr(3).$color.'$[-11]0%b -%K │ %n $1'); - # $server->command('/^format action_public {pubaction - # '.chr(3).$color.'$0}$1'); -} - -sub cmd_color { - my ($data, $server, $witem) = @_; - my ($op, $nick, $color) = split " ", $data; - - $op = lc $op; - - if (!$op) { - Irssi::print ("No operation given"); - } elsif ($op eq "save") { - save_colors; - } elsif ($op eq "set") { - if (!$nick) { - Irssi::print ("Nick not given"); - } elsif (!$color) { - Irssi::print ("Color not given"); - } elsif ($color < 2 || $color > 14) { - Irssi::print ("Color must be between 2 and 14 inclusive"); - } else { - $saved_colors{$nick} = $color; - } - } elsif ($op eq "clear") { - if (!$nick) { - Irssi::print ("Nick not given"); - } else { - delete ($saved_colors{$nick}); - } - } elsif ($op eq "list") { - Irssi::print ("\nSaved Colors:"); - foreach my $nick (keys %saved_colors) { - Irssi::print (chr (3) . "$saved_colors{$nick}$nick" . - chr (3) . "1 ($saved_colors{$nick})"); - } - } elsif ($op eq "preview") { - Irssi::print ("\nAvailable colors:"); - foreach my $i (2..14) { - Irssi::print (chr (3) . "$i" . "Color #$i"); - } - } -} - -load_colors; - -Irssi::command_bind('color', 'cmd_color'); - -Irssi::signal_add('message public', 'sig_public'); -Irssi::signal_add('event nick', 'sig_nick');