summaryrefslogtreecommitdiff
path: root/doc/en
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2020-06-21 18:59:54 +0200
committerSébastien Helleu <flashcode@flashtux.org>2020-06-21 18:59:54 +0200
commitb0ecbdbf1da175802d3e2f82cf181060886247e3 (patch)
tree28f18dcad3ab64bd2b15bd8cf92bb63fb66654ed /doc/en
parent5b151d1639f4656f79b92b7b495251b51bc10d1d (diff)
downloadweechat-b0ecbdbf1da175802d3e2f82cf181060886247e3.zip
core: add bar option "color_bg_inactive" (issue #732)
Diffstat (limited to 'doc/en')
-rw-r--r--doc/en/weechat_plugin_api.en.adoc16
-rw-r--r--doc/en/weechat_scripting.en.adoc10
2 files changed, 24 insertions, 2 deletions
diff --git a/doc/en/weechat_plugin_api.en.adoc b/doc/en/weechat_plugin_api.en.adoc
index b6bbddb37..d60de708f 100644
--- a/doc/en/weechat_plugin_api.en.adoc
+++ b/doc/en/weechat_plugin_api.en.adoc
@@ -14615,6 +14615,8 @@ bar = weechat.bar_search("mybar")
==== bar_new
+_Updated in 2.9._
+
Create a new bar.
Prototype:
@@ -14634,6 +14636,7 @@ struct t_gui_bar *weechat_bar_new (const char *name,
const char *color_fg,
const char *color_delim,
const char *color_bg,
+ const char *color_bg_inactive,
const char *separator,
const char *items);
----
@@ -14670,6 +14673,8 @@ Arguments:
* _color_fg_: color for text in bar
* _color_delim_: color for delimiters in bar
* _color_bg_: background color for bar
+* _color_bg_inactive_: background color for window bar which is not displayed
+ in active window
* _separator_:
** _on_: bar has separator line with other windows/bars
** _off_: no separator
@@ -14697,6 +14702,7 @@ struct t_gui_bar *my_bar = weechat_bar_new ("mybar",
"default",
"cyan",
"blue",
+ "darkgray",
"off",
"time,buffer_number+buffer_name");
----
@@ -14708,13 +14714,19 @@ Script (Python):
# prototype
bar = weechat.bar_new(name, hidden, priority, type, condition, position,
filling_top_bottom, filling_left_right, size, size_max,
- color_fg, color_delim, color_bg, separator, items)
+ color_fg, color_delim, color_bg, color_bg_inactive, separator, items)
# example
bar = weechat.bar_new("mybar", "off", "100", "window", "", "top", "horizontal", "vertical",
- "0", "5", "default", "cyan", "blue", "off", "time,buffer_number+buffer_name")
+ "0", "5", "default", "cyan", "blue", "darkgray", "off", "time,buffer_number+buffer_name")
----
+[NOTE]
+With WeeChat ≥ 2.9, in Ruby, the 4 colors (color_fg, color_delim, color_bg,
+color_bg_inactive) must be given in an array of 4 strings (due to a Ruby
+limitation of 15 arguments by function), see the
+link:++weechat_scripting.en.html#_ruby++[WeeChat scripting guide] for more info.
+
==== bar_set
Set a new value for a bar property.
diff --git a/doc/en/weechat_scripting.en.adoc b/doc/en/weechat_scripting.en.adoc
index 2c9bbd330..1c57349f2 100644
--- a/doc/en/weechat_scripting.en.adoc
+++ b/doc/en/weechat_scripting.en.adoc
@@ -158,6 +158,16 @@ Weechat.config_new_option(config, section, "name", "string", "description of opt
"value", "value", 0, ["check_cb", "", "change_cb", "", "delete_cb", ""])
----
+And the function `+Weechat.bar_new+` receives the colors in an array of 4 strings
+(color_fg, color_delim, color_bg, color_bg_inactive), so a call to this function
+looks like:
+
+[source,ruby]
+----
+Weechat.bar_new("name", "off", "0", "window", "", "left", "vertical", "vertical", "0", "0",
+ ["default", "default", "default", "default"], "0", "items")
+----
+
==== Lua
===== Functions