<mainprogram>conky</mainprogram>
<directoryradio>build</directoryradio>
<customdirectory>/</customdirectory>
- <programargs></programargs>
+ <programargs/>
<terminal>false</terminal>
<autocompile>true</autocompile>
<envvars/>
<f77compiler>kdevpgf77options</f77compiler>
<cflags>-O2 -Wall -fexceptions -fomit-frame-pointer -fshort-enums -ggdb</cflags>
<envvars/>
- <topsourcedir></topsourcedir>
- <cppflags></cppflags>
- <ldflags></ldflags>
- <ccompilerbinary></ccompilerbinary>
- <cxxcompilerbinary></cxxcompilerbinary>
- <f77compilerbinary></f77compilerbinary>
- <cxxflags></cxxflags>
- <f77flags></f77flags>
+ <topsourcedir/>
+ <cppflags/>
+ <ldflags/>
+ <ccompilerbinary/>
+ <cxxcompilerbinary/>
+ <f77compilerbinary/>
+ <cxxflags/>
+ <f77flags/>
</debug>
<debug-no-x>
<envvars/>
+++ /dev/null
-/* src/config.h.in. Generated from configure.in by autoheader. */
-
-/* Define if you are using Cairo */
-#undef CAIRO
-
-/* Define if you want support for the DBE extension */
-#undef DOUBLE_BUFFER
-
-/* Define to 1 if you have the <cairo.h> header file. */
-#undef HAVE_CAIRO_H
-
-/* Define to 1 if you have the <cairo-xlib.h> header file. */
-#undef HAVE_CAIRO_XLIB_H
-
-/* Define to 1 if you have the <dirent.h> header file. */
-#undef HAVE_DIRENT_H
-
-/* Define to 1 if you have the <dlfcn.h> header file. */
-#undef HAVE_DLFCN_H
-
-/* Define if you have getloadavg */
-#undef HAVE_GETLOADAVG
-
-/* Define to 1 if you have the <inttypes.h> header file. */
-#undef HAVE_INTTYPES_H
-
-/* Define if you have kstat (Solaris) */
-#undef HAVE_KSTAT
-
-/* Define to 1 if you have the <linux/soundcard.h> header file. */
-#undef HAVE_LINUX_SOUNDCARD_H
-
-/* Define to 1 if you have the <mcheck.h> header file. */
-#undef HAVE_MCHECK_H
-
-/* Define to 1 if you have the <memory.h> header file. */
-#undef HAVE_MEMORY_H
-
-/* Define to 1 if you have the `popen' function. */
-#undef HAVE_POPEN
-
-/* Define to 1 if you have the <signal.h> header file. */
-#undef HAVE_SIGNAL_H
-
-/* Define to 1 if you have the <stdint.h> header file. */
-#undef HAVE_STDINT_H
-
-/* Define to 1 if you have the <stdlib.h> header file. */
-#undef HAVE_STDLIB_H
-
-/* Define to 1 if you have the <strings.h> header file. */
-#undef HAVE_STRINGS_H
-
-/* Define to 1 if you have the <string.h> header file. */
-#undef HAVE_STRING_H
-
-/* Define if you have sysinfo (Linux) */
-#undef HAVE_SYSINFO
-
-/* Define to 1 if you have the <sys/mount.h> header file. */
-#undef HAVE_SYS_MOUNT_H
-
-/* Define to 1 if you have the <sys/param.h> header file. */
-#undef HAVE_SYS_PARAM_H
-
-/* Define to 1 if you have the <sys/statfs.h> header file. */
-#undef HAVE_SYS_STATFS_H
-
-/* Define to 1 if you have the <sys/stat.h> header file. */
-#undef HAVE_SYS_STAT_H
-
-/* Define to 1 if you have the <sys/types.h> header file. */
-#undef HAVE_SYS_TYPES_H
-
-/* Define to 1 if you have the <sys/utsname.h> header file. */
-#undef HAVE_SYS_UTSNAME_H
-
-/* Define to 1 if you have the <unistd.h> header file. */
-#undef HAVE_UNISTD_H
-
-/* Define if you have X11 */
-#undef HAVE_X11
-
-/* Define to 1 if you have the <X11/Xlib.h> header file. */
-#undef HAVE_X11_XLIB_H
-
-/* Xdbe */
-#undef HAVE_XDBE
-
-/* Define if you want MLDonkey support */
-#undef MLDONKEY
-
-/* Define if you want MPD support */
-#undef MPD
-
-/* Define if you want support for window creating */
-#undef OWN_WINDOW
-
-/* Name of package */
-#undef PACKAGE
-
-/* Define to the address where bug reports for this package should be sent. */
-#undef PACKAGE_BUGREPORT
-
-/* Define to the full name of this package. */
-#undef PACKAGE_NAME
-
-/* Define to the full name and version of this package. */
-#undef PACKAGE_STRING
-
-/* Define to the one symbol short name of this package. */
-#undef PACKAGE_TARNAME
-
-/* Define to the version of this package. */
-#undef PACKAGE_VERSION
-
-/* Define if you want to use /proc/uptime for uptime */
-#undef PROC_UPTIME
-
-/* Define if you want SETI at Home stats */
-#undef SETI
-
-/* Define to 1 if you have the ANSI C header files. */
-#undef STDC_HEADERS
-
-/* Version number of package */
-#undef VERSION
-
-/* Define if you want to use X11 */
-#undef X11
-
-/* Define if you are using Xft */
-#undef XFT
-
-/* Define to 1 if the X Window System is missing or not being used. */
-#undef X_DISPLAY_MISSING
#endif
static int minimum_width, minimum_height;
+static int maximum_width;
/* UTF-8 */
int utf8_mode = 0;
w += get_string_width(s);
if (w > text_width)
text_width = w;
+ if (text_width > maximum_width && maximum_width)
+ text_width = maximum_width;
text_height += h;
if (fontchange) {
text_width += 1;
if (text_height < minimum_height)
text_height = minimum_height;
+ if (text_width > maximum_width && maximum_width > 0)
+ text_width = maximum_width;
}
/* get text position on workarea */
}
}
}
+ if (text_width == maximum_width) {
+ /* this means the text is probably pushing the limit, so we'll chop it */
+ while (cur_x + get_string_width(tmpstring2) - text_start_x > maximum_width && strlen(tmpstring2) > 0) {
+ tmpstring2[strlen(tmpstring2)-1] = '\0';
+ }
+ }
s = tmpstring2;
#ifdef X11
#ifdef XFT
case BAR:
{
+ if (cur_x > maximum_width - text_start_x) {
+ break;
+ }
int h =
specials[special_index].height;
int bar_usage =
case GRAPH:
{
+ if (cur_x > maximum_width - text_start_x && maximum_width > 0) {
+ break;
+ }
int h =
specials[special_index].height;
int by;
text_height =
window.height -
border_margin * 2 - 1;
+ if (text_width > maximum_width && maximum_width > 0)
+ text_width = maximum_width;
}
/* if position isn't what expected, set fixed pos, total_updates
gap_y = 5;
minimum_width = 5;
minimum_height = 5;
+ maximum_width = 0;
#ifdef OWN_WINDOW
own_window = 0;
#endif
}
#ifdef X11
CONF("minimum_size") {
+ if (value) {
+ if (sscanf
+ (value, "%d %d", &minimum_width,
+ &minimum_height) != 2)
+ if (sscanf
+ (value, "%d",
+ &minimum_width) != 1)
+ CONF_ERR;
+ } else
+ CONF_ERR;
+ }
+ CONF("maximum_width") {
if (value) {
- if (sscanf
- (value, "%d %d", &minimum_width,
- &minimum_height) != 2)
- if (sscanf
- (value, "%d",
- &minimum_width) != 1)
- CONF_ERR;
+ if (sscanf(value, "%d", &maximum_width) != 1)
+ CONF_ERR;
} else
CONF_ERR;
}