1
0
mirror of https://github.com/Llewellynvdm/conky.git synced 2025-01-14 19:39:47 +00:00

Merge branch 'master' into imlib2

This commit is contained in:
Brenden Matthews 2009-05-08 14:38:55 -06:00
commit f7c793a514
7 changed files with 227 additions and 197 deletions

View File

@ -1,5 +1,6 @@
2009-05-07
* Fix occasional cpubar segfaults
* Added top_name_width config option
2009-05-05
* Added some completely pointless OpenMP optimizations(?)

60
README
View File

@ -197,6 +197,10 @@ conky(1) conky(1)
The number of samples to average for disk I/O monitoring.
top_name_width
Width for $top name value (defaults to 15 characters).
top_cpu_separate
If true, cpu in top will show usage of one processor's power. If
false, cpu in top will show the usage of all processors' power
@ -274,11 +278,11 @@ conky(1) conky(1)
imap Default global IMAP server. Arguments are: "host user pass [-i
interval] [-f folder] [-p port] [-e command] [-r retries]". De
fault port is 143, default folder is 'INBOX', default interval
is 5 minutes, and default number of retries before giving up is
5. If the password is supplied as '*', you will be prompted to
enter the password when Conky starts.
interval (in seconds)] [-f folder] [-p port] [-e command] [-r
retries]". Default port is 143, default folder is 'INBOX', de
fault interval is 5 minutes, and default number of retries be
fore giving up is 5. If the password is supplied as '*', you
will be prompted to enter the password when Conky starts.
mail_spool
@ -416,10 +420,11 @@ conky(1) conky(1)
pop3 Default global POP3 server. Arguments are: "host user pass [-i
interval] [-p port] [-e command] [-r retries]". Default port is
110, default interval is 5 minutes, and default number of re
tries before giving up is 5. If the password is supplied as '*',
you will be prompted to enter the password when Conky starts.
interval (in seconds)] [-p port] [-e command] [-r retries]". De
fault port is 110, default interval is 5 minutes, and default
number of retries before giving up is 5. If the password is sup
plied as '*', you will be prompted to enter the password when
Conky starts.
short_units
@ -1122,20 +1127,22 @@ conky(1) conky(1)
Displays the number of messages in your global IMAP inbox by de
fault. You can define individual IMAP inboxes seperately by
passing arguments to this object. Arguments are: "host user pass
[-i interval] [-p port] [-e command] [-r retries]". Default port
is 143, default interval is 5 minutes, and default number of re
tries before giving up is 5. If the password is supplied as '*',
you will be prompted to enter the password when Conky starts.
[-i interval (in seconds)] [-f folder] [-p port] [-e command]
[-r retries]". Default port is 143, default folder is 'INBOX',
default interval is 5 minutes, and default number of retries be
fore giving up is 5. If the password is supplied as '*', you
will be prompted to enter the password when Conky starts.
imap_unseen (args)
Displays the number of unseen messages in your global IMAP inbox
by default. You can define individual IMAP inboxes seperately by
passing arguments to this object. Arguments are: "host user pass
[-i interval] [-p port] [-e command] [-r retries]". Default port
is 143, default interval is 5 minutes, and default number of re
tries before giving up is 5. If the password is supplied as '*',
you will be prompted to enter the password when Conky starts.
[-i interval (in seconds)] [-f folder] [-p port] [-e command]
[-r retries]". Default port is 143, default folder is 'INBOX',
default interval is 5 minutes, and default number of retries be
fore giving up is 5. If the password is supplied as '*', you
will be prompted to enter the password when Conky starts.
ioscheduler disk
@ -1496,21 +1503,22 @@ conky(1) conky(1)
Displays the number of unseen messages in your global POP3 inbox
by default. You can define individual POP3 inboxes seperately by
passing arguments to this object. Arguments are: "host user pass
[-i interval] [-p port] [-e command] [-r retries]". Default port
is 110, default interval is 5 minutes, and default number of re
tries before giving up is 5. If the password is supplied as '*',
you will be prompted to enter the password when Conky starts.
[-i interval (in seconds)] [-p port] [-e command] [-r retries]".
Default port is 110, default interval is 5 minutes, and default
number of retries before giving up is 5. If the password is sup
plied as '*', you will be prompted to enter the password when
Conky starts.
pop3_used (args)
Displays the amount of space (in MiB, 2^20) used in your global
POP3 inbox by default. You can define individual POP3 inboxes
seperately by passing arguments to this object. Arguments are:
"host user pass [-i interval] [-p port] [-e command] [-r re
tries]". Default port is 110, default interval is 5 minutes, and
default number of retries before giving up is 5. If the password
is supplied as '*', you will be prompted to enter the password
when Conky starts.
"host user pass [-i interval (in seconds)] [-p port] [-e com
mand] [-r retries]". Default port is 110, default interval is 5
minutes, and default number of retries before giving up is 5. If
the password is supplied as '*', you will be prompted to enter
the password when Conky starts.
pre_exec shell command

