summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig Jennings <craigmartinjennings@gmail.com>2023-07-18 15:39:17 -0500
committerCraig Jennings <craigmartinjennings@gmail.com>2023-07-18 15:39:17 -0500
commit7478a94c2519947e1c4dc0012bf071fc8b85b869 (patch)
treed2a7a342d87918891ccc3ae045ca0d34eb32d685
parent3603afcee0ffaca143a14904b6966f7d7b993014 (diff)
pulsemixer to mixertui; float alarm-clock-applet
-rw-r--r--config.def.h33
-rw-r--r--dwm-cemter-6.2.diff90
2 files changed, 107 insertions, 16 deletions
diff --git a/config.def.h b/config.def.h
index fd37efd..81fc9ff 100644
--- a/config.def.h
+++ b/config.def.h
@@ -56,7 +56,7 @@ const char *spcmd6[] = {"kitty", "--class", "spmon", "-o", "initial_window_wid
St and terminals which take a -g flag should take this format:
*/
-const char *spcmd1[] = {"st", "-n", "spaudio", "-g", "120x35", "-e", "pulsemixer", NULL };
+const char *spcmd1[] = {"st", "-n", "spaudio", "-g", "120x35", "-e", "mixertui", NULL };
const char *spcmd2[] = {"st", "-n", "spnet", "-g", "80x40", "-e", "nmtui", NULL };
const char *spcmd3[] = {"st", "-n", "spmp", "-g", "120x35", "-e", "ncmpcpp", NULL };
const char *spcmd4[] = {"st", "-n", "spbt", "-g", "120x35", "-e", "tremc", NULL };
@@ -96,21 +96,22 @@ static const Rule rules[] = {
* WM_NAME(STRING) = title
*/
- /* class instance title tags mask isfloating isterminal noswallow monitor */
- { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
- { "gnome-calculator", NULL, NULL, 0, 1, 0, 0, -1 },
- { "Firefox", NULL, NULL, 0, 0, 0, -1, -1 },
- { "st", NULL, NULL, 0, 0, 1, 0, -1 },
- { "kitty", NULL, NULL, 0, 0, 1, 0, -1 },
- { "XTerm", NULL, NULL, 0, 0, 1, 0, -1 },
- { NULL, "spaudio", NULL, SPTAG(0), 1, 0, 0, -1 },
- { NULL, "spnet", NULL, SPTAG(1), 1, 0, 0, -1 },
- { NULL, "spmp", NULL, SPTAG(2), 1, 0, 0, -1 },
- { NULL, "spbt", NULL, SPTAG(3), 1, 0, 0, -1 },
- { NULL, "spterm", NULL, SPTAG(4), 1, 1, 0, -1 },
- { NULL, "spfm", NULL, SPTAG(5), 1, 0, 0, -1 },
- { NULL, "spmon", NULL, SPTAG(6), 1, 0, 0, -1 },
- { NULL, NULL, "Event Tester", 0, 1, 0, 1, -1 }, /* xev */
+ /* class instance title tags mask isfloating isterminal noswallow monitor */
+ { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
+ { "gnome-calculator", NULL, NULL, 0, 1, 0, 0, -1 },
+ { "Alarm-clock-applet", NULL, NULL, 0, 1, 0, 0, -1 },
+ { "Firefox", NULL, NULL, 0, 0, 0, -1, -1 },
+ { "st", NULL, NULL, 0, 0, 1, 0, -1 },
+ { "kitty", NULL, NULL, 0, 0, 1, 0, -1 },
+ { "XTerm", NULL, NULL, 0, 0, 1, 0, -1 },
+ { NULL, "spaudio", NULL, SPTAG(0), 1, 0, 0, -1 },
+ { NULL, "spnet", NULL, SPTAG(1), 1, 0, 0, -1 },
+ { NULL, "spmp", NULL, SPTAG(2), 1, 0, 0, -1 },
+ { NULL, "spbt", NULL, SPTAG(3), 1, 0, 0, -1 },
+ { NULL, "spterm", NULL, SPTAG(4), 1, 1, 0, -1 },
+ { NULL, "spfm", NULL, SPTAG(5), 1, 0, 0, -1 },
+ { NULL, "spmon", NULL, SPTAG(6), 1, 0, 0, -1 },
+ { NULL, NULL, "Event Tester", 0, 1, 0, 1, -1 }, /* xev */
};
/* layout(s) */
diff --git a/dwm-cemter-6.2.diff b/dwm-cemter-6.2.diff
new file mode 100644
index 0000000..0dfe156
--- /dev/null
+++ b/dwm-cemter-6.2.diff
@@ -0,0 +1,90 @@
+From 69f91089d9248fa9695eb925956e255a215171b8 Mon Sep 17 00:00:00 2001
+From: bakkeby <bakkeby@gmail.com>
+Date: Tue, 7 Apr 2020 12:29:08 +0200
+Subject: [PATCH] Adding 6.2 center patch with multi-monitor fix and
+ auto-centering of floating popup windows
+---
+ config.def.h | 6 +++---
+ dwm.c | 13 +++++++++++--
+ 2 files changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/config.def.h b/config.def.h
+index 1c0b587..44b46e5 100644
+--- a/config.def.h
++++ b/config.def.h
+@@ -26,9 +26,9 @@ static const Rule rules[] = {
+ * WM_CLASS(STRING) = instance, class
+ * WM_NAME(STRING) = title
+ */
+- /* class instance title tags mask isfloating monitor */
+- { "Gimp", NULL, NULL, 0, 1, -1 },
+- { "Firefox", NULL, NULL, 1 << 8, 0, -1 },
++ /* class instance title tags mask iscentered isfloating monitor */
++ { "Gimp", NULL, NULL, 0, 0, 1, -1 },
++ { "Firefox", NULL, NULL, 1 << 8, 0, 0, -1 },
+ };
+
+ /* layout(s) */
+diff --git a/dwm.c b/dwm.c
+index 4465af1..ab33757 100644
+--- a/dwm.c
++++ b/dwm.c
+@@ -92,7 +92,7 @@ struct Client {
+ int basew, baseh, incw, inch, maxw, maxh, minw, minh;
+ int bw, oldbw;
+ unsigned int tags;
+- int isfixed, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
++ int isfixed, iscentered, isfloating, isurgent, neverfocus, oldstate, isfullscreen;
+ Client *next;
+ Client *snext;
+ Monitor *mon;
+@@ -137,6 +137,7 @@ typedef struct {
+ const char *instance;
+ const char *title;
+ unsigned int tags;
++ int iscentered;
+ int isfloating;
+ int monitor;
+ } Rule;
+@@ -285,6 +286,7 @@ applyrules(Client *c)
+ XClassHint ch = { NULL, NULL };
+
+ /* rule matching */
++ c->iscentered = 0;
+ c->isfloating = 0;
+ c->tags = 0;
+ XGetClassHint(dpy, c->win, &ch);
+@@ -297,6 +299,7 @@ applyrules(Client *c)
+ && (!r->class || strstr(class, r->class))
+ && (!r->instance || strstr(instance, r->instance)))
+ {
++ c->iscentered = r->iscentered;
+ c->isfloating = r->isfloating;
+ c->tags |= r->tags;
+ for (m = mons; m && m->num != r->monitor; m = m->next);
+@@ -1056,6 +1059,10 @@ manage(Window w, XWindowAttributes *wa)
+ updatewindowtype(c);
+ updatesizehints(c);
+ updatewmhints(c);
++ if (c->iscentered) {
++ 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)
+@@ -2009,8 +2016,10 @@ updatewindowtype(Client *c)
+
+ if (state == netatom[NetWMFullscreen])
+ setfullscreen(c, 1);
+- if (wtype == netatom[NetWMWindowTypeDialog])
++ if (wtype == netatom[NetWMWindowTypeDialog]) {
++ c->iscentered = 1;
+ c->isfloating = 1;
++ }
+ }
+
+ void
+--
+2.17.1
+