summaryrefslogtreecommitdiff
path: root/doc/ja/weechat_user.ja.adoc
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2022-06-07 21:04:34 +0200
committerSébastien Helleu <flashcode@flashtux.org>2022-06-07 21:04:34 +0200
commit55a796f30b6d34ed8f9ddb767ab0669148f51ec9 (patch)
treea950ced2770072bf13dd8b7525415a98da3a76e9 /doc/ja/weechat_user.ja.adoc
parentd81813cd6a8cfc19afb69e8e9820ffddced016bf (diff)
downloadweechat-55a796f30b6d34ed8f9ddb767ab0669148f51ec9.zip
doc/user: add chapter on custom bar items
Diffstat (limited to 'doc/ja/weechat_user.ja.adoc')
-rw-r--r--doc/ja/weechat_user.ja.adoc36
1 files changed, 36 insertions, 0 deletions
diff --git a/doc/ja/weechat_user.ja.adoc b/doc/ja/weechat_user.ja.adoc
index 48f5a5cab..261ab7cf0 100644
--- a/doc/ja/weechat_user.ja.adoc
+++ b/doc/ja/weechat_user.ja.adoc
@@ -2875,6 +2875,42 @@ Example of bar with items
/set weechat.bar.bitlist.items "@irc.bitlbee.&bitlbee:buffer_nicklist"
----
+// TRANSLATION MISSING
+[[custom_bar_items]]
+===== Custom bar items
+
+Custom bar items can be added with the <<command_weechat_item,/item>> command,
+each new item having two properties defined via configuration options:
+
+* `conditions`: evaluated conditions to display the bar item, for example to
+ restrict the bar item to some specific buffers (if empty, the bar item is
+ displayed everywhere)
+* `content`: evaluated content of bar item.
+
+In both options, the following variables can be used:
+
+* `window`: pointer to the window where the bar is displayed (`NULL` for root bars)
+* `buffer`: pointer to buffer where the bar is displayed (current buffer for root bars).
+
+Examples of conditions:
+
+[width="100%",cols="2,10",options="header"]
+|===
+| Condition | Description
+| `${window}` | Displayed in window bars only
+| `${buffer.number} == 1` | Displayed in all buffers with number = 1
+| `${buffer.plugin.name} == irc` | Displayed in all IRC buffers
+| `${type} == channel` | Displayed in all buffers where local variable `type` is set to `channel` (example: all IRC channels)
+| `${type} == private` | Displayed in all buffers where local variable `type` is set to `private` (example: all IRC private buffers)
+|===
+
+[NOTE]
+There's no builtin way to refresh the custom bar items. You can use the
+<<trigger,Trigger>> plugin to force the refresh, for example via one or more
+signals received.
+
+For more information and examples, see the <<command_weechat_item,/item>> command.
+
[[bar_filling]]
==== バーフィリング