View File

@ -55,6 +55,13 @@
<para></para></listitem>
</varlistentry>
<varlistentry>
<term><command><option>top_name_width</option></command></term>
<listitem>
Width for $top name value (defaults to 15 characters).
<para></para></listitem>
</varlistentry>
<varlistentry>
<term><command><option>top_cpu_separate</option></command></term>
<listitem>
@ -172,7 +179,7 @@
<varlistentry>
<term><command><option>imap</option></command></term>
<listitem>
Default global IMAP server. Arguments are: "host user pass [-i interval] [-f folder] [-p port] [-e command] [-r retries]". Default port is 143, default folder is 'INBOX', default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
Default global IMAP server. Arguments are: "host user pass [-i interval (in seconds)] [-f folder] [-p port] [-e command] [-r retries]". Default port is 143, default folder is 'INBOX', default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
<para></para></listitem>
</varlistentry>
@ -394,7 +401,7 @@
<varlistentry>
<term><command><option>pop3</option></command></term>
<listitem>
Default global POP3 server. Arguments are: "host user pass [-i interval] [-p port] [-e command] [-r retries]". Default port is 110, default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
Default global POP3 server. Arguments are: "host user pass [-i interval (in seconds)] [-p port] [-e command] [-r retries]". Default port is 110, default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
<para></para></listitem>
</varlistentry>

View File

@ -1198,7 +1198,7 @@
<option>(args)</option>
</term>
<listitem>
Displays the number of messages in your global IMAP inbox by default. You can define individual IMAP inboxes seperately by passing arguments to this object. Arguments are: "host user pass [-i interval] [-p port] [-e command] [-r retries]". Default port is 143, default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
Displays the number of messages in your global IMAP inbox by default. You can define individual IMAP inboxes seperately by passing arguments to this object. Arguments are: "host user pass [-i interval (in seconds)] [-f folder] [-p port] [-e command] [-r retries]". Default port is 143, default folder is 'INBOX', default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
<para></para></listitem>
</varlistentry>
@ -1208,7 +1208,7 @@
<option>(args)</option>
</term>
<listitem>
Displays the number of unseen messages in your global IMAP inbox by default. You can define individual IMAP inboxes seperately by passing arguments to this object. Arguments are: "host user pass [-i interval] [-p port] [-e command] [-r retries]". Default port is 143, default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
Displays the number of unseen messages in your global IMAP inbox by default. You can define individual IMAP inboxes seperately by passing arguments to this object. Arguments are: "host user pass [-i interval (in seconds)] [-f folder] [-p port] [-e command] [-r retries]". Default port is 143, default folder is 'INBOX', default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
<para></para></listitem>
</varlistentry>
@ -1957,7 +1957,7 @@
<option>(args)</option>
</term>
<listitem>
Displays the number of unseen messages in your global POP3 inbox by default. You can define individual POP3 inboxes seperately by passing arguments to this object. Arguments are: "host user pass [-i interval] [-p port] [-e command] [-r retries]". Default port is 110, default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
Displays the number of unseen messages in your global POP3 inbox by default. You can define individual POP3 inboxes seperately by passing arguments to this object. Arguments are: "host user pass [-i interval (in seconds)] [-p port] [-e command] [-r retries]". Default port is 110, default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
<para></para></listitem>
</varlistentry>
@ -1968,7 +1968,7 @@
<option>(args)</option>
</term>
<listitem>
Displays the amount of space (in MiB, 2^20) used in your global POP3 inbox by default. You can define individual POP3 inboxes seperately by passing arguments to this object. Arguments are: "host user pass [-i interval] [-p port] [-e command] [-r retries]". Default port is 110, default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
Displays the amount of space (in MiB, 2^20) used in your global POP3 inbox by default. You can define individual POP3 inboxes seperately by passing arguments to this object. Arguments are: "host user pass [-i interval (in seconds)] [-p port] [-e command] [-r retries]". Default port is 110, default interval is 5 minutes, and default number of retries before giving up is 5. If the password is supplied as '*', you will be prompted to enter the password when Conky starts.
<para></para></listitem>
</varlistentry>

