diff --git a/default.theme b/default.theme index da1056d5..c03b96be 100644 --- a/default.theme +++ b/default.theme @@ -1,3 +1,8 @@ +# When testing changes, the easiest way to reload the theme 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 :) + # these characters are automatically replaced with specified color replaces = { "[]<>=" = "%K$0-%n"; }; @@ -72,18 +77,28 @@ abstracts = { # 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. For example if you want the message text to be in different - # color, green for example, add %g after ownmsgnick (if it were in - # msgownnick, you'd get green '>' char after nick too) + # whole line. + + # Example1: You want the message text to be green: + # ownmsgnick = "{msgnick $0-}%g"; + # Example2.1: You want < and > chars also be white: + # ownmsgnick = "%W{msgnick $0-}%n"; + # ownnick = "$0-"; + # (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-%K}%n"; + # pubmsgmenick = "%K{msgnick $0-%K}%n"; + # pubmsghinick = "%K{msgnick $1$0$2-%K}%n"; ownmsgnick = "{msgnick $0-}"; - msgownnick = "%W$0-%n"; + ownnick = "%W$0-%n"; # public message in channel pubmsgnick = "{msgnick $0-}"; + pubnick = "%w$0-%n"; # public message in channel meant for me pubmsgmenick = "{msgnick $0-}"; - msgme = "%Y$0-%n"; + menick = "%Y$0-%n"; # public highlighted message in channel # $0 = highlight color, $1 = nick mode (@, +), $2 = nick @@ -98,6 +113,10 @@ abstracts = { # private message from you, $0 = "msg", $1 = target nick ownprivmsg = "[%r$0%K(%R$1-%K)%n] "; + # own private message in query + ownprivmsgnick = "{msgnick $0-}"; + ownprivnick = "%W$0-%n"; + # private message in query privmsgnick = "{msgnick %R$0-%n}"; diff --git a/src/fe-common/core/module-formats.c b/src/fe-common/core/module-formats.c index 9db7c8bf..2f945146 100644 --- a/src/fe-common/core/module-formats.c +++ b/src/fe-common/core/module-formats.c @@ -88,16 +88,16 @@ FORMAT_REC fecommon_core_formats[] = { /* ---- */ { NULL, "Messages", 0 }, - { "own_msg", "{ownmsgnick $2{msgownnick $0}}$1", 3, { 0, 0, 0 } }, - { "own_msg_channel", "{ownmsgnick $3{msgownnick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } }, + { "own_msg", "{ownmsgnick $2{ownnick $0}}$1", 3, { 0, 0, 0 } }, + { "own_msg_channel", "{ownmsgnick $3{ownnick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } }, { "own_msg_private", "{ownprivmsg msg $0}$1", 2, { 0, 0 } }, - { "own_msg_private_query", "{ownmsgnick {msgownnick $2}}$1", 3, { 0, 0, 0 } }, - { "pubmsg_me", "{pubmsgmenick $2{msgme $0}}$1", 3, { 0, 0, 0 } }, - { "pubmsg_me_channel", "{pubmsgmenick $3{msgme $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } }, + { "own_msg_private_query", "{ownprivmsgnick {ownprivnick $2}}$1", 3, { 0, 0, 0 } }, + { "pubmsg_me", "{pubmsgmenick $2{menick $0}}$1", 3, { 0, 0, 0 } }, + { "pubmsg_me_channel", "{pubmsgmenick $3{menick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } }, { "pubmsg_hilight", "{pubmsghinick $0 $3 $1}$2", 4, { 0, 0, 0, 0 } }, { "pubmsg_hilight_channel", "{pubmsghinick $0 $4 $1{msgchannel $2}}$3", 5, { 0, 0, 0, 0, 0 } }, - { "pubmsg", "{pubmsgnick $2$0}$1", 3, { 0, 0, 0 } }, - { "pubmsg_channel", "{pubmsgnick $3$0{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } }, + { "pubmsg", "{pubmsgnick $2{pubnick $0}}$1", 3, { 0, 0, 0 } }, + { "pubmsg_channel", "{pubmsgnick $3{pubnick $0}{msgchannel $1}}$2", 4, { 0, 0, 0, 0 } }, { "msg_private", "{privmsg $0 $1}$2", 3, { 0, 0, 0 } }, { "msg_private_query", "{privmsgnick $0}$2", 3, { 0, 0, 0 } }, { "no_msgs_got", "You have not received a message from anyone yet", 0 }, diff --git a/src/fe-common/core/themes.c b/src/fe-common/core/themes.c index 79083574..fba921e6 100644 --- a/src/fe-common/core/themes.c +++ b/src/fe-common/core/themes.c @@ -202,13 +202,11 @@ static void theme_format_append_next(THEME_REC *theme, GString *str, if (**format == 'n') chr = default_color; - if (chr != *last_color) { - if (IS_COLOR_FORMAT(chr)) - *last_color = chr; + if (IS_COLOR_FORMAT(chr)) + *last_color = chr; - g_string_append_c(str, '%'); - g_string_append_c(str, chr); - } + g_string_append_c(str, '%'); + g_string_append_c(str, chr); (*format)++; return; }