Add swapmon patch, remove dwm, change font to monospace 8

This commit is contained in:
Jacob 2023-09-25 17:16:33 +02:00
parent a99b87eb30
commit 68df416f09
7 changed files with 68 additions and 2 deletions

1
.gitignore vendored
View file

@ -1 +1,2 @@
*.o
dwm

View file

@ -25,8 +25,7 @@ static const int lcaselbl = 0; /* 1 means make tag label lowerc
static int tagindicatortype = INDICATOR_TOP_LEFT_SQUARE;
static int tiledindicatortype = INDICATOR_NONE;
static int floatindicatortype = INDICATOR_TOP_LEFT_SQUARE;
static const char font[] = "monospace 10";
static const char dmenufont[] = "monospace:size=10";
static const char font[] = "monospace 8";
static char c000000[] = "#000000"; // placeholder value
@ -346,6 +345,8 @@ static const Key keys[] = {
{ MODKEY, XK_period, focusmon, {.i = +1 } },
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
{ MODKEY|Mod1Mask|ControlMask, XK_comma, tagswapmon, {.i = +1 } },
{ MODKEY|Mod1Mask|ControlMask, XK_period, tagswapmon, {.i = -1 } },
TAGKEYS( XK_1, 0)
TAGKEYS( XK_2, 1)
TAGKEYS( XK_3, 2)

BIN
dwm

Binary file not shown.

View file

@ -28,6 +28,7 @@
#include "vanitygaps.c"
#include "xrdb.c"
#include "dragmfact.c"
#include "swap.c"
/* Layouts */
#include "layout_facts.c"
#include "layout_flextile-deluxe.c"

View file

@ -28,6 +28,7 @@
#include "swallow.h"
#include "vanitygaps.h"
#include "xrdb.h"
#include "swap.h"
/* Layouts */
#include "layout_flextile-deluxe.h"
#include "layout_monocle.h"

61
libs/swap.c Normal file
View file

@ -0,0 +1,61 @@
void
tagswapmon(const Arg *arg)
{
Monitor *m;
Client *c, *sc = NULL, *mc = NULL, *next;
if (!mons->next)
return;
m = dirtomon(arg->i);
for (c = selmon->clients; c; c = next) {
next = c->next;
if (!ISVISIBLE(c))
continue;
unfocus(c, 1, NULL);
detach(c);
detachstack(c);
c->next = sc;
sc = c;
}
for (c = m->clients; c; c = next) {
next = c->next;
if (!ISVISIBLE(c))
continue;
unfocus(c, 1, NULL);
detach(c);
detachstack(c);
c->next = mc;
mc = c;
}
for (c = sc; c; c = next) {
next = c->next;
c->mon = m;
c->tags = m->tagset[m->seltags]; /* assign tags of target monitor */
attach(c);
attachstack(c);
if (c->isfullscreen) {
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
XRaiseWindow(dpy, c->win);
}
}
for (c = mc; c; c = next) {
next = c->next;
c->mon = selmon;
c->tags = selmon->tagset[selmon->seltags]; /* assign tags of target monitor */
attach(c);
attachstack(c);
if (c->isfullscreen) {
resizeclient(c, c->mon->mx, c->mon->my, c->mon->mw, c->mon->mh);
XRaiseWindow(dpy, c->win);
}
}
arrange(NULL);
focus(NULL);
}

1
libs/swap.h Normal file
View file

@ -0,0 +1 @@
static void tagswapmon(const Arg *arg);