mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-02-03 20:48:31 +00:00
Misc compilation fixes.
This commit is contained in:
parent
1085d2b27e
commit
b4cd98868f
50
README
50
README
@ -360,6 +360,26 @@ conky(1) conky(1)
|
||||
Print text to stdout.
|
||||
|
||||
|
||||
1mout_to_stderr0m
|
||||
Print text to stderr.
|
||||
|
||||
|
||||
1mout_to_x0m
|
||||
When set to no, there will be no output in X (useful when you
|
||||
also use things like out_to_console). If you set it to no, make
|
||||
sure that it’s placed before all other X-related setting (take
|
||||
the first line of your configfile to be sure). Default value is
|
||||
yes
|
||||
|
||||
|
||||
1moverwrite_file0m
|
||||
Overwrite the file given as argument.
|
||||
|
||||
|
||||
1mappend_file0m
|
||||
Append the file given as argument.
|
||||
|
||||
|
||||
1mpad_percents0m
|
||||
Pad percentages to this many decimals (0 = no padding)
|
||||
|
||||
@ -1586,9 +1606,9 @@ conky(1) conky(1)
|
||||
|
||||
1mupspeedgraph ("normal"|"log") (height),(width) (gradient colour 1)0m
|
||||
1m(gradient colour 2) (scale) (net)0m
|
||||
Upload speed graph, colours defined in hex, minus the #. If
|
||||
scale is non-zero, it becomes the scale for the graph. Uses a
|
||||
logarithmic scale (to see small numbers) when you use "log" in‐
|
||||
Upload speed graph, colours defined in hex, minus the #. If
|
||||
scale is non-zero, it becomes the scale for the graph. Uses a
|
||||
logarithmic scale (to see small numbers) when you use "log" in‐
|
||||
stead of "normal".
|
||||
|
||||
|
||||
@ -1616,12 +1636,12 @@ conky(1) conky(1)
|
||||
|
||||
|
||||
1mvoffset (pixels)0m
|
||||
Change vertical offset by N pixels. Negative values will cause
|
||||
Change vertical offset by N pixels. Negative values will cause
|
||||
text to overlap. See also $offset.
|
||||
|
||||
|
||||
1mvoltage_mv (n)0m
|
||||
Returns CPU #n’s voltage in mV. CPUs are counted from 1. If
|
||||
Returns CPU #n’s voltage in mV. CPUs are counted from 1. If
|
||||
omitted, the parameter defaults to 1.
|
||||
|
||||
|
||||
@ -1740,12 +1760,12 @@ conky(1) conky(1)
|
||||
|
||||
|
||||
1mif_xmms2_connected0m
|
||||
Display everything between $if_xmms2_connected and the matching
|
||||
Display everything between $if_xmms2_connected and the matching
|
||||
$endif if xmms2 is running.
|
||||
|
||||
|
||||
1meve api_userid api_key character_id0m
|
||||
Fetches your currently training skill from the Eve Online API
|
||||
Fetches your currently training skill from the Eve Online API
|
||||
servers (http://www.eve-online.com/) and displays the skill
|
||||
along with the remaining training time.
|
||||
|
||||
@ -1764,13 +1784,13 @@ conky(1) conky(1)
|
||||
1mBUGS0m
|
||||
Drawing to root or some other desktop window directly doesn’t work with
|
||||
all window managers. Especially doesn’t work well with Gnome and it has
|
||||
been reported that it doesn’t work with KDE either. Nautilus can be
|
||||
disabled from drawing to desktop with program gconf-editor. Uncheck
|
||||
show_desktop in /apps/nautilus/preferences/. There is -w switch in
|
||||
Conky to set some specific window id. You might find xwininfo -tree
|
||||
useful to find the window to draw to. You can also use -o argument
|
||||
been reported that it doesn’t work with KDE either. Nautilus can be
|
||||
disabled from drawing to desktop with program gconf-editor. Uncheck
|
||||
show_desktop in /apps/nautilus/preferences/. There is -w switch in
|
||||
Conky to set some specific window id. You might find xwininfo -tree
|
||||
useful to find the window to draw to. You can also use -o argument
|
||||
which makes Conky to create its own window. If you do try running Conky
|
||||
in its own window, be sure to read up on the own_window_type settings
|
||||
in its own window, be sure to read up on the own_window_type settings
|
||||
and experiment.
|
||||
|
||||
1mSEE ALSO0m
|
||||
@ -1781,11 +1801,11 @@ conky(1) conky(1)
|
||||
#conky on irc.freenode.net
|
||||
|
||||
1mCOPYING0m
|
||||
Copyright (c) 2005-2008 Brenden Matthews, Philip Kovacs, et. al. Any
|
||||
Copyright (c) 2005-2008 Brenden Matthews, Philip Kovacs, et. al. Any
|
||||
original torsmo code is licensed under the BSD license (see LICENSE.BSD
|
||||
for a copy). All code written since the fork of torsmo is licensed un‐
|
||||
der the GPL (see LICENSE.GPL for a copy), except where noted different‐
|
||||
ly (such as in portmon code, timed thread code, and audacious code
|
||||
ly (such as in portmon code, timed thread code, and audacious code
|
||||
which are LGPL, and prss which is an MIT-style license).
|
||||
|
||||
1mAUTHORS0m
|
||||
|
@ -332,14 +332,14 @@ When set to no, there will be no output in X (useful when you also use things li
|
||||
If you set it to no, make sure that it's placed before all other X-related setting (take the first
|
||||
line of your configfile to be sure). Default value is yes
|
||||
|
||||
.TP
|
||||
\fB\*(T<\fBappend_file\fR\*(T>\fR
|
||||
Append the file given as argument.
|
||||
|
||||
.TP
|
||||
\fB\*(T<\fBoverwrite_file\fR\*(T>\fR
|
||||
Overwrite the file given as argument.
|
||||
|
||||
.TP
|
||||
\fB\*(T<\fBappend_file\fR\*(T>\fR
|
||||
Append the file given as argument.
|
||||
|
||||
.TP
|
||||
\fB\*(T<\fBpad_percents\fR\*(T>\fR
|
||||
Pad percentages to this many decimals (0 = no padding)
|
||||
|
28
src/conky.c
28
src/conky.c
@ -5623,16 +5623,16 @@ static inline int get_string_width(const char *s)
|
||||
|
||||
static inline int get_string_width_special(char *s)
|
||||
{
|
||||
char *p, *final;
|
||||
int idx = 1;
|
||||
int width = 0;
|
||||
unsigned int i;
|
||||
#ifdef X11
|
||||
if ( (output_methods & TO_X) == 0 ) {
|
||||
#endif
|
||||
return (s) ? strlen(s) : 0;
|
||||
#ifdef X11
|
||||
}
|
||||
char *p, *final;
|
||||
int idx = 1;
|
||||
int width = 0;
|
||||
unsigned int i;
|
||||
|
||||
if (!s) {
|
||||
return 0;
|
||||
@ -5671,9 +5671,10 @@ static void text_size_updater(char *s);
|
||||
int last_font_height;
|
||||
static void update_text_area(void)
|
||||
{
|
||||
if ( (output_methods & TO_X) == 0 ) return;
|
||||
int x, y;
|
||||
|
||||
if ( (output_methods & TO_X) == 0 ) return;
|
||||
|
||||
/* update text size if it isn't fixed */
|
||||
#ifdef OWN_WINDOW
|
||||
if (!fixed_size)
|
||||
@ -5782,10 +5783,11 @@ static long current_color;
|
||||
|
||||
static void text_size_updater(char *s)
|
||||
{
|
||||
if ( (output_methods & TO_X) == 0 ) return;
|
||||
int w = 0;
|
||||
char *p;
|
||||
|
||||
if ( (output_methods & TO_X) == 0 ) return;
|
||||
|
||||
/* get string widths and skip specials */
|
||||
p = s;
|
||||
while (*p) {
|
||||
@ -6084,16 +6086,17 @@ unsigned long gradient_max(unsigned long first_colour,
|
||||
|
||||
static void draw_line(char *s)
|
||||
{
|
||||
if ( (output_methods & TO_X) == 0 ) {
|
||||
draw_string(s);
|
||||
return;
|
||||
}
|
||||
#ifdef X11
|
||||
char *p;
|
||||
int cur_y_add = 0;
|
||||
short font_h;
|
||||
char *tmp_str;
|
||||
|
||||
#endif /* X11 */
|
||||
if ( (output_methods & TO_X) == 0 ) {
|
||||
draw_string(s);
|
||||
return;
|
||||
}
|
||||
#ifdef X11
|
||||
cur_x = text_start_x;
|
||||
cur_y += font_ascent();
|
||||
font_h = font_height();
|
||||
@ -7239,7 +7242,8 @@ static _Bool append_works(const char *path)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void X11_initialisation() {
|
||||
static void X11_initialisation(void)
|
||||
{
|
||||
output_methods |= TO_X;
|
||||
init_X11();
|
||||
set_default_configurations_for_x();
|
||||
|
Loading…
x
Reference in New Issue
Block a user