From 5a21680e66d047c5dcb408b2225b67e93a1a5cad Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 23 May 2024 15:03:19 -0700 Subject: feat(config.h): custom window manager name --- config.h | 1 + dwm.c | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config.h b/config.h index 90f35a6..c1f81ba 100644 --- a/config.h +++ b/config.h @@ -7,6 +7,7 @@ #define BROWSER "firefox" /* appearance */ +static const char *wmname = "sei"; static unsigned int borderpx = 2; /* border pixel of windows */ static unsigned int snap = 32; /* snap pixel */ static const unsigned int systraypinning = 0; /* 0: sloppy systray follows selected monitor, >0: pin systray to monitor X */ diff --git a/dwm.c b/dwm.c index 76cae5e..f0d73ae 100644 --- a/dwm.c +++ b/dwm.c @@ -2086,7 +2086,7 @@ setup(void) XChangeProperty(dpy, wmcheckwin, netatom[NetWMCheck], XA_WINDOW, 32, PropModeReplace, (unsigned char *) &wmcheckwin, 1); XChangeProperty(dpy, wmcheckwin, netatom[NetWMName], utf8string, 8, - PropModeReplace, (unsigned char *) "dwm", 3); + PropModeReplace, (unsigned char *) wmname, 3); XChangeProperty(dpy, root, netatom[NetWMCheck], XA_WINDOW, 32, PropModeReplace, (unsigned char *) &wmcheckwin, 1); /* EWMH support per view */ @@ -2412,7 +2412,7 @@ updatebars(void) .background_pixmap = ParentRelative, .event_mask = ButtonPressMask|ExposureMask }; - XClassHint ch = {"dwm", "dwm"}; + XClassHint ch = {(char *)wmname, (char *)wmname}; for (m = mons; m; m = m->next) { if (m->barwin) continue; @@ -3010,7 +3010,7 @@ resource_load(XrmDatabase db, char *name, enum resource_type rtype, void *dst) char *type; XrmValue ret; - snprintf(fullname, sizeof(fullname), "%s.%s", "dwm", name); + snprintf(fullname, sizeof(fullname), "%s.%s", wmname, name); fullname[sizeof(fullname) - 1] = '\0'; XrmGetResource(db, fullname, "*", &type, &ret); -- cgit v1.2.3