#include "queue.h"
-#define BAR "^fg(#333333)^p(5;-2)^ro(2)^p()^fg()^p(5)"
+#ifdef DZEN
+ #define BAR "^fg(#333333)^p(5;-2)^ro(2)^p()^fg()^p(5)"
+#elif XMOBAR
+ #define BAR "<fc=#333333> | </fc>"
+#endif
#define BEGINS_WITH(haystack, needle) (strncmp(haystack, needle, strlen(needle)) == 0)
#define max(a, b) (a > b ? a : b)
generate(orderidx, name, function); \
} while (0)
+#if defined(LINUX)
+
+#define THERMAL_ZONE "/sys/class/thermal/thermal_zone%d/temp"
+
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+
+#define THERMAL_ZONE "hw.acpi.thermal.tz%d.temperature"
+#define BATT_LIFE "hw.acpi.battery.life"
+#define BATT_TIME "hw.acpi.battery.time"
+#define BATT_STATE "hw.acpi.battery.state"
+
+#endif
+
+#if defined(__FreeBSD_kernel__) && defined(__GLIBC__)
+
+#include <sys/stat.h>
+#include <sys/param.h>
+
+#endif
typedef enum { CS_DISCHARGING, CS_CHARGING, CS_FULL } charging_status_t;
enum { ORDER_RUN, ORDER_WLAN, ORDER_ETH, ORDER_BATTERY, ORDER_CPU_TEMPERATURE, ORDER_LOAD, ORDER_TIME, ORDER_IPV6, MAX_ORDER };
char *order_to_str(int number, char *name);
void setup(void);
void write_to_statusbar(const char *name, const char *message, bool final_entry);
-void slurp(char *filename, char *destination, int size);
+bool slurp(char *filename, char *destination, int size);
/* src/output.c */
void write_error_to_statusbar(const char *message);
char *color(const char *colorstr);
+char *endcolor() __attribute__ ((pure));
void cleanup_rbar_dir();
/* src/config.c */
extern const char *wlan_interface;
extern const char *eth_interface;
-extern const char *wmii_path;
+extern char *wmii_path;
extern const char *time_format;
extern bool use_colors;
extern bool get_ethspeed;