]> jfr.im git - irc/weechat/weechat.git/commitdiff
trigger: add variable `${tg_hook_type}` (closes #1765)
authorSébastien Helleu <redacted>
Fri, 30 Sep 2022 19:32:27 +0000 (21:32 +0200)
committerSébastien Helleu <redacted>
Fri, 30 Sep 2022 19:32:27 +0000 (21:32 +0200)
ChangeLog.adoc
doc/de/weechat_user.de.adoc
doc/en/weechat_user.en.adoc
doc/fr/weechat_user.fr.adoc
doc/it/weechat_user.it.adoc
doc/ja/weechat_user.ja.adoc
doc/pl/weechat_user.pl.adoc
doc/sr/weechat_user.sr.adoc
src/plugins/trigger/trigger-callback.c

index 6aff9386f28e4e4d9ae75576a9e9c5e9561d0a49..e2f199e65a08da6e55c4ba28c5be702afd65dbec 100644 (file)
@@ -36,6 +36,7 @@ New features::
   * logger: add options to rotate and compress log files: logger.file.rotation_compression_level, logger.file.rotation_compression_type and logger.file.rotation_size_max (issue #314)
   * spell: allow special dict value "-" to disable spell checking on a specific buffer (issue #1699)
   * trigger: add elapsed time for trigger execution on monitor buffer when trigger debug is set, add option trigger.color.identifier (issue #1806)
+  * trigger: add variable `${tg_hook_type}` (issue #1765)
 
 Bug fixes::
 
index 4a37a701813b01c47b608bf5ba91cd48f4582409..a587800fc1dcea3c6b9e16a3b66657e62efa847f 100644 (file)
@@ -5060,6 +5060,8 @@ Alle Callbacks setzen folgende Variablen in das hashtable:
 |===
 | Variable        | Typ    | Beschreibung
 | tg_trigger_name | string | Name des Trigger.
+// TRANSLATION MISSING
+| tg_hook_type    | string | Hook type: "signal", "command", etc.
 |===
 
 [[trigger_data_signal]]
index 05cb89752048ab4d751c75cafde2ba7ab724da7d..91106fad633a995b9ab4408789edb795cc2ae431 100644 (file)
@@ -4941,6 +4941,7 @@ All callbacks set following variables in hashtable:
 |===
 | Variable        | Type   | Description
 | tg_trigger_name | string | Name of trigger.
+| tg_hook_type    | string | Hook type: "signal", "command", etc.
 |===
 
 [[trigger_data_signal]]
index dc9261d42c421171f973435d6ed90b5c0c118a7e..da4d56a05765609d557fce70bee1cd0b76f6b4de 100644 (file)
@@ -5104,6 +5104,7 @@ de hachage :
 |===
 | Variable        | Type   | Description
 | tg_trigger_name | chaîne | Nom du trigger.
+| tg_hook_type    | chaîne | Type de hook : "signal", "command", etc.
 |===
 
 [[trigger_data_signal]]
index be7fd16488b36d506b118fe79d7eeca3103cf3aa..b28e8e913f9eeae6a64ed9281998c4722849fa8a 100644 (file)
@@ -5286,6 +5286,7 @@ All callbacks set following variables in hashtable:
 |===
 | Variable        | Type   | Description
 | tg_trigger_name | string | Name of trigger.
+| tg_hook_type    | string | Hook type: "signal", "command", etc.
 |===
 
 [[trigger_data_signal]]
index d5d5fdca6518c6db707f0622dc4dac1d533dd8f5..cc27b1a0250dd6c59b488574de0c1c4651d0067f 100644 (file)
@@ -5099,6 +5099,8 @@ All callbacks set following variables in hashtable:
 | 変数            | 型     | 説明
 // TRANSLATION MISSING
 | tg_trigger_name | string | Name of trigger.
+// TRANSLATION MISSING
+| tg_hook_type    | string | Hook type: "signal", "command", etc.
 |===
 
 [[trigger_data_signal]]
index 106e2e0ff48e6e07b7e4f5fdde9095ec2290c408..6e2fa32d01c19386bd4dd73d29f9be23cba4b107 100644 (file)
@@ -5014,6 +5014,8 @@ Wszystkie callbacki ustawiają następujące zmienne w tablicy hashy:
 |===
 | Zmienna         | Typ  | Opis
 | tg_trigger_name | ciąg | Nazwa triggera.
+// TRANSLATION MISSING
+| tg_hook_type    | ciąg | Hook type: "signal", "command", etc.
 |===
 
 [[trigger_data_signal]]
index 58b3fff17f844126b47a1e3ed082e1d55d1aa6ef..fb1dc3bb9d39bd716aca95b7befb693944a8bbf2 100644 (file)
@@ -4655,6 +4655,8 @@ ${tg_displayed} && (${tg_highlight} || ${tg_msg_pv})
 |===
 | Променљива      | Тип    | Опис
 | tg_trigger_name | стринг | Име окидача.
+// TRANSLATION MISSING
+| tg_hook_type    | стринг | Hook type: "signal", "command", etc.
 |===
 
 [[trigger_data_signal]]
index 61f4fdfe1ddbf43aca92ed3ca7df29f317370d0d..8c4b1a7fa14638b0096114357d996bf0168e69e2 100644 (file)
@@ -144,6 +144,10 @@ trigger_callback_set_common_vars (struct t_trigger *trigger,
         return;
 
     weechat_hashtable_set (hashtable, "tg_trigger_name", trigger->name);
+    weechat_hashtable_set (
+        hashtable, "tg_hook_type",
+        trigger_hook_type_string[
+            weechat_config_integer (trigger->options[TRIGGER_OPTION_HOOK])]);
 }
 
 /*