diff --git a/CHANGELOG.md b/CHANGELOG.md index c3392d591..eb7b9e81d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ SPDX-License-Identifier: GPL-3.0-or-later ### Added - core: add `themable` flag on configuration options +- core: add option weechat.look.theme - fset: add filter `t:themable` - relay/api: add resource `GET /api/scripts` - relay: add option relay.network.unix_socket_permissions ([#2317](https://github.com/weechat/weechat/issues/2317)) diff --git a/po/cs.po b/po/cs.po index 8d73b4d66..02fa1c186 100644 --- a/po/cs.po +++ b/po/cs.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-05-30 14:01+0200\n" "Last-Translator: Ondřej Súkup \n" "Language-Team: Czech \n" @@ -5216,6 +5216,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "prefix pro zprávy akcí" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + #, fuzzy msgid "" "time format for dates converted to strings and displayed in messages (see " diff --git a/po/de.po b/po/de.po index 67b406458..559e1a619 100644 --- a/po/de.po +++ b/po/de.po @@ -26,7 +26,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-06-28 08:28+0200\n" "Last-Translator: Nils Görs \n" "Language-Team: German \n" @@ -5919,6 +5919,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "Anzahl an Leerzeichen um Tabulatoren in Nachrichten darzustellen" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/po/es.po b/po/es.po index 589ba377f..f56251956 100644 --- a/po/es.po +++ b/po/es.po @@ -24,7 +24,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-06-28 08:46+0200\n" "Last-Translator: Santiago Forero \n" "Language-Team: Spanish \n" @@ -5362,6 +5362,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "localización para traducción de mensajes" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + #, fuzzy msgid "" "time format for dates converted to strings and displayed in messages (see " diff --git a/po/fr.po b/po/fr.po index 5a9edbf29..d14bf1e56 100644 --- a/po/fr.po +++ b/po/fr.po @@ -23,8 +23,8 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" -"PO-Revision-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" +"PO-Revision-Date: 2026-07-04 14:01+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: French \n" "Language: fr\n" @@ -5800,6 +5800,15 @@ msgid "number of spaces used to display tabs in messages" msgstr "" "nombre d'espaces utilisés pour afficher les tabulations dans les messages" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" +"nom du dernier thème appliqué avec la commande /theme (défini " +"automatiquement, ne pas changer manuellement) ; à titre d'information " +"seulement, le thème n'est pas réappliqué au démarrage" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/po/hu.po b/po/hu.po index 862fe10e6..b62eddcc6 100644 --- a/po/hu.po +++ b/po/hu.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Andras Voroskoi \n" "Language-Team: Hungarian \n" @@ -4906,6 +4906,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "válasz ping üzenetre" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + #, fuzzy msgid "" "time format for dates converted to strings and displayed in messages (see " diff --git a/po/it.po b/po/it.po index 6105aaebc..f1b01bd5a 100644 --- a/po/it.po +++ b/po/it.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-05-30 14:02+0200\n" "Last-Translator: Esteban I. Ruiz Moreno \n" "Language-Team: Italian \n" @@ -5319,6 +5319,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "locale usato per la traduzione dei messaggi" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/po/ja.po b/po/ja.po index 3f7aadb95..0a072fa06 100644 --- a/po/ja.po +++ b/po/ja.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-05-30 14:02+0200\n" "Last-Translator: AYANOKOUZI, Ryuunosuke \n" "Language-Team: Japanese \n" @@ -5479,6 +5479,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "メッセージに含まれるタブ文字を表示する際に使う空白文字の数" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/po/pl.po b/po/pl.po index c14a1fcd7..7be9ecb7e 100644 --- a/po/pl.po +++ b/po/pl.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-06-28 08:55+0200\n" "Last-Translator: Krzysztof Korościk \n" "Language-Team: Polish \n" @@ -5631,6 +5631,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "liczba spacji używana do wyświetlania tabulacji w wiadomościach" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/po/pt.po b/po/pt.po index dff3d94ec..621ac8e22 100644 --- a/po/pt.po +++ b/po/pt.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-06-28 08:48+0200\n" "Last-Translator: Vasco Almeida \n" "Language-Team: Portuguese \n" @@ -5508,6 +5508,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "número de espaços usados para apresentar tabulações nas mensagens" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/po/pt_BR.po b/po/pt_BR.po index feced5959..e9a028f0b 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -46,7 +46,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-06-28 08:49+0200\n" "Last-Translator: Érico Nogueira \n" "Language-Team: Portuguese (Brazil) \n" @@ -5267,6 +5267,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "prefixo para mensagens de ação" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/po/ru.po b/po/ru.po index 30eaa86cd..2053aa6df 100644 --- a/po/ru.po +++ b/po/ru.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-03-08 08:59+0100\n" "Last-Translator: Aleksey V Zapparov AKA ixti \n" "Language-Team: Russian \n" @@ -4940,6 +4940,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "ответить на ping" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + #, fuzzy msgid "" "time format for dates converted to strings and displayed in messages (see " diff --git a/po/sr.po b/po/sr.po index f99d304dc..a36f8d41f 100644 --- a/po/sr.po +++ b/po/sr.po @@ -22,7 +22,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-06-28 08:52+0200\n" "Last-Translator: Ivan Pešić \n" "Language-Team: Serbian \n" @@ -5607,6 +5607,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "број размака који се користи за приказ табулатора у порукама" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/po/tr.po b/po/tr.po index 779c71963..984ecdcbb 100644 --- a/po/tr.po +++ b/po/tr.po @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2026-06-28 08:53+0200\n" "Last-Translator: Emir SARI \n" "Language-Team: Turkish \n" @@ -5431,6 +5431,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "iletilerdeki sekmeleri görüntülemek için kullanılan boşluk sayısı" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/po/weechat.pot b/po/weechat.pot index 78ac0edd8..fe66a3e26 100644 --- a/po/weechat.pot +++ b/po/weechat.pot @@ -23,7 +23,7 @@ msgid "" msgstr "" "Project-Id-Version: WeeChat\n" "Report-Msgid-Bugs-To: flashcode@flashtux.org\n" -"POT-Creation-Date: 2026-07-04 12:53+0200\n" +"POT-Creation-Date: 2026-07-04 13:59+0200\n" "PO-Revision-Date: 2014-08-16 10:27+0200\n" "Last-Translator: Sébastien Helleu \n" "Language-Team: weechat-dev \n" @@ -4616,6 +4616,12 @@ msgstr "" msgid "number of spaces used to display tabs in messages" msgstr "" +msgid "" +"name of the last theme applied with command /theme (set automatically, do " +"not change manually); informational only, the theme is not re-applied at " +"startup" +msgstr "" + msgid "" "time format for dates converted to strings and displayed in messages (see " "man strftime for date/time specifiers)" diff --git a/src/core/core-config.c b/src/core/core-config.c index aedcbbb0f..dfebaf43e 100644 --- a/src/core/core-config.c +++ b/src/core/core-config.c @@ -50,6 +50,7 @@ #include "core-proxy.h" #include "core-string.h" #include "core-sys.h" +#include "core-theme.h" #include "core-util.h" #include "core-version.h" #include "../gui/gui-bar.h" @@ -222,6 +223,7 @@ struct t_config_option *config_look_separator_horizontal = NULL; struct t_config_option *config_look_separator_vertical = NULL; struct t_config_option *config_look_tab_whitespace_char = NULL; struct t_config_option *config_look_tab_width = NULL; +struct t_config_option *config_look_theme = NULL; struct t_config_option *config_look_time_format = NULL; struct t_config_option *config_look_whitespace_char = NULL; struct t_config_option *config_look_window_auto_zoom = NULL; @@ -1381,7 +1383,7 @@ config_change_color (const void *pointer, void *data, (void) data; (void) option; - if (gui_init_ok) + if (gui_init_ok && !theme_applying) { gui_color_init_weechat (); gui_window_ask_refresh (1); @@ -4427,6 +4429,14 @@ config_weechat_init_options (void) NULL, NULL, NULL, &config_change_tab, NULL, NULL, NULL, NULL, NULL); + config_look_theme = config_file_new_option ( + weechat_config_file, weechat_config_section_look, + "theme", "string", + N_("name of the last theme applied with command /theme " + "(set automatically, do not change manually); informational " + "only, the theme is not re-applied at startup"), + NULL, 0, 0, "", NULL, 0, + NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); config_look_time_format = config_file_new_option ( weechat_config_file, weechat_config_section_look, "time_format", "string", diff --git a/src/core/core-config.h b/src/core/core-config.h index 32de3cba6..68396a31f 100644 --- a/src/core/core-config.h +++ b/src/core/core-config.h @@ -277,6 +277,7 @@ extern struct t_config_option *config_look_separator_horizontal; extern struct t_config_option *config_look_separator_vertical; extern struct t_config_option *config_look_tab_whitespace_char; extern struct t_config_option *config_look_tab_width; +extern struct t_config_option *config_look_theme; extern struct t_config_option *config_look_time_format; extern struct t_config_option *config_look_whitespace_char; extern struct t_config_option *config_look_window_auto_zoom;