commit d8246f3e02e7a799df12fe3fa7aea84534264892
parent d2100ff970fd0bc7fc06e8cbe0b1145a41a384f5
Author: kocotian <kocotian@kocotian.pl>
Date: Sat, 2 Jan 2021 18:00:06 +0100
rules tweaks, attachments additions
Diffstat:
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/config.def.h b/config.def.h
@@ -47,9 +47,9 @@ static const Rule rules[] = {
*/
/* class instance title tags mask isfloating isterminal noswallow monitor */
{ "st", NULL, NULL, 0 << 0, 0, 1, 0, -1 },
- { "Gimp", NULL, NULL, 0, 1, 0, 0, -1 },
+ { "St", NULL, NULL, 0 << 0, 0, 1, 0, -1 },
+ { "Gimp", NULL, NULL, 1 << 8, 0, 0, 0, -1 },
{ "discord", NULL, NULL, 1 << 7, 0, 1, 0, -1 },
- { "qutebrowser", NULL, NULL, 1 << 1, 0, 0, 0, -1 },
{ "st-256color", NULL, NULL, 0 << 0, 0, 1, 0, -1 },
{ "Pulseeffects", NULL, NULL, 1 << 8, 0, 0, 0, 1 },
{ "TelegramDesktop", NULL, NULL, 1 << 6, 0, 0, 0, -1 },
@@ -70,20 +70,13 @@ static const Layout layouts[] = {
{ "|M|", centeredmaster },
{ ">M>", centeredfloatingmaster },
{ "><>", NULL }, /* no layout function means floating behavior */
- /* { "tile", tile }, /1* first entry is default *1/ */
- /* { "bstack", bstack }, */
- /* { "bstackh", bstackhoriz }, */
- /* { "monocle", monocle }, */
- /* { "cent", centeredmaster }, */
- /* { "centfloat", centeredfloatingmaster }, */
- /* { "float", NULL }, /1* no layout function means floating behavior *1/ */
};
static const Direction directions[] = {
/* symbol arrange function */
- { "-<-", attach }, /* first entry is default */
+ { "replace", attach }, /* first entry is default */
+ { "aside", attachaside },
{ "-^-", attachabove },
- { "->-", attachaside },
{ "-v-", attachbelow },
{ "vvv", attachbottom },
{ "^^^", attachtop },
@@ -188,6 +181,7 @@ static Key keys[] = {
{ MODKEY, XK_z, setlayout, {0} },
{ MODKEY|ShiftMask, XK_z, resetlayout, {0} },
{ MODKEY, XK_x, setattach, {0} },
+ { MODKEY|ShiftMask, XK_x, setattach, {.i = -1} },
{ MODKEY, XK_b, togglebar, {0} },
{ MODKEY|ShiftMask, XK_b, spawn, SHCMD("setbg") },
{ MODKEY, XK_n, spawn, SHCMD("st -e newsboat; pkill -RTMIN+6 dwmblocks") },
diff --git a/dwm.c b/dwm.c
@@ -1839,9 +1839,11 @@ resetlayout(const Arg *arg)
{
Arg default_layout = {.v = &layouts[0]};
Arg default_mfact = {.f = mfact + 1};
+ Arg default_attachment = {.i = -1};
setlayout(&default_layout);
setmfact(&default_mfact);
+ setattach(&default_attachment);
}
void
@@ -2151,7 +2153,9 @@ setfullscreen(Client *c, int fullscreen)
void
setattach(const Arg *arg)
{
- if (selmon->attachdirection < 5)
+ if (arg->i == -1)
+ selmon->attachdirection = 0;
+ else if (selmon->attachdirection < 5)
selmon->attachdirection++;
else selmon->attachdirection = 0;
if (selmon->sel)