dnl
AC_ARG_ENABLE([eve],
- EC_HELP_STRING([--enable-eve], [Eve-Online skill monitor @<:@default=no@:>@]),
+ AC_HELP_STRING([--enable-eve], [Eve-Online skill monitor @<:@default=no@:>@]),
[want_eve="$enableval"], [want_eve=no])
AM_CONDITIONAL(BUILD_EVE, test x$want_eve = xyes)
AC_DEFINE(DEFAULTNETDEV, "eth0", [Default networkdevice])
AC_DEFINE(CONFIG_FILE, "$HOME/.conkyrc", [Configfile of the user])
+AC_DEFINE(MAX_SPECIALS_DEFAULT, 512, [Default maximum number of special things, e.g. fonts, offsets, aligns, etc.])
+AC_DEFINE(MAX_USER_TEXT_DEFAULT, 16384, [Default maximum size of config TEXT buffer, i.e. below TEXT line.])
+AC_DEFINE(DEFAULT_TEXT_BUFFER_SIZE, 256, [Default size used for temporary, static text buffers])
dnl
dnl Some functions
if test "x$want_debug" = "xyes" -a $ac_cv_c_compiler_gnu != no; then
CFLAGS="$CFLAGS -g3"
- AC_DEFINE([DEBUG], [], [Define for debugging])
+ AC_DEFINE([DEBUG], 1, [Define for debugging])
fi
dnl
fs.c \
$(hddtemp) \
$(linux) \
+ logging.h \
$(nvidia) \
mail.c \
mixer.c \
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301
* USA. */
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "config.h"
+#include "conky.h"
+#include "logging.h"
+#include "audacious.h"
#include <glib.h>
#ifndef AUDACIOUS_LEGACY
xmms_remote_get_playlist_length(x)
#endif
-#include "conky.h"
-#include "audacious.h"
-
/* access to this item array is synchronized */
static audacious_t audacious_items;
*
*/
+#include "config.h"
+#include "conky.h"
+#include "logging.h"
+
#include <bmp/dbus.hh>
#include <dbus/dbus-glib.h>
-#include "conky.h"
-
#define DBUS_TYPE_G_STRING_VALUE_HASHTABLE \
(dbus_g_type_get_map("GHashTable", G_TYPE_STRING, G_TYPE_VALUE))
*
*/
+#include "config.h"
#include "conky.h"
+#include "fs.h"
+#include "logging.h"
#include <ctype.h>
#include <errno.h>
#include <sys/time.h>
#include <pthread.h>
+/* check for OS and include appropriate headers */
+#if defined(__linux__)
+#include "linux.h"
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include "freebsd.h"
+#elif defined(__OpenBSD__)
+#include "openbsd.h"
+#endif
+
+/* OS specific prototypes to be implemented by linux.c & Co. */
+void update_entropy(void);
+
#ifndef HAVE_STRNDUP
// use our own strndup() if it's not available
char *strndup(const char *s, size_t n)
//static double last_dns_update;
-void update_dns_data(void)
+static void update_dns_data(void)
{
FILE *fp;
char line[256];
static double last_fs_update;
unsigned long long need_mask;
+int no_buffers;
#define NEED(a) ((need_mask & (1 << a)) && ((info.mask & (1 << a)) == 0))
-#ifndef COMMON_H_
-#define COMMON_H_
+#ifndef _COMMON_H
+#define _COMMON_H
+
+#include <stdio.h>
+#include <sys/socket.h>
int check_mount(char *s);
void update_diskio(void);
void update_net_stats(void);
void update_cpu_usage(void);
void update_total_processes(void);
+void update_uname(void);
void update_running_processes(void);
void update_i8k(void);
+void update_stuff(void);
char get_freq(char *, size_t, const char *, int, unsigned int);
void get_freq_dynamic(char *, size_t, const char *, int);
char get_voltage(char *, size_t, const char *, int, unsigned int); /* ptarjan */
void free_all_processes(void);
struct process *get_first_process(void);
void get_cpu_count(void);
+double get_time(void);
+
+FILE *open_file(const char *, int *);
+void variable_substitute(const char *s, char *dest, unsigned int n);
+
+void format_seconds(char *buf, unsigned int n, long t);
+void format_seconds_short(char *buf, unsigned int n, long t);
+
+#ifdef X11
+void update_x11info(void);
+#endif
+
+int round_to_int(float);
+
+extern unsigned long long need_mask;
+extern int no_buffers;
+
+struct dns_data {
+ int nscount;
+ char **ns_list;
+};
+void free_dns_data(void);
+
+struct net_stat {
+ const char *dev;
+ int up;
+ long long last_read_recv, last_read_trans;
+ long long recv, trans;
+ double recv_speed, trans_speed;
+ struct sockaddr addr;
+ char* addrs;
+ double net_rec[15], net_trans[15];
+ // wireless extensions
+ char essid[32];
+ char bitrate[16];
+ char mode[16];
+ int link_qual;
+ int link_qual_max;
+ char ap[18];
+};
+void clear_net_stats(void);
+struct net_stat *get_net_stat(const char *);
int open_sysfs_sensor(const char *dir, const char *dev, const char *type, int n,
int *divisor, char *devtype);
int get_battery_perct(const char *bat);
int get_battery_perct_bar(const char *bat);
-#endif /*COMMON_H_*/
+#endif /* _COMMON_H */
*
*/
+#include "config.h"
#include "text_object.h"
#include "conky.h"
+#include "common.h"
#include <stdarg.h>
#include <math.h>
#include <ctype.h>
#endif
#include <sys/time.h>
#ifdef X11
+#include "x11.h"
#include <X11/Xutil.h>
#ifdef HAVE_XDAMAGE
#include <X11/extensions/Xdamage.h>
#include <fcntl.h>
#include <getopt.h>
+/* local headers */
+#include "build.h"
+#include "diskio.h"
+#include "fs.h"
+#include "logging.h"
+#include "mixer.h"
+#include "mail.h"
+#include "mboxscan.h"
+#include "temphelper.h"
+#include "top.h"
+
+/* check for OS and include appropriate headers */
+#if defined(__linux__)
+#include "linux.h"
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#include "freebsd.h"
+#elif defined(__OpenBSD__)
+#include "openbsd.h"
+#endif
+
+/* FIXME: apm_getinfo is unused here. maybe it's meant for common.c */
+#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
+ || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
+int apm_getinfo(int fd, apm_info_t aip);
+char *get_apm_adapter(void);
+char *get_apm_battery_life(void);
+char *get_apm_battery_time(void);
+#endif
+
#ifdef HAVE_ICONV
#include <iconv.h>
#endif
#endif
#endif
-#include "build.h"
-
-#include "temphelper.h"
-
#ifndef S_ISSOCK
#define S_ISSOCK(x) ((x & S_IFMT) == S_IFSOCK)
#endif
//#define SIGNAL_BLOCKING
#undef SIGNAL_BLOCKING
-/* debugging level */
+/* debugging level, used by logging.h */
int global_debug_level = 0;
+/* two strings for internal use */
+static char *tmpstring1, *tmpstring2;
+
+/* variables holding various config settings */
+int short_units;
+int cpu_separate;
+static int use_spacer;
+int top_cpu, top_mem;
+#define TO_X 1
+#define TO_STDOUT 2
+static int output_methods;
+static volatile int g_signal_pending;
+/* Update interval */
+static double update_interval;
+
+
+/* prototypes for internally used functions */
+static void signal_handler(int);
static void print_version(void) __attribute__((noreturn));
+static void reload_config(void);
+static void clean_up(void);
static void print_version(void)
{
#endif /* X11 */
+/* struct that has all info to be shared between
+ * instances of the same text object */
+struct information info;
+
/* default config file */
static char *current_config;
static void load_config_file(const char *);
/* reload the config file */
-void reload_config(void)
+static void reload_config(void)
{
timed_thread_destroy_registered_threads();
}
}
-void clean_up(void)
+static void clean_up(void)
{
timed_thread_destroy_registered_threads();
return 0;
}
-void signal_handler(int sig)
+static void signal_handler(int sig)
{
/* signal handler is light as a feather, as it should be.
* we will poll g_signal_pending with each loop of conky
#ifndef _conky_h_
#define _conky_h_
+#include "config.h" /* defines */
+#include "common.h" /* at least for struct dns_data */
+#include <sys/utsname.h> /* struct uname_s */
+
#if defined(HAS_MCHECK_H)
#include <mcheck.h>
#endif /* HAS_MCHECK_H */
#define FALSE 0
#define TRUE 1
-#include "config.h"
-#include <sys/utsname.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <locale.h>
-#include <langinfo.h>
-#include <wchar.h>
-#include <sys/param.h>
#if !defined(__GNUC__)
# define __attribute__(x) /* nothing */
#endif
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
-#include "freebsd.h"
-#endif /* __FreeBSD__ || __FreeBSD_kernel__ */
-
-#if defined(__OpenBSD__)
-#include "openbsd.h"
-#endif /* __OpenBSD__ */
-
#ifndef HAVE_STRNDUP
// use our own strndup() if it's not available
char *strndup(const char *s, size_t n);
#endif /* HAVE_STRNDUP */
+/* headers of optional features
+ * include them here, so we don't need to run the check
+ * in every code file optionally using the feature
+ */
+
#ifdef AUDACIOUS
#include "audacious.h"
#endif
-#ifdef XMMS2
-#include <xmmsclient/xmmsclient.h>
-#endif
-
-#ifdef RSS
-#include "rss.h"
+#ifdef BMPX
+#include "bmpx.h"
#endif
#ifdef EVE
#include "eve.h"
#endif
-#ifdef SMAPI
-#include "smapi.h"
+#ifdef HDDTEMP
+#include "hddtemp.h"
+#endif /* HDDTEMP */
+
+#ifdef MOC
+#include "moc.h"
+#endif
+
+#ifdef MPD
+#include "mpd.h"
#endif
#ifdef NVIDIA
#include "nvidia.h"
#endif
-#include "mboxscan.h"
-#include "timed_thread.h"
-#include "top.h"
-
-#define DEFAULT_TEXT_BUFFER_SIZE 256
-extern unsigned int text_buffer_size;
-
-/* maximum number of special things, e.g. fonts, offsets, aligns, etc. */
-#define MAX_SPECIALS_DEFAULT 512
-
-/* maximum size of config TEXT buffer, i.e. below TEXT line. */
-#define MAX_USER_TEXT_DEFAULT 16384
-
-#include <sys/socket.h>
-
-#define ERR(...) { \
- fprintf(stderr, PACKAGE_NAME": "); \
- fprintf(stderr, __VA_ARGS__); \
- fprintf(stderr, "\n"); \
-}
-
-/* critical error */
-#define CRIT_ERR(...) \
- { ERR(__VA_ARGS__); exit(EXIT_FAILURE); }
-
-/* debugging output */
-extern int global_debug_level;
-#define __DBGP(level, ...) \
- if (global_debug_level > level) { \
- fprintf(stderr, "DEBUG(%d) [" __FILE__ ":%d]: ", level, __LINE__); \
- fprintf(stderr, __VA_ARGS__); \
- fprintf(stderr, "\n"); \
- }
-#define DBGP(...) __DBGP(0, __VA_ARGS__)
-#define DBGP2(...) __DBGP(1, __VA_ARGS__)
-
-struct net_stat {
- const char *dev;
- int up;
- long long last_read_recv, last_read_trans;
- long long recv, trans;
- double recv_speed, trans_speed;
- struct sockaddr addr;
- char* addrs;
- double net_rec[15], net_trans[15];
- // wireless extensions
- char essid[32];
- char bitrate[16];
- char mode[16];
- int link_qual;
- int link_qual_max;
- char ap[18];
-};
-
-struct dns_data {
- int nscount;
- char **ns_list;
-};
-
-struct fs_stat {
- char path[DEFAULT_TEXT_BUFFER_SIZE];
- char type[DEFAULT_TEXT_BUFFER_SIZE];
- long long size;
- long long avail;
- long long free;
- char set;
-};
-
-#include "diskio.h"
-
-struct mail_s { // for imap and pop3
- unsigned long unseen;
- unsigned long messages;
- unsigned long used;
- unsigned long quota;
- unsigned long port;
- unsigned int retries;
- float interval;
- double last_update;
- char host[128];
- char user[128];
- char pass[128];
- char command[1024];
- char folder[128];
- timed_thread *p_timed_thread;
- char secure;
-};
-
-/* struct cpu_stat {
- unsigned int user, nice, system, idle, iowait, irq, softirq;
- int cpu_avg_samples;
-}; */
+#ifdef RSS
+#include "rss.h"
+#endif
-#ifdef MPD
-#include "mpd.h"
+#ifdef SMAPI
+#include "smapi.h"
#endif
-#ifdef MOC
-#include "moc.h"
+#ifdef TCP_PORT_MONITOR
+#include "tcp-portmon.h"
#endif
#ifdef XMMS2
#include "xmms2.h"
#endif
-#ifdef AUDACIOUS
-#include "audacious.h"
-#endif
-
-#ifdef BMPX
-#include "bmpx.h"
-#endif
+/* A size for temporary, static buffers to use when
+ * one doesn't know what to choose. Defaults to 256. */
+extern unsigned int text_buffer_size;
-void update_entropy(void);
struct entropy_s {
unsigned int entropy_avail;
unsigned int poolsize;
};
#endif
-#ifdef TCP_PORT_MONITOR
-#include "tcp-portmon.h"
-#endif
-
enum {
INFO_CPU = 0,
INFO_MAIL = 1,
#endif
};
-/* get_battery_stuff() item selector */
+/* get_battery_stuff() item selector
+ * needed by conky.c, linux.c and freebsd.c */
enum {
BATTERY_STATUS,
BATTERY_TIME
};
-/* if_up strictness selector */
+/* if_up strictness selector
+ * needed by conky.c and linux.c (and potentially others) */
enum {
IFUP_UP,
IFUP_LINK,
IFUP_ADDR
} ifup_strictness;
-/* Update interval */
-double update_interval;
-
-volatile int g_signal_pending;
-
struct information {
unsigned int mask;
unsigned int diskio_write_value;
};
+/* needed by linux.c and top.c -> outsource somewhere */
enum {
/* set to true if kernel uses "long" format for /proc/stats */
KFLAG_IS_LONGSTAT = 0x01,
/* bits 0x04, 0x08, 0x10, 0x20, 0x40, 0x80 available for future use */
/* KFLAG_NEXT_ONE = 0x04 */
};
-
#define KFLAG_SETON(a) info.kflags |= a
#define KFLAG_SETOFF(a) info.kflags &= (~a)
#define KFLAG_FLIP(a) info.kflags ^= a
#define KFLAG_ISSET(a) info.kflags & a
-#define TO_X 1
-#define TO_STDOUT 2
-int output_methods;
-
-int top_cpu;
-int top_mem;
-
-int use_spacer;
+/* defined in conky.c, needed by top.c */
+extern int top_cpu, top_mem;
enum spacer_opts { NO_SPACER = 0, LEFT_SPACER, RIGHT_SPACER };
-char *tmpstring1;
-char *tmpstring2;
-
-#ifdef X11
-#include "x11.h"
-#endif /* X11 */
-
-int cpu_separate;
-int short_units;
-
-/* struct that has all info */
-struct information info;
-
-void signal_handler(int);
-void reload_config(void);
-void clean_up(void);
-
-void update_uname(void);
-double get_time(void);
-FILE *open_file(const char *file, int *reported);
-void variable_substitute(const char *s, char *dest, unsigned int n);
-void format_seconds(char *buf, unsigned int n, long t);
-void format_seconds_short(char *buf, unsigned int n, long t);
-struct net_stat *get_net_stat(const char *dev);
-void clear_net_stats(void);
-void free_dns_data(void);
-void update_dns_data(void);
-void update_users(void);
-
-#ifdef X11
-void update_x11info(void);
-#endif
+/* defined in conky.c, needed by top.c */
+extern int cpu_separate;
-void update_stuff(void);
+/* struct that has all info to be shared between
+ * instances of the same text object */
+extern struct information info;
-int round_to_int(float f);
-
-extern unsigned long long need_mask;
+/* defined in users.c */
+void update_users(void);
+/* defined in conky.c */
extern double current_update_time, last_update_time;
-extern int no_buffers;
-
-#if defined(__linux__)
-#include "linux.h"
-#endif
-
-#include "fs.h"
-#include "mixer.h"
-#include "mail.h"
-
-#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) \
- || defined(__OpenBSD__)) && (defined(i386) || defined(__i386__))
-int apm_getinfo(int fd, apm_info_t aip);
-char *get_apm_adapter(void);
-char *get_apm_battery_life(void);
-char *get_apm_battery_time(void);
-#endif
-
-#ifdef HDDTEMP
-#include "hddtemp.h"
-#endif /* HDDTEMP */
-
#endif
*
*/
-#include "conky.h"
+#include "config.h"
+#include "conky.h" /* text_buffer_size */
+#include "logging.h"
+#include "diskio.h"
+#include "common.h"
+#include <stdlib.h>
#include <limits.h>
/* The following ifdefs were adapted from gkrellm */
#include <linux/major.h>
*/
#include "conky.h"
+#include "logging.h"
+#include "fs.h"
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
-#ifndef FS_H_
-#define FS_H_
+#ifndef _FS_H
+#define _FS_H
+
+#include "conky.h" /* DEFAULT_TEXT_BUFFER_SIZE */
+
+/* needed here and by fs.c */
+struct fs_stat {
+ char path[DEFAULT_TEXT_BUFFER_SIZE];
+ char type[DEFAULT_TEXT_BUFFER_SIZE];
+ long long size;
+ long long avail;
+ long long free;
+ char set;
+};
void update_fs_stats(void);
struct fs_stat *prepare_fs_stat(const char *path);
void clear_fs_stats(void);
-#endif /*FS_H_*/
+#endif /* _FS_H */
*/
#include "conky.h"
+#include "logging.h"
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
*/
#include "conky.h"
+#include "logging.h"
+#include "common.h"
+#include "linux.h"
#include <dirent.h>
#include <ctype.h>
#include <errno.h>
-#ifndef LINUX_H_
-#define LINUX_H_
+#ifndef _LINUX_H
+#define _LINUX_H
#include "common.h"
enum { PB_BATT_STATUS, PB_BATT_PERCENT, PB_BATT_TIME };
void get_powerbook_batt_info(char *, size_t, int);
-#endif /*LINUX_H_*/
+#endif /* _LINUX_H */
--- /dev/null
+/* Conky, a system monitor, based on torsmo
+ *
+ * Any original torsmo code is licensed under the BSD license
+ *
+ * All code written since the fork of torsmo is licensed under the GPL
+ *
+ * Please see COPYING for details
+ *
+ * Copyright (c) 2004, Hannu Saransaari and Lauri Hakkarainen
+ * Copyright (c) 2005-2008 Brenden Matthews, Philip Kovacs, et. al.
+ * (see AUTHORS)
+ * All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#ifndef _LOGGING_H
+#define _LOGGING_H
+
+#define ERR(...) { \
+ fprintf(stderr, PACKAGE_NAME": "); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
+}
+
+/* critical error */
+#define CRIT_ERR(...) \
+ { ERR(__VA_ARGS__); exit(EXIT_FAILURE); }
+
+/* debugging output */
+extern int global_debug_level;
+#define __DBGP(level, ...) \
+ if (global_debug_level > level) { \
+ fprintf(stderr, "DEBUG(%d) [" __FILE__ ":%d]: ", level, __LINE__); \
+ fprintf(stderr, __VA_ARGS__); \
+ fprintf(stderr, "\n"); \
+ }
+#define DBGP(...) __DBGP(0, __VA_ARGS__)
+#define DBGP2(...) __DBGP(1, __VA_ARGS__)
+
+#endif /* _LOGGING_H */
*
*/
+#include "config.h"
#include "conky.h"
+#include "common.h"
+#include "logging.h"
+#include "mail.h"
+#include <errno.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <netdb.h>
+#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <errno.h>
#include <termios.h>
+/* MAX() is defined by a header included from conky.h
+ * maybe once this is not true anymore, so have an alternative
+ * waiting to drop in.
+ *
+ * #define MAX(a, b) ((a > b) ? a : b)
+ */
+
char *current_mail_spool;
void update_mail_count(struct local_mail_s *mail)
-#ifndef _MAIL_H_
-#define _MAIL_H_
+#ifndef _MAIL_H
+#define _MAIL_H
+
+#include "timed_thread.h"
extern char *current_mail_spool;
+struct mail_s { // for imap and pop3
+ unsigned long unseen;
+ unsigned long messages;
+ unsigned long used;
+ unsigned long quota;
+ unsigned long port;
+ unsigned int retries;
+ float interval;
+ double last_update;
+ char host[128];
+ char user[128];
+ char pass[128];
+ char command[1024];
+ char folder[128];
+ timed_thread *p_timed_thread;
+ char secure;
+};
+
struct local_mail_s {
char *box;
int mail_count;
void *imap_thread(void *arg);
void *pop3_thread(void *arg);
-#endif /* _MAIL_H_ */
+#endif /* _MAIL_H */
*/
#include "conky.h"
+#include "logging.h"
+#include "mail.h"
#include <sys/stat.h>
#include <sys/time.h>
#include <errno.h>
*/
#include "conky.h"
+#include "logging.h"
#include <sys/ioctl.h>
#include <errno.h>
#include <fcntl.h>
*/
#include "conky.h"
+#include "logging.h"
#include "moc.h"
#include <stdio.h>
*/
#include "conky.h"
+#include "logging.h"
void init_mpd_stats(struct mpd_s *mpd)
{
*/
#include "conky.h"
+#include "logging.h"
#include "prss.h"
#include <time.h>
#include <assert.h>
* USA.
*
*/
-
+#define _GNU_SOURCE
+#include "conky.h" /* text_buffer_size, PACKAGE_NAME, maybe more */
#include "smapi.h"
+#include "logging.h"
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/types.h>
#define SYS_SMAPI_PATH "/sys/devices/platform/smapi"
*
*/
-#ifndef SMAPI_H
-#define SMAPI_H
-
-#include "conky.h"
-#include <sys/stat.h>
+#ifndef _SMAPI_H
+#define _SMAPI_H
int smapi_bat_installed(int);
int smapi_get_bat_int(int, const char *);
char *smapi_get_bat_val(const char *);
-#endif /* SMAPI_H */
+#endif /* _SMAPI_H */
/* doesn't work, feel free to finish this */
#include "conky.h"
+#include "common.h"
#include <kstat.h>
static kstat_ctl_t *kstat;
*
*/
#include "conky.h"
+#include "logging.h"
#include "tcp-portmon.h"
#include "libtcp-portmon.h"
*
*/
#include "text_object.h"
-#include "conky.h" /* not as worse: only for the printing macros */
+#include "logging.h"
/* text_object_list
*
#endif
#include "mail.h" /* local_mail_s */
+#include "fs.h" /* struct fs_stat */
#ifdef NVIDIA
#include "nvidia.h" /* nvidia_s */
*
*/
+#include "config.h"
#include "conky.h"
+#include "logging.h"
+#include "common.h"
-#ifdef X11
+#include "x11.h"
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xmd.h>
#include <X11/Xutil.h>
+
#ifdef XFT
#include <X11/Xft/Xft.h>
+int use_xft = 0;
#endif
#ifdef HAVE_XDBE
int use_xdbe;
#endif
-#ifdef XFT
-int use_xft = 0;
-#endif
-
/* some basic X11 stuff */
Display *display;
int display_width;
current_info->x11.monitor.number = XScreenCount(display);
current_info->x11.monitor.current = XDefaultScreen(display);
}
-#endif /* X11 */