Skip to content

Instantly share code, notes, and snippets.

@pascalpoitras
Last active June 10, 2023 16:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pascalpoitras/3d76a3969f169783102e44983f139b59 to your computer and use it in GitHub Desktop.
Save pascalpoitras/3d76a3969f169783102e44983f139b59 to your computer and use it in GitHub Desktop.
I created this for someone on IRC

weechat screenshot

/item addreplace warning_color "${buffer.local_variables.is_color_enabled}" "${color:black,red}+c is ON"

/trigger addreplace warning_item_build signal *,irc_in_MODE;*,irc_in_324
/trigger set warning_item_build conditions "${tg_signal} =~ 324$ || ${tg_signal} =~ MODE$ && ${param2} =~ (?-i)c"
/trigger set warning_item_build regex "/.*/${if:${tg_signal}=~MODE?${param2}:${param3}}/my_mode /(?-i)[^-+c]//my_mode /.*/${if:${my_mode}==*+c}/is_color_enabled"
/trigger set warning_item_build command "/command -buffer ${buffer[${info:irc_buffer,${server},${channel}}].full_name} * /buffer setvar is_color_enabled ${is_color_enabled};/item refresh warning_color"

Instructions

  1. put the warning_color item to the weechat.bar.title.items option
  2. put the 324 raw in irc.look.display_join_message

Notes

in the screenshot there is a typo "in ON" instead of "is ON", this is fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment