2009-05-07
* Fix occasional cpubar segfaults
+ * Added top_name_width config option
2009-05-05
* Added some completely pointless OpenMP optimizations(?)
The number of samples to average for disk I/O monitoring.
+ \e[1mtop_name_width\e[0m
+ Width for $top name value (defaults to 15 characters).
+
+
\e[1mtop_cpu_separate\e[0m
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
</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>
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 combined.
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)\>"
\ minimum_size
\ maximum_width
\ no_buffers
+ \ top_name_width
\ top_cpu_separate
\ short_units
\ pad_percents
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;
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:
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);
}