buflist: add variable ${current_buffer} in bar item evaluation

v2.8-utf8proc
Sébastien Helleu 2017-05-19 07:39:23 +02:00
parent 138af6e7dd
commit b522060cef
22 changed files with 74 additions and 14 deletions

View File

@ -18,6 +18,10 @@ https://weechat.org/files/releasenotes/ReleaseNotes-devel.html[release notes]
[[v1.9]]
== Version 1.9 (under dev)
Improvements::
* buflist: add variable `${current_buffer}` (boolean "0" / "1") in bar item evaluation
Bug fixes::
* buflist: add option "bar" in command /buflist, do not automatically add the "buflist" bar when the option buflist.look.enabled is off (issue #994)

View File

@ -28,6 +28,7 @@ The following variables can be used in these options:
- irc_channel: IRC channel data, defined only on an IRC channel buffer (see hdata "irc_channel" in API doc)
- extra variables added by buflist for convenience:
- ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example
- ${current_buffer}: a boolean ("0" or "1"), "1" if this is the current buffer; it can be used in a condition: ${if:${current_buffer}?...:...}
- ${format_number}: indented number with separator (evaluation of option buflist.format.number)
- ${number}: indented number, for example " 1" if there are between 10 and 99 buffers
- ${indent}: indentation for name (channel and private buffers are indented) (evaluation of option buflist.format.indent)

View File

@ -28,6 +28,7 @@ The following variables can be used in these options:
- irc_channel: IRC channel data, defined only on an IRC channel buffer (see hdata "irc_channel" in API doc)
- extra variables added by buflist for convenience:
- ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example
- ${current_buffer}: a boolean ("0" or "1"), "1" if this is the current buffer; it can be used in a condition: ${if:${current_buffer}?...:...}
- ${format_number}: indented number with separator (evaluation of option buflist.format.number)
- ${number}: indented number, for example " 1" if there are between 10 and 99 buffers
- ${indent}: indentation for name (channel and private buffers are indented) (evaluation of option buflist.format.indent)

View File

@ -28,6 +28,7 @@ Les variables suivantes peuvent être utilisées dans ces options :
- irc_channel: données du canal IRC, défini seulement sur un tampon de canal IRC (voir le hdata "irc_channel" dans la doc API)
- variables additionnelles ajoutées par buflist pour des raisons pratiques :
- ${format_buffer} : la valeur évaluée de l'option buflist.format.buffer ; peut être utilisée dans l'option buflist.format.buffer_current pour juste changer la couleur de fond par exemple
- ${current_buffer} : un booléen ("0" ou "1"), "1" s'il s'agit du tampon courant ; cela peut être utilisé dans une condition : ${if:${current_buffer}?...:...}
- ${format_number} : numéro indenté avec un séparateur (évaluation de l'option buflist.format.number)
- ${number} : numéro indenté, par exemple " 1" s'il y a entre 10 et 99 tampons
- ${indent} : indentation pour le nom (les tampons de canaux ou privés sont indentés) (évaluation de l'option buflist.format.indent)

View File

@ -28,6 +28,7 @@ The following variables can be used in these options:
- irc_channel: IRC channel data, defined only on an IRC channel buffer (see hdata "irc_channel" in API doc)
- extra variables added by buflist for convenience:
- ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example
- ${current_buffer}: a boolean ("0" or "1"), "1" if this is the current buffer; it can be used in a condition: ${if:${current_buffer}?...:...}
- ${format_number}: indented number with separator (evaluation of option buflist.format.number)
- ${number}: indented number, for example " 1" if there are between 10 and 99 buffers
- ${indent}: indentation for name (channel and private buffers are indented) (evaluation of option buflist.format.indent)

View File

@ -28,6 +28,7 @@ The following variables can be used in these options:
- irc_channel: IRC channel data, defined only on an IRC channel buffer (see hdata "irc_channel" in API doc)
- extra variables added by buflist for convenience:
- ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example
- ${current_buffer}: a boolean ("0" or "1"), "1" if this is the current buffer; it can be used in a condition: ${if:${current_buffer}?...:...}
- ${format_number}: indented number with separator (evaluation of option buflist.format.number)
- ${number}: indented number, for example " 1" if there are between 10 and 99 buffers
- ${indent}: indentation for name (channel and private buffers are indented) (evaluation of option buflist.format.indent)

View File

@ -28,6 +28,7 @@ The following variables can be used in these options:
- irc_channel: IRC channel data, defined only on an IRC channel buffer (see hdata "irc_channel" in API doc)
- extra variables added by buflist for convenience:
- ${format_buffer}: the evaluated value of option buflist.format.buffer; this can be used in option buflist.format.buffer_current to just change the background color for example
- ${current_buffer}: a boolean ("0" or "1"), "1" if this is the current buffer; it can be used in a condition: ${if:${current_buffer}?...:...}
- ${format_number}: indented number with separator (evaluation of option buflist.format.number)
- ${number}: indented number, for example " 1" if there are between 10 and 99 buffers
- ${indent}: indentation for name (channel and private buffers are indented) (evaluation of option buflist.format.indent)

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-05-13 22:06+0200\n"
"Last-Translator: Ondřej Súkup <mimi.vx@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4935,6 +4935,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -19,7 +19,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-05-06 21:10+0200\n"
"Last-Translator: Nils Görs <weechatter@arcor.de>\n"
"Language-Team: German <kde-i18n-de@kde.org>\n"
@ -5826,6 +5826,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -22,7 +22,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-01-06 22:01+0100\n"
"Last-Translator: Elián Hanisch <lambdae2@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5149,6 +5149,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -21,8 +21,8 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"PO-Revision-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-05-19 07:36+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
"Language: fr\n"
@ -5696,6 +5696,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "
@ -5746,6 +5749,9 @@ msgstr ""
" - ${format_buffer} : la valeur évaluée de l'option buflist.format."
"buffer ; peut être utilisée dans l'option buflist.format.buffer_current pour "
"juste changer la couleur de fond par exemple\n"
" - ${current_buffer} : un booléen (\"0\" ou \"1\"), \"1\" s'il s'agit du "
"tampon courant ; cela peut être utilisé dans une condition : ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number} : numéro indenté avec un séparateur (évaluation de "
"l'option buflist.format.number)\n"
" - ${number} : numéro indenté, par exemple \" 1\" s'il y a entre 10 et 99 "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-01-06 22:03+0100\n"
"Last-Translator: Andras Voroskoi <voroskoi@frugalware.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4473,6 +4473,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-01-06 22:04+0100\n"
"Last-Translator: Esteban I. Ruiz Moreno <exio4.com@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5287,6 +5287,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-05-06 09:00+0900\n"
"Last-Translator: AYANOKOUZI, Ryuunosuke <i38w7i3@yahoo.co.jp>\n"
"Language-Team: Japanese <https://github.com/l/weechat/tree/master/"
@ -5432,6 +5432,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-04-08 14:49+0200\n"
"Last-Translator: Krzysztof Korościk <soltys@soltys.info>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5567,6 +5567,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-04-08 14:50+0200\n"
"Last-Translator: Vasco Almeida <vascomalmeida@sapo.pt>\n"
"Language-Team: Portuguese <>\n"
@ -5543,6 +5543,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2016-09-03 08:24+0200\n"
"Last-Translator: Eduardo Elias <camponez@gmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -5089,6 +5089,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-01-06 22:06+0100\n"
"Last-Translator: Aleksey V Zapparov AKA ixti <ixti@member.fsf.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4511,6 +4511,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -20,7 +20,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2017-01-06 22:07+0100\n"
"Last-Translator: Hasan Kiran <sunder67@hotmail.com>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4076,6 +4076,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -21,7 +21,7 @@ msgid ""
msgstr ""
"Project-Id-Version: WeeChat\n"
"Report-Msgid-Bugs-To: flashcode@flashtux.org\n"
"POT-Creation-Date: 2017-05-18 21:59+0200\n"
"POT-Creation-Date: 2017-05-19 07:35+0200\n"
"PO-Revision-Date: 2014-08-16 10:27+0200\n"
"Last-Translator: Sébastien Helleu <flashcode@flashtux.org>\n"
"Language-Team: weechat-dev <weechat-dev@nongnu.org>\n"
@ -4061,6 +4061,9 @@ msgid ""
" - ${format_buffer}: the evaluated value of option buflist.format.buffer; "
"this can be used in option buflist.format.buffer_current to just change the "
"background color for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if this is the "
"current buffer; it can be used in a condition: ${if:"
"${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator (evaluation of option "
"buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there are between 10 "

View File

@ -168,6 +168,11 @@ buflist_bar_item_buflist_cb (const void *pointer, void *data,
goto error;
}
/* current buffer */
weechat_hashtable_set (buflist_hashtable_extra_vars,
"current_buffer",
(current_buffer) ? "1" : "0");
/* buffer number */
number = weechat_hdata_integer (buflist_hdata_buffer,
ptr_buffer, "number");

View File

@ -99,6 +99,9 @@ buflist_command_init ()
"buflist.format.buffer; this can be used in option "
"buflist.format.buffer_current to just change the background color "
"for example\n"
" - ${current_buffer}: a boolean (\"0\" or \"1\"), \"1\" if "
"this is the current buffer; it can be used in a condition: "
"${if:${current_buffer}?...:...}\n"
" - ${format_number}: indented number with separator "
"(evaluation of option buflist.format.number)\n"
" - ${number}: indented number, for example \" 1\" if there "