mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-05 21:07:52 +00:00
Removed alias config option due to brokenness.
The alias option was broken by fb8ccd7a05
,
and it seems like trying to make it work again will only result in
breakage for env var substitution anyway.
This commit is contained in:
parent
932131f7eb
commit
be145bd55d
@ -1,3 +1,6 @@
|
||||
2009-07-31
|
||||
* Removed alias config option due to brokenness
|
||||
|
||||
2009-07-29
|
||||
* Add icon data_type for xoap weather
|
||||
|
||||
|
@ -11,22 +11,6 @@
|
||||
used to pipe input to dzen2.
|
||||
<para /></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>
|
||||
<option>alias</option>
|
||||
</command>
|
||||
</term>
|
||||
<listitem>Use this to create aliases of variables. The
|
||||
first argument is the new name, the second the old name,
|
||||
and the other arguments are passed on to the variable.
|
||||
Example: If you want to use $alpha instead of ${beta gamma
|
||||
delta} then you have to write the following: alias alpha
|
||||
beta gamma delta . PS: Instead of creating an alias in the
|
||||
config you can also use environment variables. Example:
|
||||
Start conky like this: alpha="beta gamma delta" conky
|
||||
<para /></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>
|
||||
<command>
|
||||
|
@ -16,7 +16,7 @@
|
||||
<firstname>Brenden</firstname>
|
||||
<surname>Matthews</surname>
|
||||
</author>
|
||||
<date>2009-07-28</date>
|
||||
<date>2009-07-31</date>
|
||||
</refentryinfo>
|
||||
<refmeta>
|
||||
<refentrytitle>conky</refentrytitle>
|
||||
|
@ -3393,9 +3393,10 @@
|
||||
</member>
|
||||
<member>
|
||||
<command>icon</command>
|
||||
<option>Weather icon (only for www.weather.com).
|
||||
Can be used together with the icon kit provided
|
||||
upon registering to their service.</option>
|
||||
<option>Weather icon (only for
|
||||
www.weather.com). Can be used together with the
|
||||
icon kit provided upon registering to their
|
||||
service.</option>
|
||||
</member>
|
||||
</simplelist>
|
||||
<para>'delay_in_minutes' (optional, default 30) cannot
|
||||
|
@ -5,7 +5,7 @@
|
||||
syntax "conky" "(\.*conkyrc.*$|conky.conf)"
|
||||
|
||||
## Configuration items
|
||||
color green "\<(alias|alignment|append_file|background|border_inner_margin|border_outer_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|colorN|cpu_avg_samples|default_bar_size|default_color|default_gauge_size|default_graph_size|default_outline_color|default_shade_color|diskio_avg_samples|display|double_buffer|draw_borders|draw_graph_borders|draw_outline|draw_shades|extra_newline|font|format_human_readable|gap_x|gap_y|if_up_strictness|imap|imlib_cache_flush_interval|imlib_cache_size|lua_draw_hook_post|lua_draw_hook_pre|lua_load|mail_spool|max_port_monitor_connections|max_specials|max_user_text|maximum_width|minimum_size|mpd_host|mpd_password|mpd_port|music_player_interval|net_avg_samples|no_buffers|out_to_console|out_to_stderr|out_to_x|override_utf8_locale|overwrite_file|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|sensor_device|short_units|show_graph_range|show_graph_scale|stippled_borders|temperature_unit|template|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|text|text_buffer_size|top_cpu_separate|top_name_width|total_run_times|update_interval|update_interval_on_battery|uppercase|use_spacer|use_xft|xftalpha|xftfont)\>"
|
||||
color green "\<(alignment|append_file|background|border_inner_margin|border_outer_margin|border_width|color0|color1|color2|color3|color4|color5|color6|color7|color8|color9|colorN|cpu_avg_samples|default_bar_size|default_color|default_gauge_size|default_graph_size|default_outline_color|default_shade_color|diskio_avg_samples|display|double_buffer|draw_borders|draw_graph_borders|draw_outline|draw_shades|extra_newline|font|format_human_readable|gap_x|gap_y|if_up_strictness|imap|imlib_cache_flush_interval|imlib_cache_size|lua_draw_hook_post|lua_draw_hook_pre|lua_load|mail_spool|max_port_monitor_connections|max_specials|max_user_text|maximum_width|minimum_size|mpd_host|mpd_password|mpd_port|music_player_interval|net_avg_samples|no_buffers|out_to_console|out_to_stderr|out_to_x|override_utf8_locale|overwrite_file|own_window|own_window_class|own_window_colour|own_window_hints|own_window_title|own_window_transparent|own_window_type|pad_percents|pop3|sensor_device|short_units|show_graph_range|show_graph_scale|stippled_borders|temperature_unit|template|template0|template1|template2|template3|template4|template5|template6|template7|template8|template9|text|text_buffer_size|top_cpu_separate|top_name_width|total_run_times|update_interval|update_interval_on_battery|uppercase|use_spacer|use_xft|xftalpha|xftfont)\>"
|
||||
|
||||
## 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)\>"
|
||||
|
@ -12,7 +12,7 @@ endif
|
||||
|
||||
syn region ConkyrcComment start=/^\s*#/ end=/$/
|
||||
|
||||
syn keyword ConkyrcSetting alias alignment append_file background border_inner_margin border_outer_margin border_width color0 color1 color2 color3 color4 color5 color6 color7 color8 color9 colorN cpu_avg_samples default_bar_size default_color default_gauge_size default_graph_size default_outline_color default_shade_color diskio_avg_samples display double_buffer draw_borders draw_graph_borders draw_outline draw_shades extra_newline font format_human_readable gap_x gap_y if_up_strictness imap imlib_cache_flush_interval imlib_cache_size lua_draw_hook_post lua_draw_hook_pre lua_load mail_spool max_port_monitor_connections max_specials max_user_text maximum_width minimum_size mpd_host mpd_password mpd_port music_player_interval net_avg_samples no_buffers out_to_console out_to_stderr out_to_x override_utf8_locale overwrite_file own_window own_window_class own_window_colour own_window_hints own_window_title own_window_transparent own_window_type pad_percents pop3 sensor_device short_units show_graph_range show_graph_scale stippled_borders temperature_unit template template0 template1 template2 template3 template4 template5 template6 template7 template8 template9 text text_buffer_size top_cpu_separate top_name_width total_run_times update_interval update_interval_on_battery uppercase use_spacer use_xft xftalpha xftfont
|
||||
syn keyword ConkyrcSetting alignment append_file background border_inner_margin border_outer_margin border_width color0 color1 color2 color3 color4 color5 color6 color7 color8 color9 colorN cpu_avg_samples default_bar_size default_color default_gauge_size default_graph_size default_outline_color default_shade_color diskio_avg_samples display double_buffer draw_borders draw_graph_borders draw_outline draw_shades extra_newline font format_human_readable gap_x gap_y if_up_strictness imap imlib_cache_flush_interval imlib_cache_size lua_draw_hook_post lua_draw_hook_pre lua_load mail_spool max_port_monitor_connections max_specials max_user_text maximum_width minimum_size mpd_host mpd_password mpd_port music_player_interval net_avg_samples no_buffers out_to_console out_to_stderr out_to_x override_utf8_locale overwrite_file own_window own_window_class own_window_colour own_window_hints own_window_title own_window_transparent own_window_type pad_percents pop3 sensor_device short_units show_graph_range show_graph_scale stippled_borders temperature_unit template template0 template1 template2 template3 template4 template5 template6 template7 template8 template9 text text_buffer_size top_cpu_separate top_name_width total_run_times update_interval update_interval_on_battery uppercase use_spacer use_xft xftalpha xftfont
|
||||
|
||||
syn keyword ConkyrcConstant
|
||||
\ above
|
||||
|
26
src/conky.c
26
src/conky.c
@ -3605,11 +3605,10 @@ static void extract_variable_text(const char *p)
|
||||
extract_variable_text_internal(&global_root_object, p);
|
||||
}
|
||||
|
||||
void parse_conky_vars(struct text_object *root, char *txt, char *p, struct information *cur)
|
||||
void parse_conky_vars(struct text_object *root, const char *txt, char *p, struct information *cur)
|
||||
{
|
||||
extract_variable_text_internal(root, txt);
|
||||
generate_text_internal(p, max_user_text, *root, cur);
|
||||
return;
|
||||
}
|
||||
|
||||
static inline struct mail_s *ensure_mail_thread(struct text_object *obj,
|
||||
@ -6084,7 +6083,7 @@ static void generate_text_internal(char *p, int p_max_size,
|
||||
#endif /* X11 */
|
||||
}
|
||||
|
||||
void evaluate(char *text, char *buffer)
|
||||
void evaluate(const char *text, char *buffer)
|
||||
{
|
||||
struct information *tmp_info;
|
||||
struct text_object subroot;
|
||||
@ -8795,27 +8794,6 @@ static void load_config_file(const char *f)
|
||||
}
|
||||
}
|
||||
|
||||
CONF("alias") {
|
||||
if (value) {
|
||||
size_t maxlength = strlen(value); //+1 for terminating 0 not needed, 'cause of the space in the middle of value
|
||||
char *skey = malloc(maxlength);
|
||||
char *svalue = malloc(maxlength);
|
||||
char *oldvalue;
|
||||
if (sscanf(value, "%[0-9a-zA-Z_] %[^\n]", skey, svalue) == 2) {
|
||||
oldvalue = getenv(skey);
|
||||
if (oldvalue == NULL) {
|
||||
setenv(skey, svalue, 0);
|
||||
}
|
||||
//PS: Don't free oldvalue, it's the real envvar, not a copy
|
||||
} else {
|
||||
CONF_ERR;
|
||||
}
|
||||
free(skey);
|
||||
free(svalue);
|
||||
} else {
|
||||
CONF_ERR;
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_LUA
|
||||
CONF("lua_load") {
|
||||
if (value) {
|
||||
|
@ -353,7 +353,7 @@ extern int inotify_fd;
|
||||
/* defined in conky.c
|
||||
* evaluates 'text' and places the result in 'buffer'
|
||||
*/
|
||||
void evaluate(char *text, char *buffer);
|
||||
void evaluate(const char *text, char *buffer);
|
||||
|
||||
/* maximum size of config TEXT buffer, i.e. below TEXT line. */
|
||||
extern unsigned int max_user_text;
|
||||
|
Loading…
Reference in New Issue
Block a user