View File

@ -5,7 +5,7 @@
syntax "conky" "(\.*conkyrc.*$|conky.conf)"
## Configuration items
color green "\<(alias|alignment|background|show_graph_range|show_graph_scale|border_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|default_bar_size|default_gauge_size|default_graph_size|default_color|default_shade_color|default_shadecolor|default_outline_color|default_outlinecolor|imap|pop3|mpd_host|mpd_port|mpd_password|music_player_interval|sensor_device|cpu_avg_samples|net_avg_samples|double_buffer|override_utf8_locale|draw_borders|draw_graph_borders|draw_shades|draw_outline|out_to_console|out_to_stderr|out_to_x|extra_newline|overwrite_file|append_file|use_spacer|use_xft|font|xftalpha|xftfont|use_xft|gap_x|gap_y|mail_spool|minimum_size|maximum_width|no_buffers|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|top_cpu_separate|short_units|pad_percents|own_window|own_window_class|own_window_title|own_window_transparent|own_window_colour|own_window_hints|own_window_type|stippled_borders|temp1|temp2|update_interval|total_run_times|uppercase|max_specials|max_user_text|text_buffer_size|max_port_monitor_connections)\>"
color green "\<(alias|alignment|background|show_graph_range|show_graph_scale|border_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|default_bar_size|default_gauge_size|default_graph_size|default_color|default_shade_color|default_shadecolor|default_outline_color|default_outlinecolor|imap|pop3|mpd_host|mpd_port|mpd_password|music_player_interval|sensor_device|cpu_avg_samples|net_avg_samples|double_buffer|override_utf8_locale|draw_borders|draw_graph_borders|draw_shades|draw_outline|out_to_console|out_to_stderr|out_to_x|extra_newline|overwrite_file|append_file|use_spacer|use_xft|font|xftalpha|xftfont|use_xft|gap_x|gap_y|mail_spool|minimum_size|maximum_width|no_buffers|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|top_name_width|top_cpu_separate|short_units|pad_percents|own_window|own_window_class|own_window_title|own_window_transparent|own_window_colour|own_window_hints|own_window_type|stippled_borders|temp1|temp2|update_interval|total_run_times|uppercase|max_specials|max_user_text|text_buffer_size|max_port_monitor_connections)\>"
## Configuration item constants
color yellow "\<(above|below|bottom_left|bottom_right|bottom_middle|desktop|dock|no|none|normal|override|skip_pager|skip_taskbar|sticky|top_left|top_right|top_middle|middle_left|middle_right|undecorated|yes)\>"

View File

@ -70,6 +70,7 @@ syn keyword ConkyrcSetting
\ minimum_size
\ maximum_width
\ no_buffers
\ top_name_width
\ top_cpu_separate
\ short_units
\ pad_percents

View File

@ -131,6 +131,7 @@ enum {
RIGHT_SPACER
} use_spacer;
int top_cpu, top_mem, top_time;
static unsigned int top_name_width = 15;
int output_methods;
enum x_initialiser_state x_initialised = NO;
static volatile int g_signal_pending;
@ -4676,7 +4677,7 @@ static void generate_text_internal(char *p, int p_max_size,
switch (obj->data.top.type) {
case TOP_NAME:
snprintf(p, 16, "%-15s",
snprintf(p, top_name_width + 1, "%-*s", top_name_width,
needed[obj->data.top.num]->name);
break;
case TOP_CPU:
@ -7122,6 +7123,18 @@ static void load_config_file(const char *f)
CONF("no_buffers") {
no_buffers = string_to_bool(value);
}
CONF("top_name_width") {
if (value) {
if (sscanf(value, "%u", &top_name_width) != 1) {
CONF_ERR;
}
} else {
CONF_ERR;
}
if (top_name_width >= max_user_text) {
top_name_width = max_user_text - 1;
}
}
CONF("top_cpu_separate") {
cpu_separate = string_to_bool(value);
}