1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 09:13:14 +02:00

core: add /theme reset to restore original themable defaults

This commit is contained in:
Sébastien Helleu
2026-07-04 20:47:02 +02:00
parent 887108463c
commit 867625b65a
25 changed files with 441 additions and 45 deletions
+10
View File
@@ -7339,6 +7339,12 @@ COMMAND_CALLBACK(theme)
return theme_apply (argv[2]);
}
/* "/theme reset": reset every themable option to its default value */
if (string_strcmp (argv[1], "reset") == 0)
{
return theme_reset ();
}
/* "/theme save <name> [-full]": write a user theme file */
if (string_strcmp (argv[1], "save") == 0)
{
@@ -10079,6 +10085,7 @@ command_init (void)
/* TRANSLATORS: only text between angle brackets (eg: "<name>") may be translated */
N_("[list [-backups]]"
" || apply <name>"
" || reset"
" || save <name> [-full]"
" || del <name>"
" || info <name>"),
@@ -10091,6 +10098,8 @@ command_init (void)
"value from the theme); if a file named <name>.theme "
"exists in directory \"themes\" it shadows any built-in "
"theme of the same name"),
N_("raw[reset]: reset every themable option to its default "
"value (restores the original look shipped with WeeChat)"),
N_("raw[save]: save current themable options to a file "
"<name>.theme in directory \"themes\"; by default only "
"options whose value differs from their default are "
@@ -10114,6 +10123,7 @@ command_init (void)
"This is controlled by the option weechat.look.theme_backup.")),
"list -backups"
" || apply %(theme_themes_all)"
" || reset"
" || save %(theme_themes_user) -full"
" || del %(theme_themes_user)"
" || info %(theme_themes_all)",