From 5e2ff6daf43df628cdab1322107818f2db7eb593 Mon Sep 17 00:00:00 2001 From: TitanE Date: Thu, 28 Sep 2023 01:06:27 +0300 Subject: [PATCH] new --- config.h | 14 +- dwm | Bin 72936 -> 72840 bytes dwm.c | 19 +- dwm.c.orig | 252 ++++++++++++++++++- dwm.o | Bin 63864 -> 63632 bytes patch/dwm-alwayscenter-20200625-f04cac6.diff | 12 + patch/dwm-hide_vacant_tags-6.3.diff | 39 +++ 7 files changed, 311 insertions(+), 25 deletions(-) create mode 100644 patch/dwm-alwayscenter-20200625-f04cac6.diff create mode 100644 patch/dwm-hide_vacant_tags-6.3.diff diff --git a/config.h b/config.h index 758c15d..7a4c57d 100644 --- a/config.h +++ b/config.h @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ /* appearance */ -static const unsigned int borderpx = 3; /* border pixel of windows */ +static const unsigned int borderpx = 2; /* border pixel of windows */ static const unsigned int snap = 32; /* snap pixel */ static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ @@ -65,16 +65,16 @@ static const Layout layouts[] = { /* commands */ static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ -static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_purple, "-sf", col_black, NULL }; +static const char *dmenucmd[] = { "dmenu_run", "-c", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_purple, "-sf", col_black, NULL }; static const char *termcmd[] = { "/usr/local/bin/st", NULL }; static const char *browsecmd[] = { "/usr/bin/librewolf", "-p", "browsing", NULL }; static const char *acccmd[] = { "/usr/bin/librewolf", "-p", "accounts", NULL }; -static const char *volup[] = { "/usr/bin/pactl", "set-sink-volume", "@DEFAULT_SINK@", "+5%", NULL }; -static const char *voldown[] = { "/usr/bin/pactl", "set-sink-volume", "@DEFAULT_SINK@", "-5%", NULL }; -static const char *volmute[] = { "/usr/bin/pactl", "set-sink-volume", "@DEFAULT_SINK@", "0%", NULL }; +static const char *volup[] = { "/usr/bin/volume", "up", NULL }; +static const char *voldown[] = { "/usr/bin/volume", "down", NULL }; +static const char *volmute[] = { "/usr/bin/volume", "mute", NULL }; static const char *filebrowse[] = { "/usr/bin/thunar", NULL }; -static const char *sharecmd[] = { "/usr/local/bin/st", "-c", "floating-term", "-e", "/home/sufyaan/docs/sys/gits/scripts-dotfiles/scripts/shr", NULL }; -static const char *bmcmd[] = { "/usr/local/bin/st", "-c", "floating-term", "-e", "/home/sufyaan/docs/sys/gits/scripts-dotfiles/scripts/bookmarks", NULL }; +static const char *sharecmd[] = { "/usr/local/bin/st", "-c", "floating-term", "-g", "130x35", "-e", "/home/sufyaan/docs/sys/gits/scripts-dotfiles/scripts/shr", NULL }; +static const char *bmcmd[] = { "bash", "/home/sufyaan/docs/sys/gits/scripts-dotfiles/scripts/bookmarks", NULL }; static const char *lockcmd[] = { "slock", NULL }; static const char *screenshotcmd[] = { "flameshot", "gui", NULL }; diff --git a/dwm b/dwm index 9348e95fed91cb4364057a33ea147994496c8c0c..55b86fd88d354b6332cf6db5c5f57ed9f75e5036 100755 GIT binary patch delta 19112 zcmZ{M30zcF`~SVjD7e6o(13`53<55}s3@qDOpba{NX!kz1>C|dF^9B72LsI84Y#9d zxnXanw!QLVC9WuL*yd8MrC6pH(F8TM#peHg?xHyV&u@x(&UwDid7g8gbIx;?J6E~f zb8)%nvS^QE{>$5c(bOo!wf^WwT`D*7V_L-q zZCpXWg^)~4NNmu>xhj_9CWAf)g;@th9mVxHC`NEo4_hP0SeP<(K1z_%Oe) zCpFsch88kgm|CvR4e?>K8kCDW>uzro%AFv4Zio*%*`VBZHxzR&TrF4UhG5QxKdEQj zId^+mD7P#e_S_I3w!A^P?QUoxJD`=Tb3=SseS>mw=iTjvw>7b}wy@`h_^`okpVV`^ z8(PQ~YUS$O5Fb|Bpj_MqcY9Y*&KLoEZV37>B9>W>oS#{gsoRKG{+4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B2<-TRFXOoPM}!qv44fK2Vd7(D2u3=S_1^ zzibuO7Z|(7#gq@O{)ZxFXu4xG?%(8h%l!BcS`5>;vo$VWwFg)K(<9262@*LPcQh@! zWlqp1TT#>9q;d6Kj^5or*6@Q`?+VxCztHfDRCCL0z)AS}tsV)Vu28wU%l~RZ;V-GU zR`=Xh4R7vL@d29A-!yzErTvP(6`;*TI9@BCCYU=|MHf&Zxc4;O*EDXF#$83FznT+% z$x&e&8jyXCX_ni+tmc(-8Iq$ktx>ruZdVC6{;{v{+h%8l#_g|hr)gY$Q>QoW3=P*e zs<$=yg&M9edp~P9`yPpvNMBQ5)NoP5wKbP^-}X!3+y?CyO-5g*mD3&cKhf~xS|9#g z8x8DIn&*OWPV>8ifqGSSrEfnED%>{Q9 zT93`Dm33MxM`*ad{ph86@2TPX_C((_+7MN>}zBwJI$>`@Xy~d_! zxPA`P@#(rv%}%5i!#oWS(+)Q}zC^d9;s!2~lJ7?FMYQs66y87Gc^7}sLmLR}n9Dw& zC@Ll{hc1JwFU?*mlRKnwQ_1f)bCAA3>)h`(ZZ_F}8yX~NmW`V3UmAA=ZT&3@o39#J z2-9TrfIC8%#}!W<@xPm~tOxx*ls{IS_WMEuzlv(^4dq)>(EXu&Tyfg{qn`Yp;?DnE z;`u$~{pdE|vG~tNO?kfVYn}%w+3n5qqrlscY~XM6-F7E<@S*}{B9=6iTcUDcqZ z4O`9pQNG89If3}=PH{yl8nhI>KS@Wi}Bco@F2dApRiXIdQ5lE3E~ekPo0Ay tU7~gVJsZ-3`GG*UGE%$YG9%d=!bA9h%?#|92l#a0>DO~@P%Rwye*nTg+(ZBX diff --git a/dwm.c b/dwm.c index 7dc7700..5fdb8b5 100644 --- a/dwm.c +++ b/dwm.c @@ -502,9 +502,15 @@ buttonpress(XEvent *e) } if (ev->window == selmon->barwin) { i = x = 0; - do + unsigned int occ = 0; + for(c = m->clients; c; c=c->next) + occ |= c->tags; + do { + /* Do not reserve space for vacant tags */ + if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) + continue; x += TEXTW(tags[i]); - while (ev->x >= x && ++i < LENGTH(tags)); + } while (ev->x >= x && ++i < LENGTH(tags)); if (i < LENGTH(tags)) { click = ClkTagBar; arg.ui = 1 << i; @@ -794,13 +800,12 @@ drawbar(Monitor *m) } x = 0; for (i = 0; i < LENGTH(tags); i++) { + /* Do not draw vacant tags */ + if(!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) + continue; w = TEXTW(tags[i]); drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); - if (occ & 1 << i) - drw_rect(drw, x + boxs, boxs, boxw, boxw, - m == selmon && selmon->sel && selmon->sel->tags & 1 << i, - urg & 1 << i); x += w; } w = TEXTW(m->ltsymbol); @@ -1143,6 +1148,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) diff --git a/dwm.c.orig b/dwm.c.orig index 176b67f..62281c6 100644 --- a/dwm.c.orig +++ b/dwm.c.orig @@ -40,6 +40,12 @@ #include #endif /* XINERAMA */ #include +#include +#include +#ifdef __OpenBSD__ +#include +#include +#endif /* __OpenBSD */ #include "drw.h" #include "util.h" @@ -92,9 +98,11 @@ struct Client { int basew, baseh, incw, inch, maxw, maxh, minw, minh, hintsvalid; int bw, oldbw; unsigned int tags; - int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen; + int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen, isterminal, noswallow; + pid_t pid; Client *next; Client *snext; + Client *swallowing; Monitor *mon; Window win; }; @@ -139,6 +147,8 @@ typedef struct { const char *title; unsigned int tags; int isfloating; + int isterminal; + int noswallow; int monitor; } Rule; @@ -236,6 +246,12 @@ static int xerrordummy(Display *dpy, XErrorEvent *ee); static int xerrorstart(Display *dpy, XErrorEvent *ee); static void zoom(const Arg *arg); +static pid_t getparentprocess(pid_t p); +static int isdescprocess(pid_t p, pid_t c); +static Client *swallowingclient(Window w); +static Client *termforwin(const Client *c); +static pid_t winpid(Window w); + /* variables */ static const char broken[] = "broken"; static char stext[256]; @@ -270,6 +286,8 @@ static Drw *drw; static Monitor *mons, *selmon; static Window root, wmcheckwin; +static xcb_connection_t *xcon; + /* configuration, allows nested code to access above variables */ #include "config.h" @@ -299,6 +317,8 @@ applyrules(Client *c) && (!r->class || strstr(class, r->class)) && (!r->instance || strstr(instance, r->instance))) { + c->isterminal = r->isterminal; + c->noswallow = r->noswallow; c->isfloating = r->isfloating; c->tags |= r->tags; for (m = mons; m && m->num != r->monitor; m = m->next); @@ -417,6 +437,53 @@ attachstack(Client *c) c->mon->stack = c; } +void +swallow(Client *p, Client *c) +{ + + if (c->noswallow || c->isterminal) + return; + if (c->noswallow && !swallowfloating && c->isfloating) + return; + + detach(c); + detachstack(c); + + setclientstate(c, WithdrawnState); + XUnmapWindow(dpy, p->win); + + p->swallowing = c; + c->mon = p->mon; + + Window w = p->win; + p->win = c->win; + c->win = w; + updatetitle(p); + XMoveResizeWindow(dpy, p->win, p->x, p->y, p->w, p->h); + arrange(p->mon); + configure(p); + updateclientlist(); +} + +void +unswallow(Client *c) +{ + c->win = c->swallowing->win; + + free(c->swallowing); + c->swallowing = NULL; + + /* unfullscreen the client */ + setfullscreen(c, 0); + updatetitle(c); + arrange(c->mon); + XMapWindow(dpy, c->win); + XMoveResizeWindow(dpy, c->win, c->x, c->y, c->w, c->h); + setclientstate(c, NormalState); + focus(NULL); + arrange(c->mon); +} + void buttonpress(XEvent *e) { @@ -435,9 +502,15 @@ buttonpress(XEvent *e) } if (ev->window == selmon->barwin) { i = x = 0; - do + unsigned int occ = 0; + for(c = m->clients; c; c=c->next) + occ |= c->tags; + do { + /* Do not reserve space for vacant tags */ + if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) + continue; x += TEXTW(tags[i]); - while (ev->x >= x && ++i < LENGTH(tags)); + } while (ev->x >= x && ++i < LENGTH(tags)); if (i < LENGTH(tags)) { click = ClkTagBar; arg.ui = 1 << i; @@ -658,6 +731,9 @@ destroynotify(XEvent *e) if ((c = wintoclient(ev->window))) unmanage(c, 1); + + else if ((c = swallowingclient(ev->window))) + unmanage(c->swallowing, 1); } void @@ -724,13 +800,12 @@ drawbar(Monitor *m) } x = 0; for (i = 0; i < LENGTH(tags); i++) { + /* Do not draw vacant tags */ + if(!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) + continue; w = TEXTW(tags[i]); drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); - if (occ & 1 << i) - drw_rect(drw, x + boxs, boxs, boxw, boxw, - m == selmon && selmon->sel && selmon->sel->tags & 1 << i, - urg & 1 << i); x += w; } w = TEXTW(m->ltsymbol); @@ -1034,12 +1109,13 @@ killclient(const Arg *arg) void manage(Window w, XWindowAttributes *wa) { - Client *c, *t = NULL; + Client *c, *t = NULL, *term = NULL; Window trans = None; XWindowChanges wc; c = ecalloc(1, sizeof(Client)); c->win = w; + c->pid = winpid(w); /* geometry */ c->x = c->oldx = wa->x; c->y = c->oldy = wa->y; @@ -1054,6 +1130,7 @@ manage(Window w, XWindowAttributes *wa) } else { c->mon = selmon; applyrules(c); + term = termforwin(c); } if (c->x + WIDTH(c) > c->mon->wx + c->mon->ww) @@ -1088,6 +1165,8 @@ manage(Window w, XWindowAttributes *wa) c->mon->sel = c; arrange(c->mon); XMapWindow(dpy, c->win); + if (term) + swallow(term, c); focus(NULL); } @@ -1800,6 +1879,20 @@ unmanage(Client *c, int destroyed) Monitor *m = c->mon; XWindowChanges wc; + if (c->swallowing) { + unswallow(c); + return; + } + + Client *s = swallowingclient(c->win); + if (s) { + free(s->swallowing); + s->swallowing = NULL; + arrange(m); + focus(NULL); + return; + } + detach(c); detachstack(c); if (!destroyed) { @@ -1815,9 +1908,12 @@ unmanage(Client *c, int destroyed) XUngrabServer(dpy); } free(c); - focus(NULL); - updateclientlist(); - arrange(m); + + if (!s) { + arrange(m); + focus(NULL); + updateclientlist(); + } } void @@ -2081,6 +2177,136 @@ view(const Arg *arg) arrange(selmon); } +pid_t +winpid(Window w) +{ + + pid_t result = 0; + +#ifdef __linux__ + xcb_res_client_id_spec_t spec = {0}; + spec.client = w; + spec.mask = XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID; + + xcb_generic_error_t *e = NULL; + xcb_res_query_client_ids_cookie_t c = xcb_res_query_client_ids(xcon, 1, &spec); + xcb_res_query_client_ids_reply_t *r = xcb_res_query_client_ids_reply(xcon, c, &e); + + if (!r) + return (pid_t)0; + + xcb_res_client_id_value_iterator_t i = xcb_res_query_client_ids_ids_iterator(r); + for (; i.rem; xcb_res_client_id_value_next(&i)) { + spec = i.data->spec; + if (spec.mask & XCB_RES_CLIENT_ID_MASK_LOCAL_CLIENT_PID) { + uint32_t *t = xcb_res_client_id_value_value(i.data); + result = *t; + break; + } + } + + free(r); + + if (result == (pid_t)-1) + result = 0; + +#endif /* __linux__ */ + +#ifdef __OpenBSD__ + Atom type; + int format; + unsigned long len, bytes; + unsigned char *prop; + pid_t ret; + + if (XGetWindowProperty(dpy, w, XInternAtom(dpy, "_NET_WM_PID", 0), 0, 1, False, AnyPropertyType, &type, &format, &len, &bytes, &prop) != Success || !prop) + return 0; + + ret = *(pid_t*)prop; + XFree(prop); + result = ret; + +#endif /* __OpenBSD__ */ + return result; +} + +pid_t +getparentprocess(pid_t p) +{ + unsigned int v = 0; + +#ifdef __linux__ + FILE *f; + char buf[256]; + snprintf(buf, sizeof(buf) - 1, "/proc/%u/stat", (unsigned)p); + + if (!(f = fopen(buf, "r"))) + return 0; + + fscanf(f, "%*u %*s %*c %u", &v); + fclose(f); +#endif /* __linux__*/ + +#ifdef __OpenBSD__ + int n; + kvm_t *kd; + struct kinfo_proc *kp; + + kd = kvm_openfiles(NULL, NULL, NULL, KVM_NO_FILES, NULL); + if (!kd) + return 0; + + kp = kvm_getprocs(kd, KERN_PROC_PID, p, sizeof(*kp), &n); + v = kp->p_ppid; +#endif /* __OpenBSD__ */ + + return (pid_t)v; +} + +int +isdescprocess(pid_t p, pid_t c) +{ + while (p != c && c != 0) + c = getparentprocess(c); + + return (int)c; +} + +Client * +termforwin(const Client *w) +{ + Client *c; + Monitor *m; + + if (!w->pid || w->isterminal) + return NULL; + + for (m = mons; m; m = m->next) { + for (c = m->clients; c; c = c->next) { + if (c->isterminal && !c->swallowing && c->pid && isdescprocess(c->pid, w->pid)) + return c; + } + } + + return NULL; +} + +Client * +swallowingclient(Window w) +{ + Client *c; + Monitor *m; + + for (m = mons; m; m = m->next) { + for (c = m->clients; c; c = c->next) { + if (c->swallowing && c->swallowing->win == w) + return c; + } + } + + return NULL; +} + Client * wintoclient(Window w) { @@ -2170,10 +2396,12 @@ main(int argc, char *argv[]) fputs("warning: no locale support\n", stderr); if (!(dpy = XOpenDisplay(NULL))) die("dwm: cannot open display"); + if (!(xcon = XGetXCBConnection(dpy))) + die("dwm: cannot get xcb connection\n"); checkotherwm(); setup(); #ifdef __OpenBSD__ - if (pledge("stdio rpath proc exec", NULL) == -1) + if (pledge("stdio rpath proc exec ps", NULL) == -1) die("pledge"); #endif /* __OpenBSD__ */ scan(); diff --git a/dwm.o b/dwm.o index 79a391225b51b0912356d1cea17a53b98b07c180..53285f0327aa26d75939fadb379d77af17796b71 100644 GIT binary patch delta 17704 zcmZ`=3tSb&+uk{#f+BKKTsAczF!2gUF(EZQdcZ@XLTPzTP*XDf2MK9ff~nQ%Xi2Z8 zmL-(^v&@1}GqnOm^IBlq%^R2(NG&i^`nvGF@9vCF^L@)@$%9K}k7pe0vEBri_p6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6uix = 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) diff --git a/patch/dwm-hide_vacant_tags-6.3.diff b/patch/dwm-hide_vacant_tags-6.3.diff new file mode 100644 index 0000000..0ccc7fc --- /dev/null +++ b/patch/dwm-hide_vacant_tags-6.3.diff @@ -0,0 +1,39 @@ +diff --git a/dwm.c b/dwm.c +index a96f33c..f2da729 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -432,9 +432,15 @@ buttonpress(XEvent *e) + } + if (ev->window == selmon->barwin) { + i = x = 0; +- do ++ unsigned int occ = 0; ++ for(c = m->clients; c; c=c->next) ++ occ |= c->tags; ++ do { ++ /* Do not reserve space for vacant tags */ ++ if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) ++ continue; + x += TEXTW(tags[i]); +- while (ev->x >= x && ++i < LENGTH(tags)); ++ } while (ev->x >= x && ++i < LENGTH(tags)); + if (i < LENGTH(tags)) { + click = ClkTagBar; + arg.ui = 1 << i; +@@ -719,13 +725,12 @@ drawbar(Monitor *m) + } + x = 0; + for (i = 0; i < LENGTH(tags); i++) { ++ /* Do not draw vacant tags */ ++ if(!(occ & 1 << i || m->tagset[m->seltags] & 1 << i)) ++ continue; + w = TEXTW(tags[i]); + drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]); + drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); +- if (occ & 1 << i) +- drw_rect(drw, x + boxs, boxs, boxw, boxw, +- m == selmon && selmon->sel && selmon->sel->tags & 1 << i, +- urg & 1 << i); + x += w; + } + w = blw = TEXTW(m->ltsymbol);