dwm

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit fcdb15022f9654ae1a5788ebec961a4f2326b6df
parent 4564e94f31f2c825b710e38e0c918e820d51b387
Author: AndrewLockVI <andrew@laack.co>
Date:   Fri, 21 Feb 2025 05:30:39 -0600

Added centering of floating window and removed tmux binding in favor of dvtm+abduco

Diffstat:
Mconfig.h | 4++--
Mdwm.c | 2++
2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/config.h b/config.h @@ -87,7 +87,7 @@ static const char highlight[] = "#967762"; static const char *dmenucmd[] = {"/home/andrew/bin/dmenu.sh", background, foreground, highlight, NULL}; static const char *endcmd[] = {"/home/andrew/bin/power.sh", background, foreground, highlight, NULL}; static const char *passcmd[] = {"/home/andrew/bin/pass.sh", background, foreground, highlight, NULL}; -static const char *tmuxcmd[] = {"/home/andrew/bin/tmux.sh", background, foreground, highlight, NULL}; +//static const char *tmuxcmd[] = {"/home/andrew/bin/tmux.sh", background, foreground, highlight, NULL}; //static const char *attachcmd[] = {"/home/andrew/bin/attach.sh", background, foreground, highlight, NULL}; //static const char *tabbedcmd[] = {"/home/andrew/bin/tabbed.sh", background, foreground, highlight, NULL}; static const char *dvtmcmd[] = {"/home/andrew/bin/dvtm.sh", background, foreground, highlight, NULL}; @@ -118,7 +118,7 @@ static const Key keys[] = { { MODKEY, XK_p, spawn, {.v = passcmd } }, { MODKEY, XK_d, spawn, {.v = dvtmcmd } }, - { MODKEY, XK_t, spawn, {.v = tmuxcmd } }, + //{ MODKEY, XK_t, spawn, {.v = tmuxcmd } }, // I didn't really use this. //{ MODKEY, XK_a, spawn, {.v = attachcmd} }, //{ MODKEY, XK_s, spawn, {.v = searchcmd } }, diff --git a/dwm.c b/dwm.c @@ -1080,6 +1080,8 @@ manage(Window w, XWindowAttributes *wa) updatewindowtype(c); updatesizehints(c); updatewmhints(c); + c->x = c->mon->mx + (c->mon->mw - WIDTH(c)) / 2; + c->y = c->mon->my + (c->mon->mh - HEIGHT(c)) / 2; XSelectInput(dpy, w, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); grabbuttons(c, 0); if (!c->isfloating)