add option to deactivate swallowing (Meta,Ctrl,s)
This commit is contained in:
parent
4db8295a04
commit
7740fa46cb
1
CHANGES
1
CHANGES
|
@ -9,6 +9,7 @@ This version of dwm differs from the original on suckless.org as follows:
|
||||||
- applied modified zoomswap patch
|
- applied modified zoomswap patch
|
||||||
(added config option zoomswap = 1 for active, = 0 for old behaviour)
|
(added config option zoomswap = 1 for active, = 0 for old behaviour)
|
||||||
- applied swallow patch
|
- applied swallow patch
|
||||||
|
- added option to dynamically deactivate swallowing
|
||||||
- applied modified centered master patch
|
- applied modified centered master patch
|
||||||
(bound to Mod+c, no centered floating, changed stacking behaviour to always push onto left side)
|
(bound to Mod+c, no centered floating, changed stacking behaviour to always push onto left side)
|
||||||
|
|
||||||
|
|
|
@ -94,6 +94,7 @@ static Key keys[] = {
|
||||||
{ MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
|
{ MODKEY, XK_c, setlayout, {.v = &layouts[3]} },
|
||||||
{ MODKEY, XK_space, setlayout, {0} },
|
{ MODKEY, XK_space, setlayout, {0} },
|
||||||
{ MODKEY|ControlMask, XK_space, togglefloating, {0} },
|
{ MODKEY|ControlMask, XK_space, togglefloating, {0} },
|
||||||
|
{ MODKEY|ControlMask, XK_s, toggleswallowing, {0} },
|
||||||
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
{ MODKEY, XK_0, view, {.ui = ~0 } },
|
||||||
{ MODKEY|ControlMask, XK_0, tag, {.ui = ~0 } },
|
{ MODKEY|ControlMask, XK_0, tag, {.ui = ~0 } },
|
||||||
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
{ MODKEY, XK_comma, focusmon, {.i = -1 } },
|
||||||
|
|
11
dwm.c
11
dwm.c
|
@ -255,6 +255,7 @@ static void tagmon(const Arg *arg);
|
||||||
static void tile(Monitor *);
|
static void tile(Monitor *);
|
||||||
static void togglebar(const Arg *arg);
|
static void togglebar(const Arg *arg);
|
||||||
static void togglefloating(const Arg *arg);
|
static void togglefloating(const Arg *arg);
|
||||||
|
static void toggleswallowing(const Arg *arg);
|
||||||
static void toggletag(const Arg *arg);
|
static void toggletag(const Arg *arg);
|
||||||
static void toggleview(const Arg *arg);
|
static void toggleview(const Arg *arg);
|
||||||
static void unfocus(Client *c, int setfocus);
|
static void unfocus(Client *c, int setfocus);
|
||||||
|
@ -289,6 +290,7 @@ static Client *termforwin(const Client *c);
|
||||||
static pid_t winpid(Window w);
|
static pid_t winpid(Window w);
|
||||||
|
|
||||||
/* variables */
|
/* variables */
|
||||||
|
static int swallowing = 1;
|
||||||
static Systray *systray = NULL;
|
static Systray *systray = NULL;
|
||||||
static Client *prevzoom = NULL;
|
static Client *prevzoom = NULL;
|
||||||
static const char broken[] = "broken";
|
static const char broken[] = "broken";
|
||||||
|
@ -477,7 +479,8 @@ attachstack(Client *c)
|
||||||
void
|
void
|
||||||
swallow(Client *p, Client *c)
|
swallow(Client *p, Client *c)
|
||||||
{
|
{
|
||||||
|
if (!swallowing)
|
||||||
|
return;
|
||||||
if (c->noswallow || c->isterminal)
|
if (c->noswallow || c->isterminal)
|
||||||
return;
|
return;
|
||||||
if (c->noswallow && !swallowfloating && c->isfloating)
|
if (c->noswallow && !swallowfloating && c->isfloating)
|
||||||
|
@ -2076,6 +2079,12 @@ togglefloating(const Arg *arg)
|
||||||
arrange(selmon);
|
arrange(selmon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
toggleswallowing(const Arg *arg)
|
||||||
|
{
|
||||||
|
swallowing = !swallowing;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
toggletag(const Arg *arg)
|
toggletag(const Arg *arg)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user