Revert "Uhh..ansohus"
[monky] / src / text_object.h
index 0c001b3..519c318 100644 (file)
@@ -1,4 +1,6 @@
-/* Conky, a system monitor, based on torsmo
+/* -*- mode: c; c-basic-offset: 4; tab-width: 4; indent-tabs-mode: t -*-
+ *
+ * Conky, a system monitor, based on torsmo
  *
  * Any original torsmo code is licensed under the BSD license
  *
@@ -42,6 +44,7 @@
 #endif
 
 enum text_object_type {
+       OBJ_read_tcp,
        OBJ_addr,
 #if defined(__linux__)
        OBJ_addrs,
@@ -76,19 +79,25 @@ enum text_object_type {
        OBJ_conky_build_arch,
        OBJ_font,
        OBJ_cpu,
-       OBJ_cpugauge,
        OBJ_cpubar,
+#ifdef X11
+       OBJ_cpugauge,
        OBJ_cpugraph,
        OBJ_loadgraph,
+#endif /* X11 */
        OBJ_diskio,
        OBJ_diskio_read,
        OBJ_diskio_write,
+#ifdef X11
        OBJ_diskiograph,
        OBJ_diskiograph_read,
        OBJ_diskiograph_write,
+#endif /* X11 */
        OBJ_downspeed,
        OBJ_downspeedf,
+#ifdef X11
        OBJ_downspeedgraph,
+#endif /* X11 */
        OBJ_else,
        OBJ_endif,
        OBJ_eval,
