From 7ae301d665ff2059ccff7884e42b1771defa8abe Mon Sep 17 00:00:00 2001 From: golfyado Date: Tue, 14 Jun 2022 19:46:58 -0400 Subject: commit --- #config.def.h# | 134 ---------------- README.MD | 7 - README.md | 48 ------ dwm-anybar-20210926-a786211.diff | 335 --------------------------------------- index.html | 26 --- 5 files changed, 550 deletions(-) delete mode 100644 #config.def.h# delete mode 100644 README.MD delete mode 100644 README.md delete mode 100644 dwm-anybar-20210926-a786211.diff delete mode 100644 index.html diff --git a/#config.def.h# b/#config.def.h# deleted file mode 100644 index 189f3d3..0000000 --- a/#config.def.h# +++ /dev/null @@ -1,134 +0,0 @@ -/* See LICENSE file for copyright and license details. */ -#include - -/* appearance */ -static const unsigned int borderpx = 1; /* border pixel of windows */ -static const unsigned int snap = 16; /* snap pixel */ -static const int showbar = 1; /* 0 means no bar */ -static const int topbar = 0; /* 0 means bottom bar */ -static const unsigned int gappx = 2; /* gaps between windows */ -static const char *fonts[] = { "Terminus:size=8" }; -static const char dmenufont[] = "Terminus:size=8"; -/*static const char *upvol[] = { "/home/zen/Documents/Scripts/u", NULL }; -static const char *downvol[] = { "/home/zen/Documents/Scripts/d", NULL }; -static const char *mutevol[] = { "/home/zen/Documents/Scripts/m", NULL };*/ -static const char col_gray1[] = "#000000"; -static const char col_gray2[] = "#d9b597"; -static const char col_gray3[] = "#ffcc99"; -static const char col_gray4[] = "#000000"; -static const char col_cyan[] = "#dd8232"; -static const char *colors[][3] = { - /* fg bg border */ - [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, - [SchemeSel] = { col_gray4, col_cyan, col_cyan }, -}; - -/* tagging */ -static const char *tags[] = { "!", "@", "#", "$" }; - -static const Rule rules[] = { - { NULL, NULL, NULL, 0, False, -1 }, -}; - -/* layout(s) */ -static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */ -static const int nmaster = 1; /* number of clients in master area */ -static const int resizehints = 1; /* 1 means respect size hints in tiled resizals */ -static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */ - -static const Layout layouts[] = { - /* symbol arrange function */ - { "[]=", tile }, /* first entry is default */ - { "><>", NULL }, /* no layout function means floating behavior */ - { "[M]", monocle }, -}; - -/* key definitions */ -#define MODKEY Mod4Mask -#define TAGKEYS(KEY,TAG) \ - { MODKEY, KEY, view, {.ui = 1 << TAG} }, \ - { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \ - { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \ - { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \ - { MODKEY, XK_minus, setgaps, {.i = -1 } }, \ - { MODKEY, XK_equal, setgaps, {.i = +1 } }, \ - { MODKEY|ShiftMask, XK_equal, setgaps, {.i = 2 } }, - -/* helper for spawning shell commands in the pre dwm-5.0 fashion */ -#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } } - -/* commands */ - static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */ -static const char *dmenucmd[] = { "dmenu_run", "-b", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL }; -static const char *termcmd[] = { "urxvt", NULL }; -static const char *scrotcmd[] = { "scrot", "/home/aldebaran/Pictures/screenshots/%Y-%m-%d_$wx$h.png" }; -static const char *latamcmd[] = { "setxkbmap", "-layout", "latam" }; -static const char *greengocmd[] = { "setxkbmap", "-layout", "us" }; - -/* from: https://wiki.gentoo.org/wiki/Dwm */ -/*static const char *upvol[] = { "amixer", "set", "Master", "2+" }; - static const char *downvol[] = { "amixer", "set", "Master", "2-" };*/ -/* For pulseaudio compatible */ -static const char *upvol[] = { "amixer", "-q", "sset", "Master", "5%+", NULL }; -static const char *downvol[] = { "amixer", "-q", "sset", "Master", "5%-", NULL }; - -static Key keys[] = { - /* modifier key function argument */ - { MODKEY, XK_p, spawn, {.v = dmenucmd } }, - { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } }, - { MODKEY, XK_s, spawn, {.v = scrotcmd } }, - { MODKEY|ShiftMask, XK_h, spawn, {.v = greengocmd } }, - { MODKEY|ShiftMask, XK_a, spawn, {.v = latamcmd } }, - { MODKEY|ShiftMask, XK_j, spawn, {.v = downvol } }, - { MODKEY|ShiftMask, XK_k, spawn, {.v = upvol } }, - { MODKEY, XK_b, togglebar, {0} }, - { MODKEY, XK_j, focusstack, {.i = +1 } }, - { MODKEY, XK_k, focusstack, {.i = -1 } }, - { MODKEY, XK_h, setmfact, {.f = -0.05} }, - { MODKEY, XK_l, setmfact, {.f = +0.05} }, - { MODKEY, XK_Return, zoom, {0} }, - { MODKEY, XK_Tab, view, {0} }, - { MODKEY, XK_c, killclient, {0} }, - { MODKEY, XK_t, setlayout, {.v = &layouts[0]} }, - { MODKEY, XK_f, setlayout, {.v = &layouts[1]} }, - { MODKEY, XK_m, setlayout, {.v = &layouts[2]} }, - { MODKEY, XK_space, setlayout, {0} }, - { MODKEY|ShiftMask, XK_space, togglefloating, {0} }, - { MODKEY, XK_0, view, {.ui = ~0 } }, - { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } }, - { MODKEY, XK_comma, focusmon, {.i = -1 } }, - { MODKEY, XK_period, focusmon, {.i = +1 } }, - { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } }, - { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } }, - TAGKEYS( XK_1, 0) - TAGKEYS( XK_2, 1) - TAGKEYS( XK_3, 2) - TAGKEYS( XK_4, 3) - TAGKEYS( XK_5, 4) - TAGKEYS( XK_6, 5) - TAGKEYS( XK_7, 6) - TAGKEYS( XK_8, 7) - TAGKEYS( XK_9, 8) - { MODKEY|ShiftMask, XK_q, quit, {0} }, - /* { 0, XF86XK_AudioLowerVolume, spawn, {.v = downvol } }, - { 0, XF86XK_AudioMute, spawn, {.v = mutevol } }, - { 0, XF86XK_AudioRaiseVolume, spawn, {.v = upvol } },*/ -}; - -/* button definitions */ -/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */ -static Button buttons[] = { - /* click event mask button function argument */ - { ClkLtSymbol, 0, Button1, setlayout, {0} }, - { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} }, - { ClkWinTitle, 0, Button2, zoom, {0} }, - { ClkStatusText, 0, Button2, spawn, {.v = termcmd } }, - { ClkClientWin, MODKEY, Button1, movemouse, {0} }, - { ClkClientWin, MODKEY, Button2, togglefloating, {0} }, - { ClkClientWin, MODKEY, Button3, resizemouse, {0} }, - { ClkTagBar, 0, Button1, view, {0} }, - { ClkTagBar, 0, Button3, toggleview, {0} }, - { ClkTagBar, MODKEY, Button1, tag, {0} }, - { ClkTagBar, MODKEY, Button3, toggletag, {0} }, -}; - diff --git a/README.MD b/README.MD deleted file mode 100644 index d7dfecf..0000000 --- a/README.MD +++ /dev/null @@ -1,7 +0,0 @@ -# My dwm setup bro -this is awsme - -this is my first seriously git repository :DD - -~gol-fee-a-doh - diff --git a/README.md b/README.md deleted file mode 100644 index 95d4fd0..0000000 --- a/README.md +++ /dev/null @@ -1,48 +0,0 @@ -dwm - dynamic window manager -============================ -dwm is an extremely fast, small, and dynamic window manager for X. - - -Requirements ------------- -In order to build dwm you need the Xlib header files. - - -Installation ------------- -Edit config.mk to match your local setup (dwm is installed into -the /usr/local namespace by default). - -Afterwards enter the following command to build and install dwm (if -necessary as root): - - make clean install - - -Running dwm ------------ -Add the following line to your .xinitrc to start dwm using startx: - - exec dwm - -In order to connect dwm to a specific display, make sure that -the DISPLAY environment variable is set correctly, e.g.: - - DISPLAY=foo.bar:1 exec dwm - -(This will start dwm on display :1 of the host foo.bar.) - -In order to display status info in the bar, you can do something -like this in your .xinitrc: - - while xsetroot -name "`date` `uptime | sed 's/.*,//'`" - do - sleep 1 - done & - exec dwm - - -Configuration -------------- -The configuration of dwm is done by creating a custom config.h -and (re)compiling the source code. diff --git a/dwm-anybar-20210926-a786211.diff b/dwm-anybar-20210926-a786211.diff deleted file mode 100644 index 3dcf629..0000000 --- a/dwm-anybar-20210926-a786211.diff +++ /dev/null @@ -1,335 +0,0 @@ -From c80bbb393b741bfa428fdbebc0027e6ff2c4b69d Mon Sep 17 00:00:00 2001 -From: mihirlad55 -Date: Sun, 26 Sep 2021 00:36:41 +0000 -Subject: [PATCH] Add support for managing external status bars - -This patch allows dwm to manage other status bars such as -polybar/lemonbar without them needing to set override-redirect. For -all intents and purposes, DWM treats this bar as if it were its own -and as a result helps the status bar and DWM live in harmony. - -This has a few advantages -* The bar does not block fullscreen windows -* DWM makes room for the status bar, so windows do not overlap the bar -* The bar can be hidden/killed and DWM will not keep an unsightly gap - where the bar was -* DWM receives EnterNotify events when your cursor enters the bar - -To use another status bar, set usealtbar to 1 in your config.h and set -altbarclass to the class name (can be found using xprop) to the class -name of your status bar. Also make sure that if your status bar will -be displayed on top, topbar is set to 1 in your config, and if it will -be displayed on bottom, topbar is set to 0. This patch does not -support bars that are not docked at the top or at the bottom of your -monitor. - -The patch is developed at https://github.com/mihirlad55/dwm-anybar ---- - config.def.h | 3 ++ - dwm.c | 114 ++++++++++++++++++++++++++++++++++++++++++++------- - 2 files changed, 103 insertions(+), 14 deletions(-) - -diff --git a/config.def.h b/config.def.h -index a2ac963..04ba79c 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -5,6 +5,9 @@ static const unsigned int borderpx = 1; /* 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 */ -+static const int usealtbar = 1; /* 1 means use non-dwm status bar */ -+static const char *altbarclass = "Polybar"; /* Alternate bar class name */ -+static const char *altbarcmd = "$HOME/bar.sh"; /* Alternate bar launch command */ - static const char *fonts[] = { "monospace:size=10" }; - static const char dmenufont[] = "monospace:size=10"; - static const char col_gray1[] = "#222222"; -diff --git a/dwm.c b/dwm.c -index 5e4d494..5b83358 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -47,8 +47,8 @@ - /* macros */ - #define BUTTONMASK (ButtonPressMask|ButtonReleaseMask) - #define CLEANMASK(mask) (mask & ~(numlockmask|LockMask) & (ShiftMask|ControlMask|Mod1Mask|Mod2Mask|Mod3Mask|Mod4Mask|Mod5Mask)) --#define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->wx+(m)->ww) - MAX((x),(m)->wx)) \ -- * MAX(0, MIN((y)+(h),(m)->wy+(m)->wh) - MAX((y),(m)->wy))) -+#define INTERSECT(x,y,w,h,m) (MAX(0, MIN((x)+(w),(m)->mx+(m)->mw) - MAX((x),(m)->mx)) \ -+ * MAX(0, MIN((y)+(h),(m)->my+(m)->mh) - MAX((y),(m)->my))) - #define ISVISIBLE(C) ((C->tags & C->mon->tagset[C->mon->seltags])) - #define LENGTH(X) (sizeof X / sizeof X[0]) - #define MOUSEMASK (BUTTONMASK|PointerMotionMask) -@@ -116,7 +116,7 @@ struct Monitor { - float mfact; - int nmaster; - int num; -- int by; /* bar geometry */ -+ int by, bh; /* bar geometry */ - int mx, my, mw, mh; /* screen size */ - int wx, wy, ww, wh; /* window area */ - unsigned int seltags; -@@ -179,6 +179,7 @@ static void incnmaster(const Arg *arg); - static void keypress(XEvent *e); - static void killclient(const Arg *arg); - static void manage(Window w, XWindowAttributes *wa); -+static void managealtbar(Window win, XWindowAttributes *wa); - static void mappingnotify(XEvent *e); - static void maprequest(XEvent *e); - static void monocle(Monitor *m); -@@ -207,6 +208,7 @@ static void seturgent(Client *c, int urg); - static void showhide(Client *c); - static void sigchld(int unused); - static void spawn(const Arg *arg); -+static void spawnbar(); - static void tag(const Arg *arg); - static void tagmon(const Arg *arg); - static void tile(Monitor *); -@@ -216,6 +218,7 @@ static void toggletag(const Arg *arg); - static void toggleview(const Arg *arg); - static void unfocus(Client *c, int setfocus); - static void unmanage(Client *c, int destroyed); -+static void unmanagealtbar(Window w); - static void unmapnotify(XEvent *e); - static void updatebarpos(Monitor *m); - static void updatebars(void); -@@ -230,6 +233,7 @@ static void updatewmhints(Client *c); - static void view(const Arg *arg); - static Client *wintoclient(Window w); - static Monitor *wintomon(Window w); -+static int wmclasscontains(Window win, const char *class, const char *name); - static int xerror(Display *dpy, XErrorEvent *ee); - static int xerrordummy(Display *dpy, XErrorEvent *ee); - static int xerrorstart(Display *dpy, XErrorEvent *ee); -@@ -505,8 +509,10 @@ cleanupmon(Monitor *mon) - for (m = mons; m && m->next != mon; m = m->next); - m->next = mon->next; - } -- XUnmapWindow(dpy, mon->barwin); -- XDestroyWindow(dpy, mon->barwin); -+ if (!usealtbar) { -+ XUnmapWindow(dpy, mon->barwin); -+ XDestroyWindow(dpy, mon->barwin); -+ } - free(mon); - } - -@@ -568,7 +574,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); -- XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, bh); -+ XMoveResizeWindow(dpy, m->barwin, m->wx, m->by, m->ww, m->bh); - } - focus(NULL); - arrange(NULL); -@@ -639,6 +645,7 @@ createmon(void) - m->nmaster = nmaster; - m->showbar = showbar; - m->topbar = topbar; -+ m->bh = bh; - m->lt[0] = &layouts[0]; - m->lt[1] = &layouts[1 % LENGTH(layouts)]; - strncpy(m->ltsymbol, layouts[0].symbol, sizeof m->ltsymbol); -@@ -649,10 +656,13 @@ void - destroynotify(XEvent *e) - { - Client *c; -+ Monitor *m; - XDestroyWindowEvent *ev = &e->xdestroywindow; - - if ((c = wintoclient(ev->window))) - unmanage(c, 1); -+ else if (usealtbar && (m = wintomon(ev->window)) && m->barwin == ev->window) -+ unmanagealtbar(ev->window); - } - - void -@@ -696,6 +706,9 @@ dirtomon(int dir) - void - drawbar(Monitor *m) - { -+ if (usealtbar) -+ return; -+ - int x, w, tw = 0; - int boxs = drw->fonts->h / 9; - int boxw = drw->fonts->h / 6 + 2; -@@ -1077,6 +1090,25 @@ manage(Window w, XWindowAttributes *wa) - focus(NULL); - } - -+void -+managealtbar(Window win, XWindowAttributes *wa) -+{ -+ Monitor *m; -+ if (!(m = recttomon(wa->x, wa->y, wa->width, wa->height))) -+ return; -+ -+ m->barwin = win; -+ m->by = wa->y; -+ bh = m->bh = wa->height; -+ updatebarpos(m); -+ arrange(m); -+ XSelectInput(dpy, win, EnterWindowMask|FocusChangeMask|PropertyChangeMask|StructureNotifyMask); -+ XMoveResizeWindow(dpy, win, wa->x, wa->y, wa->width, wa->height); -+ XMapWindow(dpy, win); -+ XChangeProperty(dpy, root, netatom[NetClientList], XA_WINDOW, 32, PropModeAppend, -+ (unsigned char *) &win, 1); -+} -+ - void - mappingnotify(XEvent *e) - { -@@ -1097,7 +1129,9 @@ maprequest(XEvent *e) - return; - if (wa.override_redirect) - return; -- if (!wintoclient(ev->window)) -+ if (usealtbar && wmclasscontains(ev->window, altbarclass, "")) -+ managealtbar(ev->window, &wa); -+ else if (!wintoclient(ev->window)) - manage(ev->window, &wa); - } - -@@ -1393,7 +1427,9 @@ scan(void) - if (!XGetWindowAttributes(dpy, wins[i], &wa) - || wa.override_redirect || XGetTransientForHint(dpy, wins[i], &d1)) - continue; -- if (wa.map_state == IsViewable || getstate(wins[i]) == IconicState) -+ if (usealtbar && wmclasscontains(wins[i], altbarclass, "")) -+ managealtbar(wins[i], &wa); -+ else if (wa.map_state == IsViewable || getstate(wins[i]) == IconicState) - manage(wins[i], &wa); - } - for (i = 0; i < num; i++) { /* now the transients */ -@@ -1546,7 +1582,7 @@ setup(void) - if (!drw_fontset_create(drw, fonts, LENGTH(fonts))) - die("no fonts could be loaded."); - lrpad = drw->fonts->h; -- bh = drw->fonts->h + 2; -+ bh = usealtbar ? 0 : drw->fonts->h + 2; - updategeom(); - /* init atoms */ - utf8string = XInternAtom(dpy, "UTF8_STRING", False); -@@ -1595,6 +1631,7 @@ setup(void) - XSelectInput(dpy, root, wa.event_mask); - grabkeys(); - focus(NULL); -+ spawnbar(); - } - - -@@ -1653,6 +1690,13 @@ spawn(const Arg *arg) - } - } - -+void -+spawnbar() -+{ -+ if (*altbarcmd) -+ system(altbarcmd); -+} -+ - void - tag(const Arg *arg) - { -@@ -1704,7 +1748,7 @@ togglebar(const Arg *arg) - { - selmon->showbar = !selmon->showbar; - updatebarpos(selmon); -- XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh); -+ XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, selmon->bh); - arrange(selmon); - } - -@@ -1787,10 +1831,26 @@ unmanage(Client *c, int destroyed) - arrange(m); - } - -+void -+unmanagealtbar(Window w) -+{ -+ Monitor *m = wintomon(w); -+ -+ if (!m) -+ return; -+ -+ m->barwin = 0; -+ m->by = 0; -+ m->bh = 0; -+ updatebarpos(m); -+ arrange(m); -+} -+ - void - unmapnotify(XEvent *e) - { - Client *c; -+ Monitor *m; - XUnmapEvent *ev = &e->xunmap; - - if ((c = wintoclient(ev->window))) { -@@ -1798,12 +1858,16 @@ unmapnotify(XEvent *e) - setclientstate(c, WithdrawnState); - else - unmanage(c, 0); -- } -+ } else if (usealtbar && (m = wintomon(ev->window)) && m->barwin == ev->window) -+ unmanagealtbar(ev->window); - } - - void - updatebars(void) - { -+ if (usealtbar) -+ return; -+ - Monitor *m; - XSetWindowAttributes wa = { - .override_redirect = True, -@@ -1829,11 +1893,11 @@ updatebarpos(Monitor *m) - m->wy = m->my; - m->wh = m->mh; - if (m->showbar) { -- m->wh -= bh; -+ m->wh -= m->bh; - m->by = m->topbar ? m->wy : m->wy + m->wh; -- m->wy = m->topbar ? m->wy + bh : m->wy; -+ m->wy = m->topbar ? m->wy + m->bh : m->wy; - } else -- m->by = -bh; -+ m->by = -m->bh; - } - - void -@@ -2077,6 +2141,28 @@ wintomon(Window w) - return selmon; - } - -+int -+wmclasscontains(Window win, const char *class, const char *name) -+{ -+ XClassHint ch = { NULL, NULL }; -+ int res = 1; -+ -+ if (XGetClassHint(dpy, win, &ch)) { -+ if (ch.res_name && strstr(ch.res_name, name) == NULL) -+ res = 0; -+ if (ch.res_class && strstr(ch.res_class, class) == NULL) -+ res = 0; -+ } else -+ res = 0; -+ -+ if (ch.res_class) -+ XFree(ch.res_class); -+ if (ch.res_name) -+ XFree(ch.res_name); -+ -+ return res; -+} -+ - /* There's no way to check accesses to destroyed windows, thus those cases are - * ignored (especially on UnmapNotify's). Other types of errors call Xlibs - * default error handler, which may call exit. */ --- -2.33.0 - diff --git a/index.html b/index.html deleted file mode 100644 index fe7f07f..0000000 --- a/index.html +++ /dev/null @@ -1,26 +0,0 @@ - -Index of /basurero/dwm/suckless/dwm2/dwm/ - -

