-static void appenditem(Item *item, Item **list, Item **last);
-static void calcoffsets(void);
-static char *cistrstr(const char *s, const char *sub);
-static void drawmenu(void);
-static void grabkeyboard(void);
-static void insert(const char *s, ssize_t n);
-static void keypress(XKeyEvent *ev);
-static void match(void);
-static void paste(void);
-static void readstdin(void);
-static void run(void);
-static void setup(void);
-static void usage(void);
-
-static char text[BUFSIZ];
-static size_t cursor = 0;
-static const char *font = NULL;
-static const char *prompt = NULL;
-static const char *normbgcolor = "#cccccc";
-static const char *normfgcolor = "#000000";
-static const char *selbgcolor = "#0066ff";
-static const char *selfgcolor = "#ffffff";
-static unsigned int inputw = 0;
-static unsigned int lines = 0;
-static unsigned int mw, mh;
-static unsigned int promptw;
-static unsigned long normcol[ColLast];
-static unsigned long selcol[ColLast];
-static Atom utf8;
-static Bool topbar = True;
-static DC *dc;
-static Item *allitems, *matches;
-static Item *curr, *prev, *next, *sel;
-static Window root, win;
+static char text[BUFSIZ] = "";
+static char *embed;
+static int bh, mw, mh;
+static int inputw = 0, promptw;
+static int lrpad; /* sum of left and right padding */
+static size_t cursor;
+static struct item *items = NULL;
+static struct item *matches, *matchend;
+static struct item *prev, *curr, *next, *sel;
+static int mon = -1, screen;
+
+static Atom clip, utf8;
+static Display *dpy;
+static Window root, parentwin, win;
+static XIC xic;
+
+static Drw *drw;
+static Clr *scheme[SchemeLast];
+
+#include "config.h"