1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2024-11-17 10:35:10 +00:00

Added lowercase config to match uppercase

This commit is contained in:
AlexApps99 2020-01-22 10:29:17 +13:00 committed by Brenden Matthews
parent 435d05dc6e
commit 1924081173
2 changed files with 20 additions and 0 deletions

View File

@ -1077,6 +1077,15 @@
<listitem>Boolean value, if true, text is rendered in upper case.
<para /></listitem>
</varlistentry>
<varlistentry>
<term>
<command>
<option>lowercase</option>
</command>
</term>
<listitem>Boolean value, if true, text is rendered in lower case.
<para /></listitem>
</varlistentry>
<varlistentry>
<term>
<command>

View File

@ -283,6 +283,9 @@ std::string current_config;
static conky::simple_config_setting<bool> stuff_in_uppercase("uppercase", false,
true);
static conky::simple_config_setting<bool> stuff_in_lowercase("lowercase", false,
true);
/* Run how many times? */
static conky::range_config_setting<unsigned long> total_run_times(
"total_run_times", 0, std::numeric_limits<unsigned long>::max(), 0, true);
@ -794,6 +797,14 @@ static void generate_text() {
*tmp_p = toupper(static_cast<unsigned char>(*tmp_p));
tmp_p++;
}
} else if (stuff_in_lowercase.get(*state)) {
char *tmp_p;
tmp_p = text_buffer;
while (*tmp_p != 0) {
*tmp_p = tolower(static_cast<unsigned char>(*tmp_p));
tmp_p++;
}
}
double ui = active_update_interval();