diff options
author | Joe <rbo@gmx.us> | 2024-12-19 15:06:27 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-12-19 15:06:27 +0100 |
commit | 03765f41f101502e9825047419fa9d8667e710ea (patch) | |
tree | cef6445d9c3df3081aed9f8cd28555ecfd88e401 /applied/dwm-systray-20230922-9f88553.diff | |
parent | conflict (diff) | |
download | dwm-03765f41f101502e9825047419fa9d8667e710ea.tar.gz dwm-03765f41f101502e9825047419fa9d8667e710ea.tar.bz2 dwm-03765f41f101502e9825047419fa9d8667e710ea.tar.xz dwm-03765f41f101502e9825047419fa9d8667e710ea.tar.zst dwm-03765f41f101502e9825047419fa9d8667e710ea.zip |
6.5
Diffstat (limited to '')
-rw-r--r-- | applied/dwm-systray-20230922-9f88553.diff (renamed from applied/dwm-systray-6.4.diff) | 79 |
1 files changed, 34 insertions, 45 deletions
diff --git a/applied/dwm-systray-6.4.diff b/applied/dwm-systray-20230922-9f88553.diff index 58e4a69..9356ec1 100644 --- a/applied/dwm-systray-6.4.diff +++ b/applied/dwm-systray-20230922-9f88553.diff @@ -1,5 +1,5 @@ diff --git a/config.def.h b/config.def.h -index 9efa774..750529d 100644 +index 9efa774..fed4fb9 100644 --- a/config.def.h +++ b/config.def.h @@ -3,6 +3,11 @@ @@ -14,19 +14,8 @@ index 9efa774..750529d 100644 static const int showbar = 1; /* 0 means no bar */ static const int topbar = 1; /* 0 means bottom bar */ static const char *fonts[] = { "monospace:size=10" }; -@@ -101,8 +106,8 @@ static const Key keys[] = { - /* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ - static const Button buttons[] = { - /* click event mask button function argument */ -- { ClkLtSymbol, 0, Button1, setlayout, {0} }, -- { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, -+ { ClkTagBar, MODKEY, Button1, tag, {0} }, -+ { ClkTagBar, MODKEY, Button3, toggletag, {0} }, - { ClkWinTitle, 0, Button2, zoom, {0} }, - { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, - { ClkClientWin, MODKEY, Button1, movemouse, {0} }, diff --git a/dwm.c b/dwm.c -index 03baf42..4611a03 100644 +index f1d86b2..f9e7e4a 100644 --- a/dwm.c +++ b/dwm.c @@ -57,12 +57,27 @@ @@ -96,15 +85,15 @@ index 03baf42..4611a03 100644 static void sendmon(Client *c, Monitor *m); static void setclientstate(Client *c, long state); static void setfocus(Client *c); -@@ -207,6 +232,7 @@ static void seturgent(Client *c, int urg); +@@ -206,6 +231,7 @@ static void setup(void); + static void seturgent(Client *c, int urg); static void showhide(Client *c); - static void sigchld(int unused); static void spawn(const Arg *arg); +static Monitor *systraytomon(Monitor *m); static void tag(const Arg *arg); static void tagmon(const Arg *arg); static void tile(Monitor *m); -@@ -224,18 +250,23 @@ static int updategeom(void); +@@ -223,18 +249,23 @@ static int updategeom(void); static void updatenumlockmask(void); static void updatesizehints(Client *c); static void updatestatus(void); @@ -128,7 +117,7 @@ index 03baf42..4611a03 100644 static const char broken[] = "broken"; static char stext[256]; static int screen; -@@ -258,9 +289,10 @@ static void (*handler[LASTEvent]) (XEvent *) = { +@@ -257,9 +288,10 @@ static void (*handler[LASTEvent]) (XEvent *) = { [MapRequest] = maprequest, [MotionNotify] = motionnotify, [PropertyNotify] = propertynotify, @@ -140,7 +129,7 @@ index 03baf42..4611a03 100644 static int running = 1; static Cur *cursor[CurLast]; static Clr **scheme; -@@ -442,7 +474,7 @@ buttonpress(XEvent *e) +@@ -441,7 +473,7 @@ buttonpress(XEvent *e) arg.ui = 1 << i; } else if (ev->x < x + TEXTW(selmon->ltsymbol)) click = ClkLtSymbol; @@ -149,7 +138,7 @@ index 03baf42..4611a03 100644 click = ClkStatusText; else click = ClkWinTitle; -@@ -485,6 +517,13 @@ cleanup(void) +@@ -484,6 +516,13 @@ cleanup(void) XUngrabKey(dpy, AnyKey, AnyModifier, root); while (mons) cleanupmon(mons); @@ -163,7 +152,7 @@ index 03baf42..4611a03 100644 for (i = 0; i < CurLast; i++) drw_cur_free(drw, cursor[i]); for (i = 0; i < LENGTH(colors); i++) -@@ -516,9 +555,58 @@ cleanupmon(Monitor *mon) +@@ -515,9 +554,58 @@ cleanupmon(Monitor *mon) void clientmessage(XEvent *e) { @@ -222,7 +211,7 @@ index 03baf42..4611a03 100644 if (!c) return; if (cme->message_type == netatom[NetWMState]) { -@@ -571,7 +659,7 @@ configurenotify(XEvent *e) +@@ -570,7 +658,7 @@ configurenotify(XEvent *e) for (c = m->clients; c; c = c->next) if (c->isfullscreen) resizeclient(c, m->mx, m->my, m->mw, m->mh); @@ -231,7 +220,7 @@ index 03baf42..4611a03 100644 } focus(NULL); arrange(NULL); -@@ -656,6 +744,11 @@ destroynotify(XEvent *e) +@@ -655,6 +743,11 @@ destroynotify(XEvent *e) if ((c = wintoclient(ev->window))) unmanage(c, 1); @@ -243,7 +232,7 @@ index 03baf42..4611a03 100644 } void -@@ -699,7 +792,7 @@ dirtomon(int dir) +@@ -698,7 +791,7 @@ dirtomon(int dir) void drawbar(Monitor *m) { @@ -252,7 +241,7 @@ index 03baf42..4611a03 100644 int boxs = drw->fonts->h / 9; int boxw = drw->fonts->h / 6 + 2; unsigned int i, occ = 0, urg = 0; -@@ -708,13 +801,17 @@ drawbar(Monitor *m) +@@ -707,13 +800,17 @@ drawbar(Monitor *m) if (!m->showbar) return; @@ -272,7 +261,7 @@ index 03baf42..4611a03 100644 for (c = m->clients; c; c = c->next) { occ |= c->tags; if (c->isurgent) -@@ -735,7 +832,7 @@ drawbar(Monitor *m) +@@ -734,7 +831,7 @@ drawbar(Monitor *m) drw_setscheme(drw, scheme[SchemeNorm]); x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); @@ -281,7 +270,7 @@ index 03baf42..4611a03 100644 if (m->sel) { drw_setscheme(drw, scheme[m == selmon ? SchemeSel : SchemeNorm]); drw_text(drw, x, 0, w, bh, lrpad / 2, m->sel->name, 0); -@@ -746,7 +843,7 @@ drawbar(Monitor *m) +@@ -745,7 +842,7 @@ drawbar(Monitor *m) drw_rect(drw, x, 0, w, bh, 1, 1); } } @@ -290,7 +279,7 @@ index 03baf42..4611a03 100644 } void -@@ -783,8 +880,11 @@ expose(XEvent *e) +@@ -782,8 +879,11 @@ expose(XEvent *e) Monitor *m; XExposeEvent *ev = &e->xexpose; @@ -303,7 +292,7 @@ index 03baf42..4611a03 100644 } void -@@ -870,14 +970,32 @@ getatomprop(Client *c, Atom prop) +@@ -869,14 +969,32 @@ getatomprop(Client *c, Atom prop) unsigned char *p = NULL; Atom da, atom = None; @@ -337,7 +326,7 @@ index 03baf42..4611a03 100644 int getrootptr(int *x, int *y) { -@@ -1018,7 +1136,8 @@ killclient(const Arg *arg) +@@ -1017,7 +1135,8 @@ killclient(const Arg *arg) { if (!selmon->sel) return; @@ -347,7 +336,7 @@ index 03baf42..4611a03 100644 XGrabServer(dpy); XSetErrorHandler(xerrordummy); XSetCloseDownMode(dpy, DestroyAll); -@@ -1105,6 +1224,13 @@ maprequest(XEvent *e) +@@ -1104,6 +1223,13 @@ maprequest(XEvent *e) static XWindowAttributes wa; XMapRequestEvent *ev = &e->xmaprequest; @@ -361,7 +350,7 @@ index 03baf42..4611a03 100644 if (!XGetWindowAttributes(dpy, ev->window, &wa) || wa.override_redirect) return; if (!wintoclient(ev->window)) -@@ -1226,6 +1352,17 @@ propertynotify(XEvent *e) +@@ -1225,6 +1351,17 @@ propertynotify(XEvent *e) Window trans; XPropertyEvent *ev = &e->xproperty; @@ -379,7 +368,7 @@ index 03baf42..4611a03 100644 if ((ev->window == root) && (ev->atom == XA_WM_NAME)) updatestatus(); else if (ev->state == PropertyDelete) -@@ -1276,6 +1413,19 @@ recttomon(int x, int y, int w, int h) +@@ -1275,6 +1412,19 @@ recttomon(int x, int y, int w, int h) return r; } @@ -399,7 +388,7 @@ index 03baf42..4611a03 100644 void resize(Client *c, int x, int y, int w, int h, int interact) { -@@ -1283,6 +1433,14 @@ resize(Client *c, int x, int y, int w, int h, int interact) +@@ -1282,6 +1432,14 @@ resize(Client *c, int x, int y, int w, int h, int interact) resizeclient(c, x, y, w, h); } @@ -414,7 +403,7 @@ index 03baf42..4611a03 100644 void resizeclient(Client *c, int x, int y, int w, int h) { -@@ -1298,6 +1456,19 @@ resizeclient(Client *c, int x, int y, int w, int h) +@@ -1297,6 +1455,19 @@ resizeclient(Client *c, int x, int y, int w, int h) XSync(dpy, False); } @@ -434,7 +423,7 @@ index 03baf42..4611a03 100644 void resizemouse(const Arg *arg) { -@@ -1444,26 +1615,37 @@ setclientstate(Client *c, long state) +@@ -1443,26 +1614,37 @@ setclientstate(Client *c, long state) } int @@ -483,7 +472,7 @@ index 03baf42..4611a03 100644 } return exists; } -@@ -1477,7 +1659,7 @@ setfocus(Client *c) +@@ -1476,7 +1658,7 @@ setfocus(Client *c) XA_WINDOW, 32, PropModeReplace, (unsigned char *) &(c->win), 1); } @@ -492,7 +481,7 @@ index 03baf42..4611a03 100644 } void -@@ -1566,6 +1748,10 @@ setup(void) +@@ -1572,6 +1754,10 @@ setup(void) wmatom[WMTakeFocus] = XInternAtom(dpy, "WM_TAKE_FOCUS", False); netatom[NetActiveWindow] = XInternAtom(dpy, "_NET_ACTIVE_WINDOW", False); netatom[NetSupported] = XInternAtom(dpy, "_NET_SUPPORTED", False); @@ -503,7 +492,7 @@ index 03baf42..4611a03 100644 netatom[NetWMName] = XInternAtom(dpy, "_NET_WM_NAME", False); netatom[NetWMState] = XInternAtom(dpy, "_NET_WM_STATE", False); netatom[NetWMCheck] = XInternAtom(dpy, "_NET_SUPPORTING_WM_CHECK", False); -@@ -1573,6 +1759,9 @@ setup(void) +@@ -1579,6 +1765,9 @@ setup(void) netatom[NetWMWindowType] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE", False); netatom[NetWMWindowTypeDialog] = XInternAtom(dpy, "_NET_WM_WINDOW_TYPE_DIALOG", False); netatom[NetClientList] = XInternAtom(dpy, "_NET_CLIENT_LIST", False); @@ -513,7 +502,7 @@ index 03baf42..4611a03 100644 /* init cursors */ cursor[CurNormal] = drw_cur_create(drw, XC_left_ptr); cursor[CurResize] = drw_cur_create(drw, XC_sizing); -@@ -1581,6 +1770,8 @@ setup(void) +@@ -1587,6 +1776,8 @@ setup(void) scheme = ecalloc(LENGTH(colors), sizeof(Clr *)); for (i = 0; i < LENGTH(colors); i++) scheme[i] = drw_scm_create(drw, colors[i], 3); @@ -522,7 +511,7 @@ index 03baf42..4611a03 100644 /* init bars */ updatebars(); updatestatus(); -@@ -1711,7 +1902,18 @@ togglebar(const Arg *arg) +@@ -1717,7 +1908,18 @@ togglebar(const Arg *arg) { selmon->showbar = !selmon->showbar; updatebarpos(selmon); @@ -542,7 +531,7 @@ index 03baf42..4611a03 100644 arrange(selmon); } -@@ -1807,11 +2009,18 @@ unmapnotify(XEvent *e) +@@ -1813,11 +2015,18 @@ unmapnotify(XEvent *e) else unmanage(c, 0); } @@ -561,7 +550,7 @@ index 03baf42..4611a03 100644 Monitor *m; XSetWindowAttributes wa = { .override_redirect = True, -@@ -1822,10 +2031,15 @@ updatebars(void) +@@ -1828,10 +2037,15 @@ updatebars(void) for (m = mons; m; m = m->next) { if (m->barwin) continue; @@ -578,7 +567,7 @@ index 03baf42..4611a03 100644 XMapRaised(dpy, m->barwin); XSetClassHint(dpy, m->barwin, &ch); } -@@ -2002,6 +2216,125 @@ updatestatus(void) +@@ -2008,6 +2222,125 @@ updatestatus(void) if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext))) strcpy(stext, "dwm-"VERSION); drawbar(selmon); @@ -704,7 +693,7 @@ index 03baf42..4611a03 100644 } void -@@ -2069,6 +2402,16 @@ wintoclient(Window w) +@@ -2075,6 +2408,16 @@ wintoclient(Window w) return NULL; } @@ -721,7 +710,7 @@ index 03baf42..4611a03 100644 Monitor * wintomon(Window w) { -@@ -2122,6 +2465,22 @@ xerrorstart(Display *dpy, XErrorEvent *ee) +@@ -2128,6 +2471,22 @@ xerrorstart(Display *dpy, XErrorEvent *ee) return -1; } |