From: Brenden Matthews Date: Mon, 4 May 2009 19:13:51 +0000 (-0600) Subject: Revert "Combine can now use other chars to seperate vars (used to be only space)" X-Git-Url: http://vcs.maemo.org/git/?a=commitdiff_plain;h=f6fe6534012b193d40eac2d1dc2ccc394b575e0e;p=monky Revert "Combine can now use other chars to seperate vars (used to be only space)" This reverts commit 3dd1738fb9e16831166e70201078164d551c7ffc. --- diff --git a/.gitignore b/.gitignore index 5285e7b..8ae131e 100644 --- a/.gitignore +++ b/.gitignore @@ -34,3 +34,5 @@ conky-*.tar.* doc/*.html doc/*.mxml patches/ +README +doc/conky.1 diff --git a/ChangeLog b/ChangeLog index 0f0c47c..fb7be04 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2009-05-03 + * Added Sony VAIO fanspeed info (thanks Yeon-Hyeong) + 2009-05-01 * Added diskio_avg_samples patch (thanks Yeon-Hyeong) * Fixed $texeci regression diff --git a/doc/variables.xml b/doc/variables.xml index a964baf..85d033d 100644 --- a/doc/variables.xml +++ b/doc/variables.xml @@ -2733,6 +2733,7 @@ Prints the song name in either the form "artist - title" or file name, depending on whats available + @@ -2744,6 +2745,15 @@ + + + + Displays the Sony VAIO fanspeed information if sony-laptop kernel support is enabled. Linux only. + + + + + diff --git a/src/Makefile.am b/src/Makefile.am index b7fee6f..c31f455 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -64,7 +64,7 @@ xmms2 = xmms2.c endif if BUILD_LINUX -linux = linux.c top.c diskio.c users.c +linux = linux.c top.c diskio.c users.c sony.c PTHREAD_LIBS = -lpthread endif @@ -208,6 +208,7 @@ EXTRA_DIST = \ smapi.h \ ibm.c \ ibm.h \ + sony.h \ users.c diff --git a/src/conky.c b/src/conky.c index 8c9eba2..6379d8a 100644 --- a/src/conky.c +++ b/src/conky.c @@ -1223,6 +1223,9 @@ static struct text_object *construct_text_object(const char *s, END OBJ(ibm_volume, 0) END OBJ(ibm_brightness, 0) #endif + /* information from sony_laptop kernel module + * /sys/devices/platform/sony-laptop */ + END OBJ(sony_fanspeed, 0) END OBJ_IF(if_gw, 0) END OBJ(ioscheduler, 0) if (!arg) { @@ -2542,7 +2545,7 @@ static struct text_object *construct_text_object(const char *s, }else if(arg[i] == '}') { indenting--; } - if(indenting == 0 && arg[i+1] < 48) { //<48 has 0, $, and the most used chars not used in varnames but not { or } + if(indenting == 0 && (arg[i+1] == ' ' || arg[i+1] == '$' || arg[i+1] == 0)) { endvar[j]=i+1; j++; } @@ -3415,6 +3418,11 @@ static void generate_text_internal(char *p, int p_max_size, get_ibm_acpi_brightness(p, p_max_size); } #endif /* IBM */ + /* information from sony_laptop kernel module + * /sys/devices/platform/sony-laptop */ + OBJ(sony_fanspeed) { + get_sony_fanspeed(p, p_max_size); + } OBJ(if_gw) { if (!cur->gw_info.count) { DO_JUMP; diff --git a/src/conky.h b/src/conky.h index dda42c5..3bd82ea 100644 --- a/src/conky.h +++ b/src/conky.h @@ -103,6 +103,9 @@ char *strndup(const char *s, size_t n); #include "smapi.h" #endif +/* sony support */ +#include "sony.h" + /* A size for temporary, static buffers to use when * one doesn't know what to choose. Defaults to 256. */ extern unsigned int text_buffer_size; diff --git a/src/text_object.h b/src/text_object.h index d9a48ad..067c7a5 100644 --- a/src/text_object.h +++ b/src/text_object.h @@ -148,6 +148,9 @@ enum text_object_type { OBJ_smapi_bat_power, OBJ_if_smapi_bat_installed, #endif /* IBM */ + /* information from sony_laptop kernel module + * /sys/devices/platform/sony-laptop */ + OBJ_sony_fanspeed, OBJ_if_gw, OBJ_ioscheduler, OBJ_gw_iface,