aboutsummaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c72
1 files changed, 0 insertions, 72 deletions
diff --git a/dwm.c b/dwm.c
index 8e3584d..9bfd150 100644
--- a/dwm.c
+++ b/dwm.c
@@ -36,7 +36,6 @@
#include <X11/Xlib.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
-#include <X11/Xresource.h>
#ifdef XINERAMA
#include <X11/extensions/Xinerama.h>
#endif /* XINERAMA */
@@ -172,19 +171,6 @@ typedef struct {
int monitor;
} Rule;
-/* Xresources preferences */
-enum resource_type {
- STRING = 0,
- INTEGER = 1,
- FLOAT = 2
-};
-
-typedef struct {
- char *name;
- enum resource_type type;
- void *dst;
-} ResourcePref;
-
/* function declarations */
static void applyrules(Client *c);
static int applysizehints(Client *c, int *x, int *y, int *w, int *h, int interact);
@@ -289,8 +275,6 @@ static int xerror(Display *dpy, XErrorEvent *ee);
static int xerrordummy(Display *dpy, XErrorEvent *ee);
static int xerrorstart(Display *dpy, XErrorEvent *ee);
static void zoom(const Arg *arg);
-static void load_xresources(void);
-static void resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst);
static pid_t getparentprocess(pid_t p);
static int isdescprocess(pid_t p, pid_t c);
@@ -2810,60 +2794,6 @@ zoom(const Arg *arg)
pop(c);
}
-void
-resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst)
-{
- char *sdst = NULL;
- int *idst = NULL;
- float *fdst = NULL;
-
- sdst = dst;
- idst = dst;
- fdst = dst;
-
- char fullname[256];
- char *type;
- XrmValue ret;
-
- snprintf(fullname, sizeof(fullname), "%s.%s", "dwm", name);
- fullname[sizeof(fullname) - 1] = '\0';
-
- XrmGetResource(db, fullname, "*", &type, &ret);
- if (!(ret.addr == NULL || strncmp("String", type, 64)))
- {
- switch (rtype) {
- case STRING:
- strcpy(sdst, ret.addr);
- break;
- case INTEGER:
- *idst = strtoul(ret.addr, NULL, 10);
- break;
- case FLOAT:
- *fdst = strtof(ret.addr, NULL);
- break;
- }
- }
-}
-
-void
-load_xresources(void)
-{
- Display *display;
- char *resm;
- XrmDatabase db;
- ResourcePref *p;
-
- display = XOpenDisplay(NULL);
- resm = XResourceManagerString(display);
- if (!resm)
- return;
-
- db = XrmGetStringDatabase(resm);
- for (p = resources; p < resources + LENGTH(resources); p++)
- resource_load(db, p->name, p->type, p->dst);
- XCloseDisplay(display);
-}
-
int
main(int argc, char *argv[])
{
@@ -2878,8 +2808,6 @@ main(int argc, char *argv[])
if (!(xcon = XGetXCBConnection(dpy)))
die("dwm: cannot get xcb connection\n");
checkotherwm();
- XrmInitialize();
- load_xresources();
setup();
#ifdef __OpenBSD__
if (pledge("stdio rpath proc exec ps", NULL) == -1)