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:
parent
435d05dc6e
commit
1924081173
@ -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>
|
||||
|
11
src/conky.cc
11
src/conky.cc
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user