Index of /basurero/dwm/suckless/dwm2/dwm/


../
-LICENSE                                            04-Mar-2022 16:30    1938
-Makefile                                           04-Mar-2022 16:30    1131
-README                                             04-Mar-2022 16:30    1093
-config.def.h                                       04-Mar-2022 16:30    6667
-config.h                                           06-May-2022 14:35    6773
-config.mk                                          04-Mar-2022 16:30     929
-drw.c                                              04-Mar-2022 16:30     10K
-drw.h                                              04-Mar-2022 16:30    1670
-drw.o                                              06-May-2022 14:20     11K
-dwm                                                06-May-2022 14:20     69K
-dwm-fullgaps-20200508-7b77734.diff                 04-Mar-2022 16:30    4662
-dwm-fullgaps-6.2.diff                              04-Mar-2022 16:30    3468
-dwm.1                                              04-Mar-2022 16:30    5217
-dwm.c                                              04-Mar-2022 16:30     52K
-dwm.o                                              06-May-2022 14:20     56K
-dwm.png                                            04-Mar-2022 16:30     373
-transient.c                                        04-Mar-2022 16:30     847
-util.c                                             04-Mar-2022 16:30     517
-util.h                                             04-Mar-2022 16:30     305
-util.o                                             06-May-2022 14:20    2392
-

- -- cgit v1.2.3