WeeChat DevCenter

Sunday, November 28 2021

Dark theme for WeeChat docs

In addition to weechat.org website, a dark theme has been added in WeeChat docs (only development docs for now: https://weechat.org/doc/devel/).
The use of this dark theme is automatic (following your desktop/browser configuration).

New dark theme (click for full size):


weechat_doc_dark.png

The light theme:


weechat_doc_light.png

Hope you like this new eye-friendly dark theme!

Wednesday, November 24 2021

Dark theme for weechat.org

A brand new dark theme has been added on WeeChat.org!

The use of this dark theme is automatic (following your desktop/browser configuration).
It can be forced by a new link displayed at the bottom of any page: "Theme: auto (dark, light)".

New dark theme (click for full size):


weechat.org_2021_dark.png

The light theme:


weechat.org_2021_light.png

Hope you like this new eye-friendly dark theme!

Sunday, September 19 2021

Version 3.3

Version 3.3 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add new plugin "typing" to display users currently writing messages on IRC channel/private buffers (IRCv3 specification)
  • enable all IRC capabilities by default (if supported by server and WeeChat), change default value of option irc.server_default.capabilities to "*"
  • implement IRCv3.2 SASL authentication, add command /auth, reconnect by default to the server in case of SASL authentication failure
  • add support of capability "message-tags" and TAGMSG messages (IRCv3 specification)
  • add command /setname, add support of message and capability "setname" (IRCv3 specification)
  • add support of FAIL/WARN/NOTE IRC messages (IRCv3 specification)
  • drop support of IRC DH-BLOWFISH and DH-AES SASL mechanisms
  • add new keys to clear, remove and restore buffers in hotlist
  • add option "certs" in command /debug
  • add options "-o", "-ol", "-i" and "-il" in command "/plugin list"
  • add split of string and shell arguments in evaluation of expressions with "split:number,seps,flags,xxx" and "split_shell:number,xxx"
  • add "${re:repl_index}" to get the index of replacement in function string_eval_expression
  • add random integer number in evaluation of expressions with "random:min,max"
  • add functions string_cut and file_copy in API
  • remember insertion order in hashtables
  • add keys/values with tags in output of irc_message_parse_to_hashtable
  • add option "-parted" in command /allchan
  • allow signals "irc_raw_in" and "irc_in" to eat messages
  • many bugs fixed.

New options:

  • irc.look.display_account_message
  • irc.look.display_extended_join
  • irc.look.typing_status_nicks
  • irc.look.typing_status_self
  • typing.look.delay_purge_paused
  • typing.look.delay_purge_typing
  • typing.look.delay_set_paused
  • typing.look.enabled_nicks
  • typing.look.enabled_self
  • typing.look.input_min_chars
  • typing.look.item_max_length

New keys:

  • Alt-h, Alt-c: clear hotlist (old key was Alt-h)
  • Alt-h, Alt-m: remove current buffer from hotlist
  • Alt-h, Alt-r: restore latest hotlist removed in the current buffer
  • Alt-h, Alt-Shift-R: restore latest hotlist removed in all buffers

Saturday, September 4 2021

Version 3.2.1

Version 3.2.1 is available, it fixes a security vulnerability: a malformed websocket frame received in relay plugin can cause a crash (CVE-2021-40516).

Upgrade is recommended for all users.

Sunday, June 13 2021

Version 3.2

Version 3.2 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • use XDG directories by default (config, data, cache, runtime)
  • add support of IRC SASL mechanisms SCRAM-SHA-1, SCRAM-SHA-256 and SCRAM-SHA-512
  • automatically load system certificates without giving a hardcoded path to the file with certificates
  • add options to customize commands executed on system signals received (SIGHUP, SIGQUIT, SIGTERM, SIGUSR1, SIGUSR2)
  • add bar item "tls_version" and buflist format
  • add signals "cursor_start" and "cursor_end"
  • add function crypto_hmac in API
  • add translated string in evaluation of expressions with "translate:xxx"
  • add info "weechat_daemon"
  • add Python stub for WeeChat API
  • add variables "${tg_shell_argc}" and "${tg_shell_argvN}" in command trigger evaluated strings
  • many bugs fixed.

New options:

  • buflist.format.tls_version
  • irc.color.item_tls_version_ok
  • irc.color.item_tls_version_deprecated
  • irc.color.item_tls_version_insecure
  • weechat.network.gnutls_ca_system
  • weechat.network.gnutls_ca_user
  • weechat.signal.sighup
  • weechat.signal.sigquit
  • weechat.signal.sigterm
  • weechat.signal.sigusr1
  • weechat.signal.sigusr2

Options removed:

  • weechat.network.gnutls_ca_file

Saturday, June 12 2021

IRC SASL SCRAM authentication

IRC SASL SCRAM authentication has been added in WeeChat 3.2, with 3 new mechanisms:

  • scram-sha-1: SASL SCRAM with SHA-1 digest algorithm,
  • scram-sha-256: SASL SCRAM with SHA-256 digest algorithm,
  • scram-sha-512: SASL SCRAM with SHA-512 digest algorithm.

References:

XDG directories

Support of XDG directories has been added in WeeChat 3.2 and these directories are now used by default.
Note: for compatibility reasons, if a legacy directory ~/.weechat exists, it is used instead of XDG directories.

The files are stored in four different directories:

  • config (eg: /home/user/.config/weechat)
  • data (eg: /home/user/.local/share/weechat)
  • cache (eg: /home/user/.cache/weechat)
  • runtime (eg: /run/user/1000/weechat).

As this led to a lot of changes in WeeChat code but also in the scripts, a new specification repository has been setup on GitHub: https://github.com/weechat/specs.we...

Please read the XDG directories specification for the complete list of changes: https://specs.weechat.org/specs/001....

Saturday, May 29 2021

IRC channels moved to libera.chat

Due to the recent events affecting freenode (see references below), the WeeChat official and unofficial channels have moved from freenode to libera.chat:

  • official channels: #weechat, #weechat-fr
  • non-official channels: #weechat-de, #weechat-fi
  • off-topic channel: #weechat-offtopic

To add a new libera server and connect to it, joining only the English support channel:

/server add libera irc.libera.chat/6697 -ssl -autojoin=#weechat
/connect libera

To join the French channel as well:

/server add libera irc.libera.chat/6697 -ssl -autojoin=#weechat,#weechat-fr
/connect libera

If all your freenode channels have moved to libera, you can also rename the server and change the address:

/disconnect freenode
/server rename freenode libera
/set irc.server.libera.addresses "irc.libera.chat/6697"
/set irc.server.libera.ssl on
/connect libera

See you soon on libera!

References:

Sunday, March 7 2021

Version 3.1

Version 3.1 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add options weechat.look.hotlist_update_on_buffer_switch and weechat.look.read_marker_update_on_buffer_switch
  • add option sec.crypt.passphrase_command to read passphrase from an external program on startup, remove option sec.crypt.passphrase_file
  • improve debug in command /eval
  • add options "setvar" and "delvar" in command /buffer, rename option "localvar" to "listvar"
  • add buffer local variable "completion_default_template" (evaluated) to override the value of option weechat.completion.default_template
  • add option "recreate" in command /filter
  • add raw string in evaluation of expressions with "raw:xxx"
  • add evaluation of conditions in evaluation of expressions with "eval_cond:xxx"
  • add info_hashtable "secured_data"
  • add info "irc_is_message_ignored"
  • add IRC server option "default_chantypes", used when the server does not send them in message 005
  • add variable ${tg_trigger_name} in command trigger evaluated strings
  • many bugs fixed.

New options:

  • buflist.look.use_items
  • irc.server.xxx.default_chantypes
  • sec.crypt.passphrase_command
  • weechat.look.hotlist_update_on_buffer_switch
  • weechat.look.read_marker_update_on_buffer_switch

Options removed:

  • sec.crypt.passphrase_file (replaced by sec.crypt.passphrase_command)

Friday, February 26 2021

Script anti_password.py

You've sent your password to the wrong window (ie: WeeChat), and it is now public, viewed by 1,500 people?
For now, you have to change your password.

For the future, a new script is now available: anti_password.py.

How does it work?

When you press Enter to send text to a buffer, the script detects if the input is a password, in two ways:

  1. If the input matches a condition: number of words, lower/upper/digit/special chars.
  2. If a secured data value is in the input (reminder: secured data is the recommended way to store all your passwords in WeeChat) (requires WeeChat ≥ 3.1).

If a password is detected, the text is not sent to the buffer (3 times with the default config).

Note: the WeeChat commands (ie /xxx) are ignored and are always sent.

Options

There are 4 options to configure the script (see /fset anti_password for a list of options with help):

  • allowed_regex: allowed regular expression (checked first)
  • password_condition: the condition used to detect a password
  • check_secured_data: whether the script checks for secured data (disabled, input equals secured data or secured data included in input)
  • max_rejects: the number of times the same input is rejected; after this number, the input is finally sent to the buffer.

Keep your passwords safe!

Updated on 2021-03-13: added option allowed_regex.

Sunday, January 31 2021

Version 3.0.1

Version 3.0.1 is available, it fixes a crash in spell plugin with IRC color codes and two other minor bugs.

Upgrade is recommended if you enable the spell checking (not enabled by default).

Wednesday, November 11 2020

Version 3.0

Version 3.0 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add option script.scripts.download_enabled (it must be explicitly set to "on" to allow download of scripts from weechat.org)
  • add option "-oerr" in command /exec to send stderr to buffer (now disabled by default)
  • allow to send text on buffers and evaluate command with commands /allchan, /allpv and /allserv
  • add option fset.look.auto_refresh
  • add variable "tg_argc" in data set by command trigger and variable "tg_trigger_name" in data set by all triggers
  • add argument "bytes" in API function string_dyn_concat
  • add API function string_color_code_size
  • add optional list of colors in infos "nick_color" and "nick_color_name"
  • irc: add pointer to irc_nick in focus of bar item "buffer_nicklist"
  • many bugs fixed.

New options:

  • fset.look.auto_refresh
  • script.scripts.download_enabled

Saturday, July 18 2020

Version 2.9

Version 2.9 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add command "handshake" in weechat relay protocol and nonce to prevent replay attacks during authentication
  • add command "completion" in weechat relay protocol
  • add option relay.network.auth_timeout, add status "waiting_auth" in irc and weechat relay protocols
  • add option "color_bg_inactive" in bars
  • add bar items "buffer_nicklist_count_groups" and "buffer_nicklist_count_all"
  • add key Alt+Enter to insert a newline, set default size for input bar to 0 (automatic)
  • add a scalable WeeChat logo (SVG)
  • add base 16/32/64 encoding/decoding in evaluation of expressions with "base_encode:base,xxx" and "base_decode:base,xxx"
  • add case sensitive wildcard matching comparison operator ("==*" and "!!*") and case sensitive/insensitive include comparison operators ("==-", "!!-", "=-", "!-") in evaluation of expressions
  • add keys Alt+Shift+B and Alt+Shift+N to toggle buflist/nicklist bars
  • reload configuration files when the SIGHUP signal is received
  • add API functions to complete words in command line
  • evaluate option buflist.look.sort
  • add support of "UTF8MAPPING" in IRC server
  • display IRC "account" messages in buffers
  • evaluate arguments when a trigger of type "command" is created
  • enable again command "/guile eval"
  • fix slow send of data to relay clients when SSL is enabled
  • add CI with GitHub Actions
  • run tests on plugins only if the plugins are enabled and compiled
  • GnuTLS is now a required dependency
  • disable build of JavaScript plugin by default, remove Debian package "weechat-javascript"
  • many bugs fixed.

New options:

  • irc.color.message_account
  • irc.look.smart_filter_account
  • relay.network.auth_timeout
  • relay.network.nonce_size
  • relay.network.password_hash_algo
  • relay.network.password_hash_iterations
  • weechat.bar.xxx.color_bg_inactive (one color per bar)

New keys:

  • Alt+Enter: insert a newline
  • Alt+Shift+B: toggle buflist
  • Alt+Shift+N: toggle nicklist bar

Sunday, March 29 2020

Version 2.8

Version 2.8 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add variable "old_full_name" in buffer, set during buffer renaming
  • add debug option "-d" in command /eval
  • add functions crypto_hash and crypto_hash_pbkdf2 in plugin API
  • add infos "auto_connect" and "weechat_headless"
  • add pointer "window" in bar item evaluation (buflist)
  • add support of fake IRC servers (no I/O, for testing purposes)
  • accept hash of password in init command of weechat relay protocol with option "password_hash" (PBKDF2, SHA256, SHA512)
  • reject client with weechat relay protocol if password or totp is received in init command but not set in WeeChat
  • add support of Ruby 2.7
  • add support of PHP 7.4
  • many bugs fixed.

Thursday, February 20 2020

Version 2.7.1

Version 2.7.1 is available, it fixes three security vulnerabilities:

  • a malformed IRC message 324 (channel mode) can cause a buffer overflow and possibly a crash (CVE-2020-8955)
  • a new IRC message 005 received with longer nick prefixes can cause a buffer overflow and possibly a crash (CVE-2020-9760)
  • a malformed IRC message 352 (WHO) can cause a crash (CVE-2020-9759).

Upgrade is recommended for all users.

Sunday, December 8 2019

Version 2.7

Version 2.7 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add option logger.file.color_lines (support of ANSI color codes in log files)
  • add filters on IRC raw buffer
  • add IRC server option "ssl_password"
  • add option irc.look.display_pv_warning_address
  • add options irc.color.message_kick and irc.color.reason_kick
  • add option xfer.file.download_temporary_suffix
  • add option weechat.look.nick_color_hash_salt
  • add different WeeChat icons sizes
  • add calculation of expression in evaluation of expressions with "calc:xxx"
  • add optional default path (evaluated) in completion "filename"
  • add modifier "color_encode_ansi"
  • add support of Guile 2.2
  • add support of Python 3.8
  • many bugs fixed.

New options:

  • irc.look.display_pv_warning_address
  • irc.color.message_kick
  • irc.color.reason_kick
  • irc.server_default.charset_message
  • irc.server_default.ssl_password
  • logger.file.color_lines
  • weechat.look.nick_color_hash_salt
  • xfer.file.download_temporary_suffix

Options removed:

  • irc.network.channel_encode (replaced by irc.server_default.charset_message)

Sunday, September 8 2019

Version 2.6

Version 2.6 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • use Python 3 by default
  • add support of 32767 color pairs
  • add option "close" in command /window
  • add infos "term_colors" and "term_color_pairs"
  • add infolist "buflist" with list of buffer pointers
  • evaluate option exec.command.shell, change default value to "${env:SHELL}"
  • add filters "h=xxx" and "he=xxx" to filter options by description in fset buffer (translated or in English)
  • make command char optional in server option "command"
  • remove default aliases /ame and /amsg
  • many bugs fixed.

Tuesday, July 2 2019

Python 3 by default

As scheduled in the Python 3 transition page, since July 1st 2019, the "python" plugin is now compiled with Python 3 by default.

The changes:

  • If Python 3 is found, the "python" plugin is compiled with Python 3.
  • If Python 3 is not found, the "python" plugin is not built at all (even if Python 2 is installed).

The CMake option "ENABLE_PYTHON3" has been renamed to "ENABLE_PYTHON2" (configure option "--enable-python2"). If this option is enabled, the "python" plugin is built with Python 2 (if found), with a fallback on Python 3.

The development packages for Debian and Ubuntu are now compiled with Python 3 (it should be available soon for Raspbian). The future stable versions (≥ 2.6) will be compiled with Python 3 as well.

Thursday, June 6 2019

Version 2.5

Version 2.5 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add support of UNIX domain sockets in relay plugin
  • add option relay.weechat.commands
  • add trigger hooks "info" and "info_hashtable"
  • add option xfer.network.speed_limit_recv
  • add option weechat.look.buffer_time_same
  • add option weechat.look.prefix_same_nick_middle
  • add option "addreplace" in command /filter
  • add bar items "irc_nick", "irc_host" and "irc_nick_host"
  • add functions command_options and string_match_list in plugin API
  • rename aspell plugin to spell
  • use getopt to parse command line arguments
  • many bugs fixed.

New options:

  • relay.weechat.commands
  • weechat.look.buffer_time_same
  • weechat.look.prefix_same_nick_middle
  • xfer.network.speed_limit_recv

Sunday, February 17 2019

Version 2.4

Version 2.4 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add command line option "-t" (or "--temp-dir") to create a temporary WeeChat home (deleted on exit)
  • add support of Time-based One-Time Password (TOTP), add infos "totp_generate" and "totp_validate", add support of TOTP as second authentication factor in weechat protocol (relay plugin)
  • add buflist variable ${number2}, always set with the indented buffer number
  • add option exec.command.shell to customize the shell used with /exec -sh
  • add support of close frame in websocket connection (relay plugin)
  • add functions string_base_encode and string_base_decode in API, remove functions string_encode_base64 and string_decode_base64
  • add default keys Ctrl+F11/F12 to scroll up/down one page in nicklist (same action as F11/F12)
  • add default buflist keys Ctrl+F1/F2 to scroll up/down one page in buflist (same action as F1/F2)
  • many bugs fixed.

New options:

  • exec.command.shell
  • relay.network.totp_secret
  • relay.network.totp_window

New keys:

  • Ctrl+F1/F2: scroll up/down one page in buflist
  • Ctrl+F11/F12: scroll up/down one page in nicklist

Monday, January 14 2019

Support of TOTP

TOTP (Time-based One-Time Password) support has been added in WeeChat, which can now generate and check TOTP validity.

A TOTP is generated with:

  • the secret (encoded in base 32),
  • the time (by default 0, which is the current time),
  • the number of digits (4 to 10 digits are supported, 6 is the default and recommended value).

Relay plugin

The TOTP can be used as second authentication factor in the relay plugin, with two new options:

  • relay.network.totp_secret: the TOTP secret, encoded in base 32
  • relay.network.totp_window: the allowed window: number of TOTP allowed before and after the current time window.

For example to set the secret using secured data (just replace "xxxxx" by your secret in base 32):

/secure set relay_totp_secret xxxxx
/set relay.network.totp_secret "${sec.data.relay_totp_secret}"

Then your relay client must support and send the TOTP value, in addition to the password, in the "init" command:

init password=secretpassword,totp=123456

If the password is valid and that TOTP is valid for the current time, the authentication is successful.

Infos / eval

You can also generate or validate TOTP with two new infos in WeeChat:

  • totp_generate: generate a TOTP
  • totp_validate: validate a TOTP

For example to show the value of TOTP for the secret "secretbase32", current time, with 6 digits:

/eval -n ${info:totp_generate,secretbase32,0,6}

Documentation

You can read more about TOTP in the docs:

Sunday, October 21 2018

Version 2.3

Version 2.3 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add hook "line"
  • add option "-P" (or "--plugins") to customize the plugins to load at startup
  • allow multiple options "-r" ("--run-command") in command line arguments
  • allow allow partial buffer name and multiple arguments in command /buffer close
  • allow specifying buffer number/name for /buffer localvar
  • allow creation of temporary variables with the regex in trigger plugin
  • add real IP in client description in relay plugin
  • add repeat of string in evaluation of expressions with "repeat:count,string"
  • many bugs fixed.

Saturday, July 14 2018

Version 2.2

Version 2.2 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add support of list options in curl
  • allow merge of buffers by name in command /buffer
  • add reverse of string in evaluation of expressions with "rev:"
  • add indexed ban list and completion for /unban and /unquiet (IRC plugin)
  • add support for IRCv3.2 Client Capability Negotiation
  • add support for IRCv3.2 invite-notify
  • add support for IRCv3.2 chghost, add options irc.look.smart_filter_chghost and irc.color.message_chghost
  • add option xfer.network.send_ack
  • add support of Python 3.7
  • fix memory leaks scripting plugins
  • many bugs fixed.

New options:

  • irc.color.message_chghost
  • irc.look.smart_filter_chghost
  • xfer.network.send_ack

Sunday, May 6 2018

New design for weechat.org

The WeeChat site weechat.org has been improved with many changes. It is now fully responsive, using Bootstrap toolkit.

Hope you enjoy the new site!

The history of weechat.org in images: click on each screenshot for full-size.

  • In 2009, for the major release 0.3.0 of WeeChat, the site was rewritten in Python using Django (it was initially written PHP):


weechat.org_2009.png

  • In 2013, for the 10th birthday of WeeChat, a new logo was introduced (it is still used today), and the design of site was improved:


weechat.org_2013.png

  • In 2018, for the 15th birthday of WeeChat, the site becomes responsive, using Bootstrap toolkit:


weechat.org_2018.png

Sunday, March 18 2018

Version 2.1

Version 2.1 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • add a headless mode (new binary: "weechat-headless")
  • add options "-newbuffer", "-free", "-switch" and "-y" in command /print (with support of buffers with free content)
  • add option "add" in command /buffer
  • add option weechat.completion.partial_completion_templates to force partial completion on specific templates
  • add IRC server option "split_msg_max_length"
  • add option logger.file.fsync
  • add option logger.look.backlog_conditions
  • add configuration file for each script plugin ("python.conf", "perl.conf", ...)
  • add "eval" option in script commands and info "xxx_eval" (python, perl, ruby, lua and guile)
  • add infos "xxx_interpreter" and "xxx_version" in script plugins
  • add option "version" in script commands
  • display the script name in stdout/stderr output from scripts
  • many bugs fixed.

New options:

  • python.look.check_license
  • python.look.eval_keep_context
  • perl.look.check_license
  • perl.look.eval_keep_context
  • ruby.look.check_license
  • ruby.look.eval_keep_context
  • lua.look.check_license
  • lua.look.eval_keep_context
  • tcl.look.check_license
  • tcl.look.eval_keep_context
  • guile.look.check_license
  • guile.look.eval_keep_context
  • javascript.look.check_license
  • javascript.look.eval_keep_context
  • php.look.check_license
  • php.look.eval_keep_context
  • irc.server_default.split_msg_max_length
  • logger.file.fsync
  • logger.look.backlog_conditions
  • weechat.completion.partial_completion_templates

Wednesday, December 20 2017

Version 2.0.1

Version 2.0.1 is available, it fixes a Python API bug in functions hook_fd and hook_connect.

Sunday, December 3 2017

Version 2.0

Version 2.0 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • new plugin "fset" (fast set of WeeChat and plugins options)
  • new plugin "php" (support of PHP scripts)
  • add option buflist.look.add_newline
  • add two new bar items "buflist2" and "buflist3" using the same format configuration options
  • add flag "input_get_empty" in buffer
  • add signals "buffer_filters_enabled" and "buffer_filters_disabled"
  • support loading of plugins from path in environment variable "WEECHAT_EXTRA_LIBDIR"
  • add infolist "alias_default" (list of default aliases)
  • make value optional in command /buffer set
  • allow floating point and hexadecimal numbers in comparison of evaluated values
  • add option weechat.look.save_config_with_fsync
  • add support of prefix "quiet:" in function key_unbind() to quietly remove keys
  • add argument "recurse_subdirs" in function exec_on_files()
  • add local variable "filter" in the script buffer
  • remove recursive evaluation of extra variables in buflist
  • change type of arguments status/gnutls_rc/sock in hook_connect() callback from string to integer (in scripting API)
  • change type of argument fd in hook_fd() callback from string to integer (in scripting API)
  • fix display bugs with filtered lines
  • fix display of nicks in nicklist when they are in a group with sub-groups
  • call the config hook when options are renamed or removed
  • fix parsing of CAP command in relay/irc
  • many bugs fixed.

New configuration files:

  • fset.conf

New options:

  • buflist.look.add_newline
  • plugins.var.php.check_license
  • weechat.look.save_config_with_fsync

New keys:

  • in mouse context:
    • left button on fset buffer: change current line
    • right button on fset buffer: toggle boolean or edit value
    • right button + drag & drop left/right: change value
    • right button + drag & drop up/down: mark/unmark options

Saturday, November 4 2017

Split of scripting Debian packages

Starting on Sunday, Nov 3rd 2017 at 02:00 (CET), the Debian packaging will change in weechat.org Debian/Ubuntu/Raspbian repositories: the scripting plugins are split into multiple packages, so that Perl, Python, Ruby, ... can be installed separately.

Only development packages will be updated, the released versions (1.9.1 and earlier) will not be updated.

Important: if you are using the WeeChat development packages from weechat.org, you will have to install manually the scripting packages (according to the languages you'll use in WeeChat).

Old packaging (until 2017-11-04):

  • weechat
  • weechat-core
  • weechat-curses
  • weechat-dbg
  • weechat-dev
  • weechat-doc
  • weechat-plugins
  • weechat-plugins (14 plugins):
    • aspell
    • exec
    • fifo
    • guile
    • javascript
    • lua
    • perl
    • php
    • python
    • relay
    • ruby
    • script
    • tcl
    • trigger

New packaging, with 8 new packages:

  • weechat
  • weechat-core
  • weechat-curses
  • weechat-dbg
  • weechat-dev
  • weechat-doc
  • weechat-plugins
  • weechat-plugins (6 plugins remaining):
    • aspell
    • exec
    • fifo
    • relay
    • script
    • trigger
  • weechat-python
  • weechat-perl
  • weechat-ruby
  • weechat-lua
  • weechat-tcl
  • weechat-guile
  • weechat-javascript
  • weechat-php

GitHub issue: https://github.com/weechat/weechat/issues/1085

Tuesday, October 17 2017

Automatic tests of scripting API

Automatic tests of the scripting API have been added a few days ago. For now only a small part of API functions are checked.

This is done with 3 new Python scripts in directory tests/scripts/python:

  • unparse.py: convert Python code to other languages (including Python itself)
  • testapigen.py: generate scripts in all languages to test the API
  • testapi.py scripting API tests

The script unparse.py can convert Python code to other languages: Python, Perl, Ruby, Lua, TCL, Guile, JavaScript and PHP (new plugin in version 2.0). The Python code is first parsed using AST (ast.parse), and then this tree is recursively scanned to produce code in Python or another language (note: only part of AST is supported, the minimum for WeeChat tests).

Example of code conversion in other languages:

$ ./unparse.py --language all
Enter the code to convert (Enter + ctrl+D to end)

def test_list_new():
    ptr_list = weechat.list_new()
    check(ptr_list != '')
    check(weechat.list_size(ptr_list) == 0)

python:
def test_list_new():
    ptr_list = weechat.list_new()
    check(ptr_list != '')
    check(weechat.list_size(ptr_list) == 0)

perl:
sub test_list_new
{
    $ptr_list = weechat::list_new();
    check($ptr_list ne "");
    check(weechat::list_size($ptr_list) == 0);
}

ruby:
def test_list_new
    ptr_list = weechat.list_new()
    check(ptr_list != '')
    check(weechat.list_size(ptr_list) == 0)
end

lua:
function test_list_new()
    ptr_list = weechat.list_new()
    check(ptr_list ~= '')
    check(weechat.list_size(ptr_list) == 0)
end

tcl:
proc test_list_new {} {
    set ptr_list [weechat::list_new]
    check [expr {$ptr_list ne ""}]
    check [expr {[weechat::list_size $ptr_list] == 0}]
}

guile:
(define (test_list_new)
    (let ((ptr_list (weechat:list_new)))
        (begin
            (check (string<> ptr_list ""))
            (check (= (weechat:list_size ptr_list) 0))
        )
    )
)

javascript:
function test_list_new() {
    ptr_list = weechat.list_new()
    check(ptr_list != '')
    check(weechat.list_size(ptr_list) == 0)
}

php:
function test_list_new()
{
    $ptr_list = weechat_list_new();
    check($ptr_list != "");
    check(weechat_list_size($ptr_list) == 0);
}

The script testapigen.py generates scripts in all supported languages. These scripts are loaded in WeeChat during tests, and print the results of tests, for example in Python:

>>> Running command: /script load -q ./tmp_weechat_test/testapi/testapi.py
>>> Running command: /testapi.py
>>>
>>> ------------------------------
>>> Testing python API
  > TESTS: 57
  > test_plugins
      TEST OK: weechat.plugin_get_name('') == 'core'
      TEST OK: weechat.plugin_get_name(weechat.buffer_get_pointer(weechat.buffer_search_main(), 'plugin')) == 'core'
  > test_strings
      TEST OK: weechat.charset_set('iso-8859-15') == 1
      TEST OK: weechat.charset_set('') == 1
      TEST OK: weechat.iconv_to_internal('iso-8859-15', 'abc') == 'abc'
      TEST OK: weechat.iconv_from_internal('iso-8859-15', 'abcd') == 'abcd'
      TEST OK: weechat.gettext('abcdef') == 'abcdef'
      TEST OK: weechat.ngettext('file', 'files', 1) == 'file'
      TEST OK: weechat.ngettext('file', 'files', 2) == 'files'
      TEST OK: weechat.strlen_screen('abcd') == 4
      TEST OK: weechat.string_match('abcdef', 'abc*', 0) == 1
      TEST OK: weechat.string_eval_path_home('test ${abc}', {}, {'abc': '123'}, {}) == 'test 123'
      TEST OK: weechat.string_mask_to_regex('test*mask') == 'test.*mask'
      TEST OK: weechat.string_has_highlight('my test string', 'test,word2') == 1
      TEST OK: weechat.string_has_highlight_regex('my test string', 'test|word2') == 1
      TEST OK: weechat.string_remove_color('test', '?') == 'test'
      TEST OK: weechat.string_is_command_char('/test') == 1
      TEST OK: weechat.string_is_command_char('test') == 0
      TEST OK: weechat.string_input_for_buffer('test') == 'test'
      TEST OK: weechat.string_input_for_buffer('/test') == ''
      TEST OK: weechat.string_input_for_buffer('//test') == '/test'
      TEST OK: weechat.string_eval_expression('100 > 50', {}, {}, {'type': 'condition'}) == '1'
      TEST OK: weechat.string_eval_expression('${buffer.full_name}', {}, {}, {}) == 'core.weechat'
  > test_lists
      TEST OK: ptr_list != ''
      TEST OK: weechat.list_size(ptr_list) == 0
      TEST OK: weechat.list_size(ptr_list) == 1
      TEST OK: weechat.list_size(ptr_list) == 2
      TEST OK: weechat.list_search(ptr_list, 'abc') == item_abc
      TEST OK: weechat.list_search(ptr_list, 'def') == item_def
      TEST OK: weechat.list_search(ptr_list, 'ghi') == ''
      TEST OK: weechat.list_search_pos(ptr_list, 'abc') == 0
      TEST OK: weechat.list_search_pos(ptr_list, 'def') == 1
      TEST OK: weechat.list_search_pos(ptr_list, 'ghi') == -1
      TEST OK: weechat.list_casesearch(ptr_list, 'abc') == item_abc
      TEST OK: weechat.list_casesearch(ptr_list, 'def') == item_def
      TEST OK: weechat.list_casesearch(ptr_list, 'ghi') == ''
      TEST OK: weechat.list_casesearch(ptr_list, 'ABC') == item_abc
      TEST OK: weechat.list_casesearch(ptr_list, 'DEF') == item_def
      TEST OK: weechat.list_casesearch(ptr_list, 'GHI') == ''
      TEST OK: weechat.list_casesearch_pos(ptr_list, 'abc') == 0
      TEST OK: weechat.list_casesearch_pos(ptr_list, 'def') == 1
      TEST OK: weechat.list_casesearch_pos(ptr_list, 'ghi') == -1
      TEST OK: weechat.list_casesearch_pos(ptr_list, 'ABC') == 0
      TEST OK: weechat.list_casesearch_pos(ptr_list, 'DEF') == 1
      TEST OK: weechat.list_casesearch_pos(ptr_list, 'GHI') == -1
      TEST OK: weechat.list_get(ptr_list, 0) == item_abc
      TEST OK: weechat.list_get(ptr_list, 1) == item_def
      TEST OK: weechat.list_get(ptr_list, 2) == ''
      TEST OK: weechat.list_string(item_def) == 'def2'
      TEST OK: weechat.list_next(item_abc) == item_def
      TEST OK: weechat.list_next(item_def) == ''
      TEST OK: weechat.list_prev(item_abc) == ''
      TEST OK: weechat.list_prev(item_def) == item_abc
      TEST OK: weechat.list_size(ptr_list) == 1
      TEST OK: weechat.list_get(ptr_list, 0) == item_def
      TEST OK: weechat.list_get(ptr_list, 1) == ''
      TEST OK: weechat.list_size(ptr_list) == 0
  > TESTS END

>>> Tests python: 57 tests, 57 OK, 0 errors, 0 unexpected messages, 9 ms

Saturday, September 23 2017

Version 1.9.1

Version 1.9.1 is available, it fixes a security vulnerability: a crash can happen in logger plugin when converting date/time specifiers in file mask. Two other bugs are fixed as well in buflist and relay plugins.

Upgrade is recommended for all users.

Monday, June 26 2017

Fset plugin

A new plugin called "fset" (Fast Set) has been added: a built-in and highly customizable replacement for the script iset.pl, with tons of new features!

It has the same features as iset.pl:

  • list options in a dedicated buffer
  • filter options by file, section, name, value or changed options
  • all colors can be customized
  • bar with help on currently selected option
  • different color for values changed
  • display of inherited values
  • keys and input to toggle, add/sub, set, reset and unset options
  • mouse actions on buffer.

And it comes with many new features:

  • flexible format using evaluated expression and automatic size for columns
  • options can be displayed on multiple lines
  • integrated with /set command, using conditions (option fset.look.conditioncatchset)
  • advanced filtering: by type, by changed value (filter on name or value), and using an evaluated condition
  • sort of options (fset.look.sort)
  • append to value
  • mark of options, group actions
  • export of options in a file.

Screenshot (click for full size):

weechat_fset.png

Sunday, June 25 2017

Version 1.9

Version 1.9 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

New major features in this release:

  • improve speed of nicklist bar item callback
  • add auto scroll of buflist bar with new option buflist.look.auto_scroll
  • add option buflist.format.name
  • add variables ${format_name}, ${current_buffer} and ${merged} in buflist
  • display a warning in buflist when the script buffers.pl is loaded
  • add server/channel pointers in trigger IRC callbacks
  • add API functions config_option_get_string and hdata_compare
  • fix bind of Space key
  • many bugs fixed.

New options:

  • buflist.format.name
  • buflist.look.auto_scroll

New keys:

  • F1/F2: scroll buflist bar

Saturday, May 13 2017

Version 1.8

Version 1.8 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

Important: please read the release notes if you are upgrading to this version (from any other version).

New major features in this release:

  • add option weechat.completion.nick_case_sensitive
  • add wilcard matching operator, cut of string and ternary operator in evaluation of expressions
  • add resize of window parents with /window resize (h/v)size
  • add plugin "buflist" (bar with list of buffers)
  • add arraylist and dynamic string functions in API
  • add option "open" in command /server
  • add signal "irc_server_lag_changed" and store the lag in the server buffer (local variable)
  • add aspell options to control delimiters in suggestions
  • add option "-include" in commands /allchan, /allpv and /allserv
  • many bugs fixed.

New options:

  • aspell.color.suggestion_delimiter_dict
  • aspell.color.suggestion_delimiter_word
  • aspell.look.suggestion_delimiter_dict
  • aspell.look.suggestion_delimiter_word
  • weechat.completion.nick_case_sensitive

Options changed:

  • option aspell.color.suggestions renamed to aspell.color.suggestion

Options removed:

  • script.scripts.url_force_https (now the option script.scripts.url uses HTTPS by default)

New keys:

  • in mouse context:
    • control key + wheel on buflist bar: change current buffer
    • mouse buttons on buflist bar: change current buffer or move buffers in list

Saturday, April 22 2017

Version 1.7.1

Version 1.7.1 is available, it fixes a security problem: a crash can happen in IRC plugin when parsing the filename received via DCC.

Upgrade is recommended for all users.

Sunday, January 15 2017

Version 1.7

Version 1.7 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

Important: please read the release notes if you are upgrading to this version (from any other version).

New major features in this release:

  • add option weechat.look.align_multiline_words
  • add option "time" in command /debug
  • add infos "uptime" and "pid"
  • add optional arguments in completion template
  • add irc server option "usermode"
  • add tag "self_msg" on self messages
  • add configuration file fifo.conf for fifo plugin
  • add option "-oc" in command /exec
  • many bugs fixed.

New options:

  • fifo.file.enabled
  • fifo.file.path
  • irc.server_default.usermode (and same option in servers)
  • weechat.look.align_multiline_words

Options changed:

  • option plugins.var.fifo.fifo renamed to fifo.file.enabled (type changed from string to boolean)

Sunday, October 2 2016

Version 1.6

Version 1.6 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

Important: please read the release notes if you are upgrading to this version (from any other version).

New major features in this release:

  • add optional argument "lowest", "highest" or level mask in command /input hotlist_clear
  • add option "cycle" in command /buffer
  • add "extra" argument to evaluate extra variables in function string_eval_expression()
  • add option relay.network.allow_empty_password
  • add support for one-time triggers
  • rename server options "default_msg_{kick|part|quit}" to "msg_{kick|part|quit}", evaluate them
  • allow escape of comma in command "init" (weechat relay protocol)
  • many bugs fixed.

New options:

  • relay.network.allow_empty_password
  • option "post_action" in each trigger

Options changed:

  • server options "default_msg_{kick|part|quit}" renamed to "msg_{kick|part|quit}"

Sunday, May 1 2016

Version 1.5

Version 1.5 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

Important: please read the release notes if you are upgrading to this version (from any other version).

New major features in this release:

  • add support of functions in API function "hook_process"
  • move of nick coloring options from irc plugin to core
  • move irc bar item "away" to core
  • add pointer in callbacks used in scripting API
  • add option irc.network.sasl_fail_unavailable
  • add Portuguese translations
  • many bugs fixed.

New options:

  • irc.network.sasl_fail_unavailable

Options changed:

  • irc.look.nick_color_force moved to weechat.look.nick_color_force
  • irc.look.nick_color_hash moved to weechat.look.nick_color_hash
  • irc.look.nick_color_stop_chars moved to weechat.look.nick_color_stop_chars
  • irc.look.item_away_message moved to weechat.look.item_away_message
  • irc.color.item_away moved to weechat.color.item_away

Sunday, January 10 2016

Version 1.4

Version 1.4 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

Important: please read the release notes if you are upgrading to this version (from any other version).

New major features in this release:

  • add a parent name in options, display inherited values if null in /set output
  • add option weechat.look.paste_auto_add_newline
  • add /fifo command
  • track real names using extended-join and WHO (IRC)
  • add support of SNI (Server Name Indication) in SSL connection to IRC server
  • add support of IRC "cap-notify" capability
  • add IRC command /cap
  • add hex dump of messages in raw buffer when debug is enabled for irc plugin
  • add option relay.irc.backlog_since_last_message
  • add option script.scripts.download_timeout
  • add scripts to build Debian packages
  • many bugs fixed.

New options:

  • relay.irc.backlog_since_last_message
  • script.scripts.download_timeout
  • weechat.color.chat_value_null
  • weechat.look.paste_auto_add_newline

Options changed:

  • irc.network.alternate_nick moved into IRC servers (irc.server.xxx.nicks_alternate)

Friday, December 25 2015

Inherited option values

Options can now have a parent option, and the value of option inherits from parent when it is null (if null is allowed).

For now, only IRC server options (irc.server.<name>.xxx) are inheriting from parent options (irc.server_default.<name>.xxx).

The command /set shows the inherited value (and the default inherited if the value is set to null). Script iset.pl has been updated as well (version 4.0 supports this feature, and is compatible with old WeeChat).

Enjoy and Merry Christmas!

Screenshot of this new feature (click for full size):

weechat_set_inherited_values.png

Monday, August 24 2015

Hex dump in IRC raw buffer

Hex dump of IRC messages can now be displayed in raw buffer, this can be useful to debug problems with charsets or some special chars.

It is displayed if debug is set with a level >= 2 for the irc plugin, for example: /debug set irc 2.

Screenshot (click for full size):

weechat_irc_raw_hex_dump.png

Sunday, August 16 2015

Version 1.3

Version 1.3 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

Important: please read the release notes if you are upgrading to this version (from any other version).

New major features in this release:

  • keep scroll after interactive search in buffer
  • add optional confirmation on /upgrade
  • add signal "signal_sighup"
  • add IRC options irc.color.topic_current, irc.network.channel_encode
  • many bugs fixed.

New options:

  • irc.color.topic_current
  • irc.network.channel_encode
  • weechat.look.confirm_upgrade
  • weechat.look.key_grab_delay

Options changed:

  • script.scripts.dir renamed to script.scripts.path

Keys changed:

  • in search context (ctrl-R):
    • ctrl-R: search text/regex here (at scroll position)
    • ctrl-J / ctrl-M / Enter: stop search here (at scroll position)
    • ctrl-Q: stop search and scroll to bottom of buffer

Sunday, May 10 2015

Version 1.2

Version 1.2 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

Important: please read the release notes if you are upgrading to this version (from any other version).

New major features in this release:

  • add options to customize word chars (for detecting word boundaries)
  • add a welcome message on first WeeChat run
  • add options to customize quoted messages (in cursor mode)
  • add support of environment variables in evaluated expressions
  • add support of IRC SASL mechanism "ecdsa-nist256p-challenge"
  • add support of SHA-256 and SHA-512 algorithms in IRC server option "ssl_fingerprint"
  • add support of IRC capability "account-notify"
  • remove "freenode" server from default config
  • new script plugin for javascript
  • many bugs fixed.

New options:

  • irc.server_default.sasl_key (and same option in servers)
  • plugins.var.javascript.check_license
  • weechat.look.quote_nick_prefix
  • weechat.look.quote_nick_suffix
  • weechat.look.quote_time_format
  • weechat.look.word_chars_highlight
  • weechat.look.word_chars_input

Sunday, May 3 2015

Ubuntu repositories

Starting from today, 8 new chroots have been added for automatic builds of weechat-devel on Ubuntu (and some manual builds of stable version).

Here's the full list of repositories (amd64/i386 for Debian/Ubuntu, armhf for Raspbian):

  • Debian sid (unstable): devel
  • Debian stretch (testing): devel
  • Debian jessie (stable): devel + 1.1.1
  • Debian wheezy (oldstable): devel + 1.1.1
  • Debian squeeze (oldoldstable): devel + 1.1.1
  • Ubuntu vivid (15.04) (new): devel
  • Ubuntu utopic (14.10) (new): devel + 1.1.1
  • Ubuntu trusty (14.04) (new): devel + 1.1.1
  • Ubuntu precise (12.04) (new): devel + 1.1.1
  • Raspbian wheezy (oldstable): devel + 1.1.1

Repositories are visible on: https://weechat.org/download/debian/

Saturday, March 14 2015

New plugin Javascript

A new plugin called "javascript" has been added to WeeChat. You can now load and execute Javascript scripts in WeeChat!

This plugin uses Google's v8 engine.

WeeChat now supports Python, Perl, Ruby, Lua, Tcl, Guile and Javascript!

To load/unload JS scripts, you can use the /script or /javascript command.

An example of script is available here: https://weechat.org/files/temp/scripts/example.js.

Sunday, February 8 2015

SASL ECDSA-NIST256P-CHALLENGE

The support of a new SASL mechanism called "ecdsa-nist256p-challenge" has been added three weeks ago.
This new mechanism uses a challenge with public/private key, so no password is required to connect.

Instructions to configure and use this mechanism are in user's guide: https://weechat.org/doc/devel/user/en/#irc_sasl_authentication.

Important notes:

  • GnuTLS ≥ 3.0.21 is required.
  • This mechanism can only be used on servers supporting it (for example servers using atheme, like freenode).

Sunday, January 25 2015

Version 1.1.1

Version 1.1.1 is available!

This is a bug fix and maintenance release, see ChangeLog for detail.

Sunday, January 11 2015

Version 1.1

Version 1.1 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

Important: please read the release notes if you are upgrading to this version (from any other version).

New major features in this release:

  • complete inline commands in input
  • allow incomplete commands if unambiguous
  • improve speed of completions
  • add bar item and signals for mouse status
  • use bar conditions on root bars
  • add option "reorder" in command /server
  • open irc channel buffers before the join is received from server
  • add server option "sasl_fail"
  • add support for color codes 16-99 in IRC messages
  • disable SSLv3 by default
  • add support of IRC capability "extended-join"
  • add options "stop" and "start" in command /relay
  • use HTTPS by default in script plugin for downloads
  • add option "restore" in command /trigger
  • evaluate and replace regex groups at same time in trigger (new and incompatible format)
  • many bugs fixed.

New options:

  • irc.look.buffer_open_before_autojoin
  • irc.look.buffer_open_before_join
  • irc.look.temporary_servers
  • irc.server_default.sasl_fail
  • relay.network.ssl_priorities
  • script.scripts.url_force_https
  • weechat.look.command_incomplete
  • weechat.look.item_mouse_status
  • weechat.color.status_mouse
  • weechat.completion.command_inline

Sunday, September 28 2014

Version 1.0.1

Version 1.0.1 is available!

This is a bug fix and maintenance release, see ChangeLog for detail.

Friday, August 15 2014

Version 1.0

Yay, version 1.0 is available!

As usual, many new features and bug fixes, see ChangeLog for detail.

Important: please read the release notes if you are upgrading to this version (from any other version).

New major features in this release:

  • plugin "trigger": Swiss Army knife for WeeChat (replaces "rmodifier" plugin) (see this post)
  • plugin "exec": execute external commands (replaces script "shell.py") (see this post)
  • bare display: easy click on long URLs and text selection with mouse (see this post)
  • support of environment variables in /set command
  • hidden buffers
  • negated tags in filters
  • toggle of filters in specific buffers
  • flexible conditions for adding/removing buffers in hotlist
  • text search in buffers with free content
  • support of wildcard "*" inside masks
  • support of nested variables in evaluated expressions
  • tag with host in IRC messages displayed
  • support of "away-notify" IRC capability
  • IRC commands: /allpv, /remove, /unquiet
  • bar items: buffer_short_name, irc_nick_modes
  • unit tests

New options:

  • irc.color.item_nick_modes
  • irc.look.join_auto_add_chantype
  • relay.network.clients_purge_delay
  • weechat.color.status_nicklist_count
  • weechat.look.bare_display_exit_on_input
  • weechat.look.bare_display_time_format
  • weechat.look.hotlist_add_conditions (replaces weechat.look.hotlist_add_buffer_if_away)
  • weechat.look.hotlist_remove

Options changed:

  • irc.look.item_channel_modes_hide_key renamed to irc.look.item_channel_modes_hide_args

New keys:

  • alt-"-": toggle filters in current buffer
  • alt-"l" (L): bare display
  • alt-"j", alt-"f": jump to first buffer

Friday, March 28 2014

Source code of weechat.org

The source code of weechat.org is now available on GitHub: https://github.com/weechat/weechat.org.

It is written in Python and uses Django, and gettext for translations.

Designers, Python/Django developers and especially translators are welcome!

- page 1 of 4