Compare commits
12 Commits
6bc899e6bc
...
master
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dc97dc5302 | ||
![]() |
f5eb5cac83 | ||
![]() |
bcbc2e6d1d | ||
![]() |
c370584484 | ||
![]() |
8fc8d8a907 | ||
![]() |
84975dfd62 | ||
![]() |
2033580cef | ||
![]() |
52d3834d10 | ||
![]() |
974e7f37bf | ||
![]() |
e21d1dedef | ||
![]() |
b640eb9d56 | ||
![]() |
00089b1bde |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
.ccls-cache
|
99
config.def.h
99
config.def.h
@ -7,17 +7,21 @@ static const unsigned int gappov = 10; /* vert outer gap between window
|
|||||||
static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
|
static int smartgaps = 0; /* 1 means no outer gap when there is only one window */
|
||||||
static const int showbar = 1; /* 0 means no bar */
|
static const int showbar = 1; /* 0 means no bar */
|
||||||
static const int topbar = 1; /* 0 means bottom bar */
|
static const int topbar = 1; /* 0 means bottom bar */
|
||||||
static const char *fonts[] = { "TerminessNerdFont:size=10" };
|
static const char *fonts[] = { "Terminus:size=10" };
|
||||||
static const char dmenufont[] = "TerminessNerdFont:size=10";
|
static const char dmenufont[] = "Terminus:size=10";
|
||||||
static const char col_gray1[] = "#010101";
|
|
||||||
static const char col_gray2[] = "#cc241d";
|
/* Farben aus Alacritty übernommen */
|
||||||
static const char col_gray3[] = "#ffffff";
|
static const char col_gray1[] = "#121212";
|
||||||
static const char col_gray4[] = "#eeeeee";
|
static const char col_gray2[] = "#ffffff";
|
||||||
static const char col_cyan[] = "#010101";
|
static const char col_gray3[] = "#dde1e6";
|
||||||
|
static const char col_gray4[] = "#ffffff";
|
||||||
|
static const char col_cyan[] = "#121212";
|
||||||
|
|
||||||
|
/* Farbschema für die Fenster und die Leiste */
|
||||||
static const char *colors[][3] = {
|
static const char *colors[][3] = {
|
||||||
/* fg bg border */
|
/* fg bg border */
|
||||||
[SchemeNorm] = { col_gray3, col_gray1, col_gray1 },
|
[SchemeNorm] = { col_gray3, col_gray1, col_gray1 }, /* Normale Fenster */
|
||||||
[SchemeSel] = { col_gray4, col_cyan, col_gray2 },
|
[SchemeSel] = { col_gray4, col_cyan, col_gray2 }, /* Ausgewähltes Fenster */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* tagging */
|
/* tagging */
|
||||||
@ -38,24 +42,25 @@ static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen win
|
|||||||
#include <X11/XF86keysym.h>
|
#include <X11/XF86keysym.h>
|
||||||
|
|
||||||
static const Layout layouts[] = {
|
static const Layout layouts[] = {
|
||||||
{ "|M|", centeredmaster },
|
{ "[\\]", dwindle },
|
||||||
{ "[]=", tile }, /* first entry is default */
|
{ NULL, centeredfloatingmaster },
|
||||||
{ "[M]", monocle },
|
{ "|M|", centeredmaster },
|
||||||
{ "[@]", spiral },
|
{ "[]=", tile }, /* first entry is default */
|
||||||
{ "[\\]", dwindle },
|
{ "[M]", monocle },
|
||||||
{ "H[]", deck },
|
{ "[@]", spiral },
|
||||||
{ "TTT", bstack },
|
{ "H[]", deck },
|
||||||
{ "===", bstackhoriz },
|
{ "TTT", bstack },
|
||||||
{ "HHH", grid },
|
{ "===", bstackhoriz },
|
||||||
{ "###", nrowgrid },
|
{ "HHH", grid },
|
||||||
{ "---", horizgrid },
|
{ "###", nrowgrid },
|
||||||
{ ":::", gaplessgrid },
|
{ "---", horizgrid },
|
||||||
{ "|M|", centeredmaster },
|
{ ":::", gaplessgrid },
|
||||||
{ "><>", NULL }, /* no layout function means floating behavior */
|
{ "><>", NULL }, /* no layout function means floating behavior */
|
||||||
{ NULL, NULL },
|
{ NULL, NULL },
|
||||||
};
|
};
|
||||||
|
|
||||||
#define MODKEY Mod4Mask
|
#define MODKEY Mod4Mask
|
||||||
|
|
||||||
#define TAGKEYS(KEY,TAG) \
|
#define TAGKEYS(KEY,TAG) \
|
||||||
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
|
||||||
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
|
||||||
@ -63,30 +68,26 @@ static const Layout layouts[] = {
|
|||||||
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
|
||||||
|
|
||||||
// arrow keymaps
|
// arrow keymaps
|
||||||
#define XK_Left 0xff51
|
|
||||||
#define XK_Right 0xff53
|
|
||||||
#define XK_Up 0xff56
|
|
||||||
#define XK_Down 0xff54
|
|
||||||
|
|
||||||
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
#define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
|
||||||
|
|
||||||
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
static char dmenumon[2] = "0"; /* component of dmenucmd, manipulated in spawn() */
|
||||||
static const char *termcmd[] = { "st", NULL };
|
static const char *termcmd[] = { "st", NULL };
|
||||||
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
static const char *dmenucmd[] = { "dmenu_run", "-m", dmenumon, "-fn", dmenufont, "-nb", col_gray1, "-nf", col_gray3, "-sb", col_cyan, "-sf", col_gray4, NULL };
|
||||||
static const char *upvol[] = { "/usr/bin/wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%+", NULL };
|
static const char *upvol[] = { "wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%+", NULL };
|
||||||
static const char *downvol[] = { "/usr/bin/wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%-", NULL };
|
static const char *downvol[] = { "wpctl", "set-volume", "@DEFAULT_AUDIO_SINK@", "5%-", NULL };
|
||||||
static const char *mutevol[] = { "/usr/bin/wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL };
|
static const char *mutevol[] = { "wpctl", "set-mute", "@DEFAULT_AUDIO_SINK@", "toggle", NULL };
|
||||||
|
|
||||||
static const Key keys[] = {
|
static const Key keys[] = {
|
||||||
/* modifier key function argument */
|
/* modifier key function argument */
|
||||||
{ MODKEY, XK_space, spawn, {.v = dmenucmd } },
|
{ MODKEY, XK_space, spawn, {.v = dmenucmd } },
|
||||||
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
{ MODKEY, XK_Return, spawn, {.v = termcmd } },
|
||||||
{ MODKEY, XK_b, togglebar, {0} },
|
{ MODKEY|ShiftMask, XK_m, quit, {0} },
|
||||||
{ MODKEY, XK_Right, focusstack, {.i = +1 } },
|
{ MODKEY, XK_Right, focusstack, {.i = +1 } },
|
||||||
{ MODKEY, XK_Left, focusstack, {.i = -1 } },
|
{ MODKEY, XK_Left, focusstack, {.i = -1 } },
|
||||||
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
{ MODKEY, XK_d, incnmaster, {.i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_Left, setmfact, {.f = -0.05} },
|
{ MODKEY, XK_r, rotatestack, {.i = -1 } },
|
||||||
|
{ MODKEY|ShiftMask, XK_Left, setmfact, {.f = -0.05} },
|
||||||
{ MODKEY|ShiftMask, XK_Right, setmfact, {.f = +0.05} },
|
{ MODKEY|ShiftMask, XK_Right, setmfact, {.f = +0.05} },
|
||||||
{ MODKEY, XK_Tab, view, {0} },
|
{ MODKEY, XK_Tab, view, {0} },
|
||||||
{ MODKEY, XK_q, killclient, {0} },
|
{ MODKEY, XK_q, killclient, {0} },
|
||||||
@ -97,7 +98,31 @@ static const Key keys[] = {
|
|||||||
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
{ MODKEY, XK_period, focusmon, {.i = +1 } },
|
||||||
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
{ MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
|
||||||
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
{ MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
|
||||||
TAGKEYS( XK_1, 0)
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
|
|
||||||
|
// Vanity Gaps shit //
|
||||||
|
{ MODKEY|ShiftMask, XK_h, setcfact, {.f = +0.25} },
|
||||||
|
{ MODKEY|ShiftMask, XK_l, setcfact, {.f = -0.25} },
|
||||||
|
{ MODKEY|ShiftMask, XK_o, setcfact, {.f = 0.00} },
|
||||||
|
{ MODKEY|Mod1Mask, XK_u, incrgaps, {.i = +3 } },
|
||||||
|
{ MODKEY|Mod1Mask|ShiftMask, XK_u, incrgaps, {.i = -3 } },
|
||||||
|
{ MODKEY|Mod1Mask, XK_i, incrigaps, {.i = +1 } },
|
||||||
|
{ MODKEY|Mod1Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } },
|
||||||
|
{ MODKEY|Mod1Mask, XK_o, incrogaps, {.i = +1 } },
|
||||||
|
{ MODKEY|Mod1Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } },
|
||||||
|
{ MODKEY|Mod1Mask, XK_6, incrihgaps, {.i = +1 } },
|
||||||
|
{ MODKEY|Mod1Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } },
|
||||||
|
{ MODKEY|Mod1Mask, XK_7, incrivgaps, {.i = +5 } },
|
||||||
|
{ MODKEY|Mod1Mask|ShiftMask, XK_7, incrivgaps, {.i = -5 } },
|
||||||
|
{ MODKEY|Mod1Mask, XK_8, incrohgaps, {.i = +1 } },
|
||||||
|
{ MODKEY|Mod1Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } },
|
||||||
|
{ MODKEY|Mod1Mask, XK_9, incrovgaps, {.i = +1 } },
|
||||||
|
{ MODKEY|Mod1Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } },
|
||||||
|
{ MODKEY|Mod1Mask, XK_0, togglegaps, {0} },
|
||||||
|
{ MODKEY|Mod1Mask|ShiftMask, XK_0, defaultgaps, {0} },
|
||||||
|
|
||||||
|
// WS
|
||||||
|
TAGKEYS( XK_1, 0)
|
||||||
TAGKEYS( XK_2, 1)
|
TAGKEYS( XK_2, 1)
|
||||||
TAGKEYS( XK_3, 2)
|
TAGKEYS( XK_3, 2)
|
||||||
TAGKEYS( XK_4, 3)
|
TAGKEYS( XK_4, 3)
|
||||||
|
@ -4,7 +4,7 @@ VERSION = 6.5
|
|||||||
# Customize below to fit your system
|
# Customize below to fit your system
|
||||||
|
|
||||||
# paths
|
# paths
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr
|
||||||
MANPREFIX = ${PREFIX}/share/man
|
MANPREFIX = ${PREFIX}/share/man
|
||||||
|
|
||||||
X11INC = ${PREFIX}/include
|
X11INC = ${PREFIX}/include
|
||||||
|
55
dwm.c
55
dwm.c
@ -199,6 +199,7 @@ static void resize(Client *c, int x, int y, int w, int h, int interact);
|
|||||||
static void resizeclient(Client *c, int x, int y, int w, int h);
|
static void resizeclient(Client *c, int x, int y, int w, int h);
|
||||||
static void resizemouse(const Arg *arg);
|
static void resizemouse(const Arg *arg);
|
||||||
static void restack(Monitor *m);
|
static void restack(Monitor *m);
|
||||||
|
static void rotatestack(const Arg *arg);
|
||||||
static void run(void);
|
static void run(void);
|
||||||
static void scan(void);
|
static void scan(void);
|
||||||
static int sendevent(Client *c, Atom proto);
|
static int sendevent(Client *c, Atom proto);
|
||||||
@ -873,6 +874,28 @@ drawbars(void)
|
|||||||
drawbar(m);
|
drawbar(m);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
enqueue(Client *c)
|
||||||
|
{
|
||||||
|
Client *l;
|
||||||
|
for (l = c->mon->clients; l && l->next; l = l->next);
|
||||||
|
if (l) {
|
||||||
|
l->next = c;
|
||||||
|
c->next = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
enqueuestack(Client *c)
|
||||||
|
{
|
||||||
|
Client *l;
|
||||||
|
for (l = c->mon->stack; l && l->snext; l = l->snext);
|
||||||
|
if (l) {
|
||||||
|
l->snext = c;
|
||||||
|
c->snext = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
enternotify(XEvent *e)
|
enternotify(XEvent *e)
|
||||||
{
|
{
|
||||||
@ -1496,6 +1519,38 @@ restack(Monitor *m)
|
|||||||
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
|
while (XCheckMaskEvent(dpy, EnterWindowMask, &ev));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
rotatestack(const Arg *arg)
|
||||||
|
{
|
||||||
|
Client *c = NULL, *f;
|
||||||
|
|
||||||
|
if (!selmon->sel)
|
||||||
|
return;
|
||||||
|
f = selmon->sel;
|
||||||
|
if (arg->i > 0) {
|
||||||
|
for (c = nexttiled(selmon->clients); c && nexttiled(c->next); c = nexttiled(c->next));
|
||||||
|
if (c){
|
||||||
|
detach(c);
|
||||||
|
attach(c);
|
||||||
|
detachstack(c);
|
||||||
|
attachstack(c);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if ((c = nexttiled(selmon->clients))){
|
||||||
|
detach(c);
|
||||||
|
enqueue(c);
|
||||||
|
detachstack(c);
|
||||||
|
enqueuestack(c);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c){
|
||||||
|
arrange(selmon);
|
||||||
|
//unfocus(f, 1);
|
||||||
|
focus(f);
|
||||||
|
restack(selmon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
run(void)
|
run(void)
|
||||||
{
|
{
|
||||||
|
2273
dwm.c.orig
Normal file
2273
dwm.c.orig
Normal file
File diff suppressed because it is too large
Load Diff
11
dwm.c.rej
Normal file
11
dwm.c.rej
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- dwm.c
|
||||||
|
+++ dwm.c
|
||||||
|
@@ -165,6 +165,8 @@ static void detachstack(Client *c);
|
||||||
|
static Monitor *dirtomon(int dir);
|
||||||
|
static void drawbar(Monitor *m);
|
||||||
|
static void drawbars(void);
|
||||||
|
+static void enqueue(Client *c);
|
||||||
|
+static void enqueuestack(Client *c);
|
||||||
|
static void enternotify(XEvent *e);
|
||||||
|
static void expose(XEvent *e);
|
||||||
|
static void focus(Client *c);
|
102
patches/dwm-rotatestack-20161021-ab9571b.diff
Normal file
102
patches/dwm-rotatestack-20161021-ab9571b.diff
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
diff --git a/config.def.h b/config.def.h
|
||||||
|
index fd77a07..09737d7 100644
|
||||||
|
--- a/config.def.h
|
||||||
|
+++ b/config.def.h
|
||||||
|
@@ -64,6 +64,8 @@ static Key keys[] = {
|
||||||
|
{ MODKEY, XK_p, spawn, {.v = dmenucmd } },
|
||||||
|
{ MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
|
||||||
|
{ MODKEY, XK_b, togglebar, {0} },
|
||||||
|
+ { MODKEY|ShiftMask, XK_j, rotatestack, {.i = +1 } },
|
||||||
|
+ { MODKEY|ShiftMask, XK_k, rotatestack, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_j, focusstack, {.i = +1 } },
|
||||||
|
{ MODKEY, XK_k, focusstack, {.i = -1 } },
|
||||||
|
{ MODKEY, XK_i, incnmaster, {.i = +1 } },
|
||||||
|
diff --git a/dwm.c b/dwm.c
|
||||||
|
index 421bf27..1ec8b10 100644
|
||||||
|
--- a/dwm.c
|
||||||
|
+++ b/dwm.c
|
||||||
|
@@ -165,6 +165,8 @@ static void detachstack(Client *c);
|
||||||
|
static Monitor *dirtomon(int dir);
|
||||||
|
static void drawbar(Monitor *m);
|
||||||
|
static void drawbars(void);
|
||||||
|
+static void enqueue(Client *c);
|
||||||
|
+static void enqueuestack(Client *c);
|
||||||
|
static void enternotify(XEvent *e);
|
||||||
|
static void expose(XEvent *e);
|
||||||
|
static void focus(Client *c);
|
||||||
|
@@ -194,6 +196,7 @@ static void resize(Client *c, int x, int y, int w, int h, int interact);
|
||||||
|
static void resizeclient(Client *c, int x, int y, int w, int h);
|
||||||
|
static void resizemouse(const Arg *arg);
|
||||||
|
static void restack(Monitor *m);
|
||||||
|
+static void rotatestack(const Arg *arg);
|
||||||
|
static void run(void);
|
||||||
|
static void scan(void);
|
||||||
|
static int sendevent(Client *c, Atom proto);
|
||||||
|
@@ -765,6 +768,28 @@ drawbars(void)
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
+enqueue(Client *c)
|
||||||
|
+{
|
||||||
|
+ Client *l;
|
||||||
|
+ for (l = c->mon->clients; l && l->next; l = l->next);
|
||||||
|
+ if (l) {
|
||||||
|
+ l->next = c;
|
||||||
|
+ c->next = NULL;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
+enqueuestack(Client *c)
|
||||||
|
+{
|
||||||
|
+ Client *l;
|
||||||
|
+ for (l = c->mon->stack; l && l->snext; l = l->snext);
|
||||||
|
+ if (l) {
|
||||||
|
+ l->snext = c;
|
||||||
|
+ c->snext = NULL;
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
enternotify(XEvent *e)
|
||||||
|
{
|
||||||
|
Client *c;
|
||||||
|
@@ -1390,6 +1415,38 @@ restack(Monitor *m)
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
+rotatestack(const Arg *arg)
|
||||||
|
+{
|
||||||
|
+ Client *c = NULL, *f;
|
||||||
|
+
|
||||||
|
+ if (!selmon->sel)
|
||||||
|
+ return;
|
||||||
|
+ f = selmon->sel;
|
||||||
|
+ if (arg->i > 0) {
|
||||||
|
+ for (c = nexttiled(selmon->clients); c && nexttiled(c->next); c = nexttiled(c->next));
|
||||||
|
+ if (c){
|
||||||
|
+ detach(c);
|
||||||
|
+ attach(c);
|
||||||
|
+ detachstack(c);
|
||||||
|
+ attachstack(c);
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ if ((c = nexttiled(selmon->clients))){
|
||||||
|
+ detach(c);
|
||||||
|
+ enqueue(c);
|
||||||
|
+ detachstack(c);
|
||||||
|
+ enqueuestack(c);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ if (c){
|
||||||
|
+ arrange(selmon);
|
||||||
|
+ //unfocus(f, 1);
|
||||||
|
+ focus(f);
|
||||||
|
+ restack(selmon);
|
||||||
|
+ }
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+void
|
||||||
|
run(void)
|
||||||
|
{
|
||||||
|
XEvent ev;
|
@ -819,4 +819,5 @@ tile(Monitor *m)
|
|||||||
resize(c, sx, sy, sw - (2*c->bw), sh * (c->cfact / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0);
|
resize(c, sx, sy, sw - (2*c->bw), sh * (c->cfact / sfacts) + ((i - m->nmaster) < srest ? 1 : 0) - (2*c->bw), 0);
|
||||||
sy += HEIGHT(c) + ih;
|
sy += HEIGHT(c) + ih;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user