corp769,
I inspected the documentation carefully before I asked my three questions so these questions weren’t the result of my laziness but of my helplessness. You directed me with your answers back to the documentation. I’m sorry. In that case that doesn’t help at all. Let me explain that in a more extended form.
1. The numbers with the decimal fractions
As for my first question I had in mind such numbers with the decimal fractions as produced by the following conky entries:
Code:
${top cpu 1} ${top name 1}
${top cpu 2} ${top name 2}
or:
Code:
${downspeed eth0}
${upspeed eth0}
The first two entries can display something like:
Code:
2.83 X
0.70 kworker/0:1
The following two entries can display something like:
I’d like to round up the numbers when the decimal fraction is greater or equal 0.5 as follows:
and:
Instead of
downspeed and
upspeed conky objects one can use
downspeedf and
upspeedf objects but these objects are unusable from my point of view because they use KiB unit only with one decimal while I need B, KiB, MiB, GiB etc. units without any decimal.
As for the other possibilities of changing decimal fractions that are described in the documentation there is a
pad_percents object but it concerns merely percents.
I’m sorry but I don’t see in the given documentation the clue how can I round up the numbers with the decimal fractions.
2. Loops such as if ... then ... else ...
As for my second question I had in mind loops as the following:
Code:
IF THE RESULT OF ${downspeed eth0}
IS GREATER OR EQUAL THAN THE RESULT OF ${upspeed eth0}
THEN PRINT ${downspeed eth0}
ELSE PRINT ${upspeed eth0}
So let’s assume downspeed is equal 6.56K and upspeed is equal 1.67K. In such a case the above loop should display the downspeed value. In the opposite situation – when the upspeed is greater than the downspeed – the loop should display the upspeed value.
I’m still sorry but I can’t find any clue concerning such a loop on the variables page.
3. Characters substitution
As for my third question the hint “You should be able to escape characters with a backslash \” is irrelevant. Maybe it’s my fault because I was laconic asking that question. I’m sorry.
Now I ask the same question once again in a more precise manner.
I customized conky configuration to write the data to a file and don’t display anything on the desktop or on the console.
Conky bar objects such as:
or:
print to the file something like that:
In the above example three hashes (#) mean “from 25 to 34 percent” and seven underscores (_) mean “the empty rest of the bar”.
Because I don’t like hashes and underscores I’d like to force conky to use exclamation marks (!) instead of hashes and dots (.) instead of underscores when it prints a bar as I illustrated that in the following example:
I’m aware it’s possible to achieve that modifying the source code of conky but I’d like to achieve that using the appropriate configuration file.