remove X resourcessupport

This commit is contained in:
zcake 2021-01-23 07:13:05 +00:00
parent 853a41afb4
commit 8be254e5cc
3 changed files with 0 additions and 51 deletions

BIN
xmenu

Binary file not shown.

51
xmenu.c
View File

@ -10,7 +10,6 @@
#include <X11/Xlib.h>
#include <X11/Xatom.h>
#include <X11/Xutil.h>
#include <X11/Xresource.h>
#include <X11/XKBlib.h>
#include <X11/Xft/Xft.h>
#include <X11/extensions/Xinerama.h>
@ -183,55 +182,6 @@ initmonitor(void)
}
}
/* read xrdb for configuration options */
static void
initresources(void)
{
long n;
char *type;
char *xrm;
XrmDatabase xdb;
XrmValue xval;
XrmInitialize();
if ((xrm = XResourceManagerString(dpy)) == NULL)
return;
xdb = XrmGetStringDatabase(xrm);
if (XrmGetResource(xdb, "xmenu.borderWidth", "*", &type, &xval) == True)
if ((n = strtol(xval.addr, NULL, 10)) > 0)
config.border_pixels = n;
if (XrmGetResource(xdb, "xmenu.separatorWidth", "*", &type, &xval) == True)
if ((n = strtol(xval.addr, NULL, 10)) > 0)
config.separator_pixels = n;
if (XrmGetResource(xdb, "xmenu.height", "*", &type, &xval) == True)
if ((n = strtol(xval.addr, NULL, 10)) > 0)
config.height_pixels = n;
if (XrmGetResource(xdb, "xmenu.width", "*", &type, &xval) == True)
if ((n = strtol(xval.addr, NULL, 10)) > 0)
config.width_pixels = n;
if (XrmGetResource(xdb, "xmenu.gap", "*", &type, &xval) == True)
if ((n = strtol(xval.addr, NULL, 10)) > 0)
config.gap_pixels = n;
if (XrmGetResource(xdb, "xmenu.background", "*", &type, &xval) == True)
config.background_color = strdup(xval.addr);
if (XrmGetResource(xdb, "xmenu.foreground", "*", &type, &xval) == True)
config.foreground_color = strdup(xval.addr);
if (XrmGetResource(xdb, "xmenu.selbackground", "*", &type, &xval) == True)
config.selbackground_color = strdup(xval.addr);
if (XrmGetResource(xdb, "xmenu.selforeground", "*", &type, &xval) == True)
config.selforeground_color = strdup(xval.addr);
if (XrmGetResource(xdb, "xmenu.separator", "*", &type, &xval) == True)
config.separator_color = strdup(xval.addr);
if (XrmGetResource(xdb, "xmenu.border", "*", &type, &xval) == True)
config.border_color = strdup(xval.addr);
if (XrmGetResource(xdb, "xmenu.font", "*", &type, &xval) == True)
config.font = strdup(xval.addr);
XrmDestroyDatabase(xdb);
}
/* init draw context */
static void
initdc(void)
@ -1299,7 +1249,6 @@ main(int argc, char *argv[])
/* initializers */
initmonitor();
initresources();
initdc();
initiconsize();
initatoms();

BIN
xmenu.o

Binary file not shown.