2007-09-01
* Improved performance slightly
- * Added 'mpd_interval' config option to specify an update interval for the
- mpd thread
+ * Added 'music_player_interval' config option to specify an update interval for
+ music player threads (currently honored by mpd and audacious).
* Fixed some minor memory leaks associated with SIGUSR1
2007-08-31
</varlistentry>
<varlistentry>
- <term><command><option>mpd_interval</option></command></term>
+ <term><command><option>music_player_interval</option></command></term>
<listitem>
- MPD thread update interval (defaults to Conky's update interval)
+ Music player thread update interval (defaults to Conky's update interval)
<para></para></listitem>
</varlistentry>
syntax "conky" "\.*conkyrc.*$"
## Configuration items
-color green "\<(alignment|background|border_margin|border_width|cpu_avg_samples|default_color|default_shade_color|default_outline_color|double_buffer|draw_borders|draw_graph_borders|draw_shades|draw_outline|font|gap_x|gap_y|imap|mail_spool|max_port_monitor_connections|max_specials|max_user_text|maximum_width|minimum_size|mpd_host|mpd_port|mpd_password|net_avg_samples|no_buffers|out_to_console|override_utf8_locale|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|stippled_borders|total_run_times|update_interval|uppercase|use_spacer|use_xft|xftalpha|xftfont)\>"
+color green "\<(alignment|background|border_margin|border_width|cpu_avg_samples|default_color|default_shade_color|default_outline_color|double_buffer|draw_borders|draw_graph_borders|draw_shades|draw_outline|font|gap_x|gap_y|imap|mail_spool|max_port_monitor_connections|max_specials|max_user_text|maximum_width|minimum_size|mpd_host|mpd_port|mpd_password|music_player_interval|net_avg_samples|no_buffers|out_to_console|override_utf8_locale|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|stippled_borders|total_run_times|update_interval|uppercase|use_spacer|use_xft|xftalpha|xftfont)\>"
## Variables
color brightblue "\<(acpiacadapter|acpifan|acpitemp|acpitempf|addr|adt746xcpu|adt746xfan|align|alignr|apm_adapter|apm_battery_life|apm_battery_time|audacious_bar|audacious_bitrate|audacious_channels|audacious_filename|audacious_frequency|audacious_length|audacious_length_seconds|audacious_playlist_length|audacious_playlist_position|audacious_position|audacious_position_seconds|audacious_status|audacious_title|battery|battery_time|bmpx_album|bmpx_artist|bmpx_bitrate|bmpx_title|bmpx_track|bmpx_uri|buffers|cached|color|colour|cpu|cpubar|diskio|downspeed|downspeedf|else|entropy_avail|entropy_bar|entropy_poolsize|exec|execbar|execgraph|execi|execibar|execigraph|font|freq|freq_dyn|freq_dyn_g|freq_g|fs_bar|fs_free|fs_free_perc|fs_size|fs_used|goto|hddtemp|head|hr|hwmon|i2c|i8k_ac_status|i8k_bios|i8k_buttons_status|i8k_cpu_temp|i8k_cpu_tempf|i8k_left_fan_rpm|i8k_left_fan_status|i8k_right_fan_rpm|i8k_right_fan_status|i8k_serial|i8k_version|if_existing|if_running|if_mounted|kernel|linkstatus|loadavg|machine|mails|mem|membar|memmax|memperc|mpd_album|mpd_artist|mpd_bar|mpd_bitrate|mpd_elapsed|mpd_file|mpd_length|mpd_name|mpd_percent|mpd_smart|mpd_status|mpd_title|mpd_vol|new_mails|nodename|offset|outlinecolor|platform|pre_exec|processes|running_processes|shadecolor|stippled_hr|swap|swapbar|swapmax|swapperc|sysname|tab|tail|tcp_portmon|texeci|time|top|top_mem|totaldown|totalup|tztime|updates|upspeed|upspeedf|upspeedgraph|uptime|uptime_short|voffset|voltage_mv|voltage_v)\>"
\ mpd_host
\ mpd_password
\ mpd_port
+ \ music_player_interval
\ net_avg_samples
\ no_buffers
\ out_to_console
int create_audacious_thread(void)
{
if (!info.audacious.p_timed_thread)
- info.audacious.p_timed_thread = timed_thread_create (audacious_thread_func, NULL, 1000000);
+ info.audacious.p_timed_thread =
+ timed_thread_create (audacious_thread_func, NULL, info.music_player_interval * 1000000);
if (!info.audacious.p_timed_thread || timed_thread_run (info.audacious.p_timed_thread))
return (-1);
if (NEED(INFO_MPD)) {
if (!mpd_timed_thread) {
init_mpd_stats(&info);
- mpd_timed_thread = timed_thread_create((void*)update_mpd, (void*) NULL, info.mpd.interval * 1000000);
+ mpd_timed_thread =
+ timed_thread_create((void*)update_mpd, (void*) NULL, info.music_player_interval * 1000000);
if (!mpd_timed_thread) {
ERR("Failed to create MPD timed thread");
}
OBJ_mpd_host,
OBJ_mpd_port,
OBJ_mpd_password,
- OBJ_mpd_interval,
OBJ_mpd_bar,
OBJ_mpd_elapsed,
OBJ_mpd_length,
OBJ_mpd_percent,
OBJ_mpd_smart,
#endif
+ OBJ_music_player_interval,
#ifdef XMMS2
OBJ_xmms2_artist,
OBJ_xmms2_album,
else
CONF_ERR;
}
- CONF("mpd_interval") {
- if (value)
- info.mpd.interval = strtod(value, 0);
- else
- CONF_ERR;
- }
#endif
+ CONF("music_player_interval") {
+ if (value)
+ info.music_player_interval = strtod(value, 0);
+ else
+ CONF_ERR;
+ }
#ifdef __OpenBSD__
CONF("sensor_device") {
if(value)
update_interval = strtod(value, 0);
else
CONF_ERR;
-#ifdef MPD
- if (info.mpd.interval == 0) {
+ if (info.music_player_interval == 0) {
// default to update_interval
- info.mpd.interval = update_interval;
+ info.music_player_interval = update_interval;
}
-#endif /* MPD */
}
CONF("total_run_times") {
if (value)
fclose(fp);
#undef CONF_ERR
-#ifdef MPD
- if (info.mpd.interval == 0) {
+ if (info.music_player_interval == 0) {
// default to update_interval
- info.mpd.interval = update_interval;
+ info.music_player_interval = update_interval;
}
-#endif /* MPD */
}
case 'u':
update_interval = strtod(optarg, 0);
-#ifdef MPD
- if (info.mpd.interval == 0) {
+ if (info.music_player_interval == 0) {
// default to update_interval
- info.mpd.interval = update_interval;
+ info.music_player_interval = update_interval;
}
-#endif /* MPD */
break;
case 'i':
unsigned int port;
char host[128];
char password[128];
- double interval;
float progress;
int bitrate;
int length;
#endif
short kflags; /* kernel settings, see enum KFLAG */
struct entropy_s entropy;
+ double music_player_interval;
};
enum {