mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-02-03 12:38:38 +00:00
Removed alias config option due to brokenness.
The alias option was broken by fb8ccd7a05847c19a863be785d1786846671a1c9, 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
|
2009-07-29
|
||||||
* Add icon data_type for xoap weather
|
* Add icon data_type for xoap weather
|
||||||
|
|
||||||
|
@ -11,22 +11,6 @@
|
|||||||
used to pipe input to dzen2.
|
used to pipe input to dzen2.
|
||||||
<para /></listitem>
|
<para /></listitem>
|
||||||
</varlistentry>
|
</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>
|
<varlistentry>
|
||||||
<term>
|
<term>
|
||||||
<command>
|
<command>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<firstname>Brenden</firstname>
|
<firstname>Brenden</firstname>
|
||||||
<surname>Matthews</surname>
|
<surname>Matthews</surname>
|
||||||
</author>
|
</author>
|
||||||
<date>2009-07-28</date>
|
<date>2009-07-31</date>
|
||||||
</refentryinfo>
|
</refentryinfo>
|
||||||
<refmeta>
|
<refmeta>
|
||||||
<refentrytitle>conky</refentrytitle>
|
<refentrytitle>conky</refentrytitle>
|
||||||
|
@ -3393,9 +3393,10 @@
|
|||||||
</member>
|
</member>
|
||||||
<member>
|
<member>
|
||||||
<command>icon</command>
|
<command>icon</command>
|
||||||
<option>Weather icon (only for www.weather.com).
|
<option>Weather icon (only for
|
||||||
Can be used together with the icon kit provided
|
www.weather.com). Can be used together with the
|
||||||
upon registering to their service.</option>
|
icon kit provided upon registering to their
|
||||||
|
service.</option>
|
||||||
</member>
|
</member>
|
||||||
</simplelist>
|
</simplelist>
|
||||||
<para>'delay_in_minutes' (optional, default 30) cannot
|
<para>'delay_in_minutes' (optional, default 30) cannot
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
syntax "conky" "(\.*conkyrc.*$|conky.conf)"
|
syntax "conky" "(\.*conkyrc.*$|conky.conf)"
|
||||||
|
|
||||||
## Configuration items
|
## 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
|
## 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)\>"
|
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 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
|
syn keyword ConkyrcConstant
|
||||||
\ above
|
\ 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);
|
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);
|
extract_variable_text_internal(root, txt);
|
||||||
generate_text_internal(p, max_user_text, *root, cur);
|
generate_text_internal(p, max_user_text, *root, cur);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct mail_s *ensure_mail_thread(struct text_object *obj,
|
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 */
|
#endif /* X11 */
|
||||||
}
|
}
|
||||||
|
|
||||||
void evaluate(char *text, char *buffer)
|
void evaluate(const char *text, char *buffer)
|
||||||
{
|
{
|
||||||
struct information *tmp_info;
|
struct information *tmp_info;
|
||||||
struct text_object subroot;
|
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
|
#ifdef HAVE_LUA
|
||||||
CONF("lua_load") {
|
CONF("lua_load") {
|
||||||
if (value) {
|
if (value) {
|
||||||
|
@ -353,7 +353,7 @@ extern int inotify_fd;
|
|||||||
/* defined in conky.c
|
/* defined in conky.c
|
||||||
* evaluates 'text' and places the result in 'buffer'
|
* 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. */
|
/* maximum size of config TEXT buffer, i.e. below TEXT line. */
|
||||||
extern unsigned int max_user_text;
|
extern unsigned int max_user_text;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user