X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=i3status.h;h=aa7f20e39a1953da7ba8ba2544584c436ea36591;hb=48e033598bf8d97e3663b2b854ed4f6aa03585de;hp=5d42881182c8a1d7a21d639c5d2f479e2bbc15f3;hpb=329a8994f7ad5454f83d576ad2b826585560424b;p=i3%2Fi3status diff --git a/i3status.h b/i3status.h index 5d42881..aa7f20e 100644 --- a/i3status.h +++ b/i3status.h @@ -5,7 +5,11 @@ #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 " | " +#endif #define BEGINS_WITH(haystack, needle) (strncmp(haystack, needle, strlen(needle)) == 0) #define max(a, b) (a > b ? a : b) @@ -20,6 +24,25 @@ 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 +#include + +#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 }; @@ -38,11 +61,12 @@ void create_file(const char *name); 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 */ @@ -67,7 +91,7 @@ extern int highest_order; 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;