]> git.sur5r.net Git - i3/i3status/blobdiff - include/i3status.h
Implement the i3bar JSON protocol
[i3/i3status] / include / i3status.h
index a79be1842812155feacd89246711b8b6dab9723d..e40003ca7f4987b1b7ac85f5bd04e2a278918e06 100644 (file)
@@ -1,10 +1,11 @@
 #ifndef _I3STATUS_H
 #define _I3STATUS_H
 
-enum { O_DZEN2, O_XMOBAR, O_NONE } output_format;
+enum { O_DZEN2, O_XMOBAR, O_I3BAR, O_NONE } output_format;
 
 #include <stdbool.h>
 #include <confuse.h>
+#include <time.h>
 
 #define BEGINS_WITH(haystack, needle) (strncmp(haystack, needle, strlen(needle)) == 0)
 #define max(a, b) ((a) > (b) ? (a) : (b))
@@ -15,7 +16,8 @@ enum { O_DZEN2, O_XMOBAR, O_NONE } output_format;
 
 #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
 
-#define THERMAL_ZONE "hw.acpi.thermal.tz%d.temperature"
+/* this needs the coretemp module to be loaded */
+#define THERMAL_ZONE "dev.cpu.%d.temperature"
 #define BATT_LIFE "hw.acpi.battery.life"
 #define BATT_TIME "hw.acpi.battery.time"
 #define BATT_STATE "hw.acpi.battery.state"
@@ -51,22 +53,26 @@ typedef enum { CS_DISCHARGING, CS_CHARGING, CS_FULL } charging_status_t;
 /* src/general.c */
 char *skip_character(char *input, char character, int amount);
 void die(const char *fmt, ...);
-bool slurp(char *filename, char *destination, int size);
+bool slurp(const char *filename, char *destination, int size);
 
 /* src/output.c */
 void print_seperator();
 char *color(const char *colorstr);
 char *endcolor() __attribute__ ((pure));
 
+/* src/auto_detect_format.c */
+char *auto_detect_format();
+
 void print_ipv6_info(const char *format_up, const char *format_down);
 void print_disk_info(const char *path, const char *format);
-void print_battery_info(int number, const char *format, bool last_full_capacity);
-void print_time(const char *format);
-void print_ddate(const char *format);
+void print_battery_info(int number, const char *path, const char *format, bool last_full_capacity);
+void print_time(const char *format, struct tm *current_tm);
+void print_ddate(const char *format, struct tm *current_tm);
 const char *get_ip_addr();
 void print_wireless_info(const char *interface, const char *format_up, const char *format_down);
 void print_run_watch(const char *title, const char *pidfile, const char *format);
-void print_cpu_temperature_info(int zone, const char *format);
+void print_cpu_temperature_info(int zone, const char *path, const char *format);
+void print_cpu_usage(const char *format);
 void print_eth_info(const char *interface, const char *format_up, const char *format_down);
 void print_load();
 void print_volume(const char *fmt, const char *device, const char *mixer, int mixer_idx);