mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
Expanding on dwmc options
This commit is contained in:
parent
4db0cd6443
commit
8c419b0d7a
127
config.def.h
127
config.def.h
@ -466,19 +466,144 @@ static Signal signals[] = {
|
||||
{ "incnmaster", incnmaster },
|
||||
{ "togglefloating", togglefloating },
|
||||
{ "focusmon", focusmon },
|
||||
#if STACKER_PATCH
|
||||
{ "pushstack", pushstack },
|
||||
#endif // STACKER_PATCH
|
||||
#if FOCUSURGENT_PATCH
|
||||
{ "focusurgent", focusurgent },
|
||||
#endif // FOCUSURGENT_PATCH
|
||||
#if FOCUSADJACENTTAG_PATCH
|
||||
{ "viewtoleft", viewtoleft },
|
||||
{ "viewtoright", viewtoright },
|
||||
{ "tagtoleft", tagtoleft },
|
||||
{ "tagtoright", tagtoright},
|
||||
{ "tagandviewtoleft", tagandviewtoleft },
|
||||
{ "tagandviewtoright", tagandviewtoright },
|
||||
#endif // FOCUSADJACENTTAG_PATCH
|
||||
#if SWAPFOCUS_PATCH && PERTAG_PATCH
|
||||
{ "swapfocus", swapfocus },
|
||||
#endif // SWAPFOCUS_PATCH
|
||||
#if SWITCHCOL_PATCH
|
||||
{ "switchcol", switchcol },
|
||||
#endif // SWITCHCOL_PATCH
|
||||
#if ROTATESTACK_PATCH
|
||||
{ "rotatestack", rotatestack },
|
||||
#endif // ROTATESTACK_PATCH
|
||||
#if INPLACEROTATE_PATCH
|
||||
{ "inplacerotate", inplacerotate },
|
||||
#endif // INPLACEROTATE_PATCH
|
||||
#if PUSH_PATCH || PUSH_NO_MASTER_PATCH
|
||||
{ "pushdown", pushdown },
|
||||
{ "pushup", pushup },
|
||||
#endif // PUSH_PATCH / PUSH_NO_MASTER_PATCH
|
||||
#if FLEXTILE_DELUXE_LAYOUT
|
||||
{ "incnstack", incnstack },
|
||||
{ "rotatelayoutaxis", rotatelayoutaxis },
|
||||
{ "setlayoutaxisex", setlayoutaxisex },
|
||||
{ "mirrorlayout", mirrorlayout },
|
||||
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||
#if CFACTS_PATCH
|
||||
{ "setcfact", setcfact },
|
||||
#endif // CFACTS_PATCH
|
||||
#if MOVEPLACE_PATCH
|
||||
{ "moveplace", moveplace },
|
||||
#endif // MOVEPLACE_PATCH
|
||||
#if EXRESIZE_PATCH
|
||||
{ "explace", explace },
|
||||
{ "togglehorizontalexpand", togglehorizontalexpand },
|
||||
{ "toggleverticalexpand", toggleverticalexpand },
|
||||
{ "togglemaximize", togglemaximize },
|
||||
#endif // EXRESIZE_PATCH
|
||||
#if TRANSFER_PATCH
|
||||
{ "transfer", transfer },
|
||||
#endif // TRANSFER_PATCH
|
||||
#if TRANSFER_ALL_PATCH
|
||||
{ "transferall", transferall },
|
||||
#endif // TRANSFER_ALL_PATCH
|
||||
{ "tagmon", tagmon },
|
||||
{ "zoom", zoom },
|
||||
#if VANITYGAPS_PATCH
|
||||
{ "incrgaps", incrgaps },
|
||||
{ "incrigaps", incrigaps },
|
||||
{ "incrogaps", incrogaps },
|
||||
{ "incrihgaps", incrihgaps },
|
||||
{ "incrivgaps", incrivgaps },
|
||||
{ "incrohgaps", incrohgaps },
|
||||
{ "incrovgaps", incrovgaps },
|
||||
{ "togglegaps", togglegaps },
|
||||
{ "defaultgaps", defaultgaps },
|
||||
#endif // VANITYGAPS_PATCH
|
||||
{ "view", view },
|
||||
{ "viewall", viewallex },
|
||||
{ "viewex", viewex },
|
||||
{ "toggleview", view },
|
||||
#if SHIFTVIEW_PATCH
|
||||
{ "shiftview", shiftview },
|
||||
#endif // SHIFTVIEW_PATCH
|
||||
#if SHIFTVIEW_CLIENTS_PATCH
|
||||
{ "shiftviewclients", shiftviewclients },
|
||||
#endif // SHIFTVIEW_CLIENTS_PATCH
|
||||
#if SELFRESTART_PATCH
|
||||
{ "self_restart", self_restart },
|
||||
#endif // SELFRESTART_PATCH
|
||||
#if TAGGRID_PATCH
|
||||
{ "switchtag", switchtag },
|
||||
#endif // TAGGRID_PATCH
|
||||
#if STICKY_PATCH
|
||||
{ "togglesticky", togglesticky },
|
||||
#endif // STICKY_PATCH
|
||||
{ "setborderpx", setborderpx },
|
||||
#if SETBORDERPX_PATCH
|
||||
#endif // SETBORDERPX_PATCH
|
||||
#if CYCLELAYOUTS_PATCH
|
||||
{ "cyclelayout", cyclelayout },
|
||||
#endif // CYCLELAYOUTS_PATCH
|
||||
#if MDPCONTROL_PATCH
|
||||
{ "mpdchange", mpdchange },
|
||||
{ "mpdcontrol", mpdcontrol },
|
||||
#endif // MDPCONTROL_PATCH
|
||||
{ "toggleviewex", toggleviewex },
|
||||
{ "tag", tag },
|
||||
{ "tagall", tagallex },
|
||||
{ "tagex", tagex },
|
||||
{ "toggletag", tag },
|
||||
{ "toggletagex", toggletagex },
|
||||
#if TAGALLMON_PATCH
|
||||
{ "tagallmon", tagallmon },
|
||||
#endif // TAGALLMON_PATCH
|
||||
#if TAGSWAPMON_PATCH
|
||||
{ "tagswapmon", tagswapmon},
|
||||
#endif // TAGSWAPMON_PATCH
|
||||
#if ALTERNATIVE_TAGS_PATCH
|
||||
{ "togglealttag", togglealttag },
|
||||
#endif // ALTERNATIVE_TAGS_PATCH
|
||||
#if TOGGLEFULLSCREEN_PATCH
|
||||
{ "togglefullscreen", togglefullscreen },
|
||||
#endif // TOGGLEFULLSCREEN_PATCH
|
||||
#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||
{ "togglefakefullscreen", togglefakefullscreen },
|
||||
#endif // FAKEFULLSCREEN_CLIENT_PATCH
|
||||
#if FULLSCREEN_PATCH
|
||||
{ "fullscreen", fullscreen },
|
||||
#endif // FULLSCREEN_PATCH
|
||||
#if MAXIMIZE_PATCH
|
||||
{ "togglehorizontalmax", togglehorizontalmax },
|
||||
{ "toggleverticalmax", toggleverticalmax },
|
||||
{ "togglemax", togglemax },
|
||||
#endif // MAXIMIZE_PATCH
|
||||
#if SCRATCHPAD_PATCH
|
||||
{ "togglescratch", togglescratch },
|
||||
#endif // SCRATCHPAD_PATCH
|
||||
#if UNFLOATVISIBLE_PATCH
|
||||
{ "unfloatvisible", unfloatvisible },
|
||||
#endif // UNFLOATVISIBLE_PATCH
|
||||
{ "killclient", killclient },
|
||||
#if WINVIEW_PATCH
|
||||
{ "winview", winview },
|
||||
#endif // WINVIEW_PATCH
|
||||
#if XRDB_PATCH && !VTCOLORS_PATCH
|
||||
{ "xrdb", xrdb },
|
||||
#endif // XRDB_PATCH
|
||||
{ "quit", quit },
|
||||
{ "setlayout", setlayout },
|
||||
{ "setlayoutex", setlayoutex },
|
||||
@ -519,7 +644,7 @@ static const Layout layouts[] = {
|
||||
{ "[D]", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, MONOCLE, 0, NULL } }, // deck
|
||||
{ "TTT", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, LEFT_TO_RIGHT, 0, NULL } }, // bstack
|
||||
{ "===", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, NULL } }, // bstackhoriz
|
||||
{ "|M|", flextile, { -1, -1, SPLIT_HORIZONTAL, LEFT_TO_RIGHT, TOP_TO_BOTTOM, 0, monoclesymbols } }, // centeredmaster
|
||||
{ "|M|", flextile, { -1, -1, SPLIT_CENTERED_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, TOP_TO_BOTTOM, NULL } }, // centeredmaster
|
||||
{ ":::", flextile, { -1, -1, NO_SPLIT, GAPPLESSGRID, 0, 0, NULL } }, // gappless grid
|
||||
{ "[\\]", flextile, { -1, -1, NO_SPLIT, DWINDLE, 0, 0, NULL } }, // fibonacci dwindle
|
||||
{ "(@)", flextile, { -1, -1, NO_SPLIT, SPIRAL, 0, 0, NULL } }, // fibonacci spiral
|
||||
|
77
patch/dwmc
77
patch/dwmc
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
signal() {
|
||||
xsetroot -name "fsignal:$*"
|
||||
@ -7,7 +7,43 @@ signal() {
|
||||
case $# in
|
||||
1)
|
||||
case $1 in
|
||||
setlayout | view | viewall | togglebar | togglefloating | zoom | killclient | quit)
|
||||
focusurgent) ;&
|
||||
mirrorlayout) ;&
|
||||
mpdcontrol) ;&
|
||||
pushdown) ;&
|
||||
pushup) ;&
|
||||
self_restart) ;&
|
||||
setlayout) ;&
|
||||
setcfact) ;&
|
||||
switchcol) ;&
|
||||
view) ;&
|
||||
viewall) ;&
|
||||
viewtoleft) ;&
|
||||
viewtoright) ;&
|
||||
tagtoleft) ;&
|
||||
tagtoright) ;&
|
||||
tagandviewtoleft) ;&
|
||||
tagandviewtoright) ;&
|
||||
transfer) ;&
|
||||
transferall) ;&
|
||||
togglealttag) ;&
|
||||
togglebar) ;&
|
||||
togglefloating) ;&
|
||||
togglefullscreen) ;&
|
||||
fullscreen) ;&
|
||||
togglefakefullscreen) ;&
|
||||
togglesticky) ;&
|
||||
togglehorizontalmax) ;&
|
||||
toggleverticalmax) ;&
|
||||
togglemax) ;&
|
||||
togglegaps) ;&
|
||||
defaultgaps) ;&
|
||||
unfloatvisible) ;&
|
||||
winview) ;&
|
||||
xrdb) ;&
|
||||
zoom) ;&
|
||||
killclient) ;&
|
||||
quit)
|
||||
signal $1
|
||||
;;
|
||||
*)
|
||||
@ -18,12 +54,47 @@ case $# in
|
||||
;;
|
||||
2)
|
||||
case $1 in
|
||||
cyclelayout) ;&
|
||||
explace) ;&
|
||||
moveplace) ;&
|
||||
mpdchange) ;&
|
||||
switchtag) ;&
|
||||
togglescratch) ;&
|
||||
view)
|
||||
signal $1 ui $2
|
||||
;;
|
||||
viewex | toggleviewex | tagex | toggletagex | setlayoutex | focusstack | incnmaster | focusmon | tagmon)
|
||||
viewex) ;&
|
||||
toggleviewex) ;&
|
||||
tagallmon) ;&
|
||||
tagswapmon) ;&
|
||||
tagex) ;&
|
||||
toggletagex) ;&
|
||||
setborderpx) ;&
|
||||
setlayoutex) ;&
|
||||
setlayoutaxisex) ;&
|
||||
swapfocus) ;&
|
||||
focusstack) ;&
|
||||
pushstack) ;&
|
||||
inplacerotate) ;&
|
||||
rotatestack) ;&
|
||||
rotatelayoutaxis) ;&
|
||||
incnmaster) ;&
|
||||
incnstack) ;&
|
||||
incrgaps) ;&
|
||||
incrigaps) ;&
|
||||
incrogaps) ;&
|
||||
incrihgaps) ;&
|
||||
incrivgaps) ;&
|
||||
incrohgaps) ;&
|
||||
incrovgaps) ;&
|
||||
movestack) ;&
|
||||
shiftview) ;&
|
||||
shiftviewclients) ;&
|
||||
focusmon) ;&
|
||||
tagmon)
|
||||
signal $1 i $2
|
||||
;;
|
||||
setcfact) ;&
|
||||
setmfact)
|
||||
signal $1 f $2
|
||||
;;
|
||||
|
@ -66,6 +66,27 @@ getfactsforrange(Monitor *m, int an, int ai, int size, int *rest, float *fact)
|
||||
*fact = facts;
|
||||
}
|
||||
|
||||
#if DWMC_PATCH
|
||||
static void
|
||||
setlayoutaxisex(const Arg *arg)
|
||||
{
|
||||
int axis, arr;
|
||||
|
||||
axis = arg->i & 0x3; // lower two bytes indicates layout, master or stack1-2
|
||||
arr = ((arg->i & 0xFC) >> 2); // remaining six upper bytes indicates arrangement
|
||||
|
||||
if ((axis == 0 && abs(arr) > LAYOUT_LAST)
|
||||
|| (axis > 0 && (arr > AXIS_LAST || arr < 0)))
|
||||
arr = 0;
|
||||
|
||||
selmon->ltaxis[axis] = arr;
|
||||
#if PERTAG_PATCH
|
||||
selmon->pertag->ltaxis[selmon->pertag->curtag][axis] = selmon->ltaxis[axis];
|
||||
#endif // PERTAG_PATCH
|
||||
arrange(selmon);
|
||||
}
|
||||
#endif // DWMC_PATCH
|
||||
|
||||
static void
|
||||
layout_no_split(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n)
|
||||
{
|
||||
|
@ -1,6 +1,10 @@
|
||||
static void flextile(Monitor *m);
|
||||
static void getfactsforrange(Monitor *m, int an, int ai, int size, int *rest, float *fact);
|
||||
static void mirrorlayout(const Arg *arg);
|
||||
static void rotatelayoutaxis(const Arg *arg);
|
||||
#if DWMC_PATCH
|
||||
static void setlayoutaxisex(const Arg *arg);
|
||||
#endif // DWMC_PATCH
|
||||
static void incnstack(const Arg *arg);
|
||||
|
||||
/* Symbol handlers */
|
||||
|
Loading…
Reference in New Issue
Block a user