@@ -96,12 +105,14 @@ enum text_object_type {
        OBJ_exec,
        OBJ_execi,
        OBJ_texeci,
-       OBJ_execgauge,
        OBJ_execbar,
-       OBJ_execgraph,
        OBJ_execibar,
+#ifdef X11
+       OBJ_execgauge,
+       OBJ_execgraph,
        OBJ_execigraph,
        OBJ_execigauge,
+#endif /* X11 */
        OBJ_execp,
        OBJ_execpi,
        OBJ_freq,
@@ -142,7 +153,9 @@ enum text_object_type {
        OBJ_ibm_volume,
        OBJ_ibm_brightness,
        OBJ_smapi,
+#ifdef X11
        OBJ_smapi_bat_bar,
+#endif /* X11 */
        OBJ_smapi_bat_perc,
        OBJ_smapi_bat_temp,
        OBJ_smapi_bat_power,
@@ -180,6 +193,9 @@ enum text_object_type {
        OBJ_top,
        OBJ_top_mem,
        OBJ_top_time,
+#ifdef IOSTATS
+       OBJ_top_io,
+#endif
        OBJ_tail,
        OBJ_head,
        OBJ_lines,
@@ -203,22 +219,29 @@ enum text_object_type {
        OBJ_mem,
        OBJ_memeasyfree,
        OBJ_memfree,
+#ifdef X11
        OBJ_memgauge,
-       OBJ_membar,
        OBJ_memgraph,
+#endif /* X11 */
+       OBJ_membar,
        OBJ_memmax,
        OBJ_memperc,
        OBJ_mixer,
        OBJ_mixerl,
        OBJ_mixerr,
+#ifdef X11
        OBJ_mixerbar,
        OBJ_mixerlbar,
        OBJ_mixerrbar,
+#endif /* X11 */
        OBJ_if_mixer_mute,
 #ifdef X11
        OBJ_monitor,
        OBJ_monitor_number,
-#endif
+       OBJ_desktop,
+       OBJ_desktop_number,
+       OBJ_desktop_name,
+#endif /* X11 */
        OBJ_nameserver,
        OBJ_nodename,
        OBJ_nvidia,
@@ -229,6 +252,7 @@ enum text_object_type {
        OBJ_outlinecolor,
        OBJ_stippled_hr,
        OBJ_swap,
+       OBJ_swapfree,
        OBJ_swapbar,
        OBJ_swapmax,
        OBJ_swapperc,
@@ -242,7 +266,9 @@ enum text_object_type {
        OBJ_updates,
        OBJ_upspeed,
        OBJ_upspeedf,
+#ifdef X11
        OBJ_upspeedgraph,
+#endif /* X11 */
        OBJ_uptime,
        OBJ_uptime_short,
        OBJ_user_names,
@@ -284,7 +310,7 @@ enum text_object_type {
        OBJ_mpd_percent,
        OBJ_mpd_smart,
        OBJ_if_mpd_playing,
-#endif
+#endif /* MPD */
 #ifdef MOC
        OBJ_moc_state,
        OBJ_moc_file,
@@ -297,7 +323,7 @@ enum text_object_type {
        OBJ_moc_curtime,
        OBJ_moc_bitrate,
        OBJ_moc_rate,
-#endif
+#endif /* MOC */
 #ifdef XMMS2
        OBJ_xmms2_artist,
        OBJ_xmms2_album,
@@ -314,12 +340,14 @@ enum text_object_type {
        OBJ_xmms2_size,
        OBJ_xmms2_percent,
        OBJ_xmms2_status,
+#ifdef X11
        OBJ_xmms2_bar,
+#endif /* X11 */
        OBJ_xmms2_smart,
        OBJ_xmms2_playlist,
        OBJ_xmms2_timesplayed,
        OBJ_if_xmms2_connected,
-#endif
+#endif /* XMMS2 */
 #ifdef AUDACIOUS
        OBJ_audacious_status,
        OBJ_audacious_title,
@@ -334,8 +362,10 @@ enum text_object_type {
        OBJ_audacious_playlist_length,
        OBJ_audacious_playlist_position,
        OBJ_audacious_main_volume,
+#ifdef X11
        OBJ_audacious_bar,
-#endif
+#endif /* X11 */
+#endif /* AUDACIOUS */
 #ifdef BMPX
        OBJ_bmpx_title,
        OBJ_bmpx_artist,
@@ -343,26 +373,48 @@ enum text_object_type {
        OBJ_bmpx_track,
        OBJ_bmpx_uri,
        OBJ_bmpx_bitrate,
-#endif
+#endif /* BMPX */
 #ifdef EVE
        OBJ_eve,
-#endif
+#endif /* EVE */
+#ifdef HAVE_CURL
+       OBJ_curl,
+#endif /* HAVE_CURL */
 #ifdef RSS
        OBJ_rss,
-#endif
+#endif /* RSS */
+#ifdef WEATHER
+       OBJ_weather,
+#endif /* WEATHER */
+#ifdef XOAP
+       OBJ_weather_forecast,
+#endif /* XOAP */
+#ifdef HAVE_LUA
+       OBJ_lua,
+       OBJ_lua_parse,
+       OBJ_lua_bar,
+#ifdef X11
+       OBJ_lua_graph,
+       OBJ_lua_gauge,
+#endif /* X11 */
+#endif /* HAVE_LUA */
 #ifdef TCP_PORT_MONITOR
        OBJ_tcp_portmon,
-#endif
+#endif /* TCP_PORT_MONITOR */
 #ifdef HAVE_ICONV
        OBJ_iconv_start,
        OBJ_iconv_stop,
-#endif
+#endif /* HAVE_ICONV */
 #ifdef HDDTEMP
        OBJ_hddtemp,
-#endif
+#endif /* HDDTEMP */
+       OBJ_include,
+       OBJ_blink,
+       OBJ_to_bytes,
        OBJ_scroll,
        OBJ_combine,
        OBJ_entropy_avail,
+       OBJ_entropy_perc,
        OBJ_entropy_poolsize,
        OBJ_entropy_bar,
 #ifdef APCUPSD
@@ -375,13 +427,15 @@ enum text_object_type {
        OBJ_apcupsd_linev,
        OBJ_apcupsd_load,
        OBJ_apcupsd_loadbar,
+#ifdef X11
        OBJ_apcupsd_loadgraph,
        OBJ_apcupsd_loadgauge,
+#endif /* X11 */
        OBJ_apcupsd_charge,
        OBJ_apcupsd_timeleft,
        OBJ_apcupsd_temp,
        OBJ_apcupsd_lastxfer,
-#endif
+#endif /* APCUPSD */
 };
 
 struct text_object {
@@ -414,17 +468,20 @@ struct text_object {
                        int w, h;
                } fsbar;                /* 3 */
 
+#ifdef X11
                struct {
                        int l;
                        int w, h;
                } mixerbar;             /* 3 */
+#endif
 
                struct {
                        int fd;
                        int arg;
                        char devtype[256];
                        char type[64];
-               } sysfs;                /* 2 */
+                       float factor, offset;
+               } sysfs;
 
                struct {
                        struct text_object *next;
@@ -436,19 +493,17 @@ struct text_object {
                struct {
                        int num;
                        int type;
+                       int was_parsed;
+                       char *s;
                } top;
 
                struct {
                        int wantedlines;
-                       int readlines;
                        char *logfile;
-                       double last_update;
-                       float interval;
                        char *buffer;
-                       /* If not -1, a file descriptor to read from when
-                        * logfile is a FIFO. */
-                       int fd;
-               } tail;
+                       int current_use;
+                       int max_uses;
+               } headtail;
 
                struct {
                        double last_update;
@@ -488,20 +543,42 @@ struct text_object {
                        char *userid;
                } eve;
 #endif
+#ifdef HAVE_CURL
+               struct {
+                       char *uri;
+                       float interval;
+               } curl;
+#endif
 #ifdef RSS
                struct {
                        char *uri;
                        char *action;
                        int act_par;
-                       int delay;
+                       float interval;
                        unsigned int nrspaces;
                } rss;
 #endif
+#ifdef WEATHER
+               struct {
+                       char *uri;
+                       char *data_type;
+                       int interval;
+               } weather;
+#endif
+#ifdef XOAP
+               struct {
+                       char *uri;
+                       unsigned int day;
+                       char *data_type;
+                       int interval;
+               } weather_forecast;
+#endif
                struct {
                        char *text;
                        unsigned int show;
                        unsigned int step;
                        unsigned int start;
+                       long resetcolor;
                } scroll;
 
                struct {
@@ -510,6 +587,11 @@ struct text_object {
                        char *right;
                } combine;
 
+               struct {
+                       char *host;
+                       unsigned int port;
+               } read_tcp;
+
                struct local_mail_s local_mail;
 #ifdef NVIDIA
                struct nvidia_s nvidia;
@@ -521,8 +603,7 @@ struct text_object {
        long line;
        unsigned int c, d, e;
        float f;
-       char showaslog;
-       char global_mode;
+       char char_a, char_b;
 };
 
 /* text object list helpers */