#ifndef _conky_h_
#define _conky_h_
+#ifdef INFOPIPE
+#include <pthread.h>
+#endif
#if defined(HAS_MCHECK_H)
#include <mcheck.h>
#endif /* HAS_MCHECK_H */
#include <locale.h>
#include <langinfo.h>
#include <wchar.h>
-#if defined(__FreeBSD__)
#include <sys/param.h>
+#if defined(__FreeBSD__)
#include <sys/mount.h>
#include <sys/ucred.h>
#endif /* __FreeBSD__ */
#define TOP_MEM 4
#define TEXT_BUFFER_SIZE 1024
+#define P_MAX_SIZE ((TEXT_BUFFER_SIZE * 4) - 2)
#include <sys/socket.h>
#define CRIT_ERR(s, varargs...) \
{ fprintf(stderr, "Conky: " s "\n", ##varargs); exit(EXIT_FAILURE); }
+/* in sys/param.h
+#ifndef MIN
#define MIN(a,b) (a>b ? b : a)
+#endif
+#ifndef MAX
#define MAX(a,b) (a<b ? b : a)
+#endif
+*/
struct i8k_struct {
char *version;
char *path;
long long size;
long long avail;
+ long long free;
};
/*struct cpu_stat {
};
#endif
+#ifdef BMPX
+void update_bmpx();
+struct bmpx_s {
+ char *title;
+ char *artist;
+ char *album;
+ char *uri;
+ int bitrate;
+ int track;
+};
+#endif
+
+#ifdef INFOPIPE
+#include "infopipe.h"
+struct infopipe_s {
+ infopipe_t items; /* e.g. items[INFOPIPE_STATUS] yields char[] */
+ int runnable; /* used to signal infopipe thread to stop */
+ pthread_t thread; /* worker thread for infopipe updating */
+ pthread_attr_t thread_attr; /* thread attributes */
+ pthread_mutex_t item_mutex; /* mutex for item array */
+ pthread_mutex_t runnable_mutex; /* mutex for runnable flag */
+};
+#endif
+
#ifdef TCP_PORT_MONITOR
#include "libtcp-portmon.h"
#define MIN_PORT_MONITORS_DEFAULT 16
#ifdef TCP_PORT_MONITOR
INFO_TCP_PORT_MONITOR = 22,
#endif
+#ifdef BMPX
+ INFO_BMPX = 23,
+#endif
+#ifdef INFOPIPE
+ INFO_INFOPIPE = 24,
+#endif
};
struct mpd_s mpd;
mpd_Connection *conn;
#endif
+#ifdef BMPX
+ struct bmpx_s bmpx;
+#endif
+#ifdef INFOPIPE
+ struct infopipe_s infopipe;
+#endif
struct process *cpu[10];
struct process *memu[10];
struct process *first_process;