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
173
config.def.h
173
config.def.h
@ -459,29 +459,154 @@ static const MonitorRule monrules[] = {
|
|||||||
/* signum must be greater than 0 */
|
/* signum must be greater than 0 */
|
||||||
/* trigger signals using `xsetroot -name "fsignal:<signame> [<type> <value>]"` */
|
/* trigger signals using `xsetroot -name "fsignal:<signame> [<type> <value>]"` */
|
||||||
static Signal signals[] = {
|
static Signal signals[] = {
|
||||||
/* signum function */
|
/* signum function */
|
||||||
{ "focusstack", focusstack },
|
{ "focusstack", focusstack },
|
||||||
{ "setmfact", setmfact },
|
{ "setmfact", setmfact },
|
||||||
{ "togglebar", togglebar },
|
{ "togglebar", togglebar },
|
||||||
{ "incnmaster", incnmaster },
|
{ "incnmaster", incnmaster },
|
||||||
{ "togglefloating", togglefloating },
|
{ "togglefloating", togglefloating },
|
||||||
{ "focusmon", focusmon },
|
{ "focusmon", focusmon },
|
||||||
{ "tagmon", tagmon },
|
#if STACKER_PATCH
|
||||||
{ "zoom", zoom },
|
{ "pushstack", pushstack },
|
||||||
{ "view", view },
|
#endif // STACKER_PATCH
|
||||||
{ "viewall", viewallex },
|
#if FOCUSURGENT_PATCH
|
||||||
{ "viewex", viewex },
|
{ "focusurgent", focusurgent },
|
||||||
{ "toggleview", view },
|
#endif // FOCUSURGENT_PATCH
|
||||||
{ "toggleviewex", toggleviewex },
|
#if FOCUSADJACENTTAG_PATCH
|
||||||
{ "tag", tag },
|
{ "viewtoleft", viewtoleft },
|
||||||
{ "tagall", tagallex },
|
{ "viewtoright", viewtoright },
|
||||||
{ "tagex", tagex },
|
{ "tagtoleft", tagtoleft },
|
||||||
{ "toggletag", tag },
|
{ "tagtoright", tagtoright},
|
||||||
{ "toggletagex", toggletagex },
|
{ "tagandviewtoleft", tagandviewtoleft },
|
||||||
{ "killclient", killclient },
|
{ "tagandviewtoright", tagandviewtoright },
|
||||||
{ "quit", quit },
|
#endif // FOCUSADJACENTTAG_PATCH
|
||||||
{ "setlayout", setlayout },
|
#if SWAPFOCUS_PATCH && PERTAG_PATCH
|
||||||
{ "setlayoutex", setlayoutex },
|
{ "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 },
|
||||||
};
|
};
|
||||||
#elif FSIGNAL_PATCH
|
#elif FSIGNAL_PATCH
|
||||||
/* signal definitions */
|
/* signal definitions */
|
||||||
@ -519,7 +644,7 @@ static const Layout layouts[] = {
|
|||||||
{ "[D]", flextile, { -1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, MONOCLE, 0, NULL } }, // deck
|
{ "[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
|
{ "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
|
{ "===", 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, GAPPLESSGRID, 0, 0, NULL } }, // gappless grid
|
||||||
{ "[\\]", flextile, { -1, -1, NO_SPLIT, DWINDLE, 0, 0, NULL } }, // fibonacci dwindle
|
{ "[\\]", flextile, { -1, -1, NO_SPLIT, DWINDLE, 0, 0, NULL } }, // fibonacci dwindle
|
||||||
{ "(@)", flextile, { -1, -1, NO_SPLIT, SPIRAL, 0, 0, NULL } }, // fibonacci spiral
|
{ "(@)", flextile, { -1, -1, NO_SPLIT, SPIRAL, 0, 0, NULL } }, // fibonacci spiral
|
||||||
|
79
patch/dwmc
79
patch/dwmc
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
signal() {
|
signal() {
|
||||||
xsetroot -name "fsignal:$*"
|
xsetroot -name "fsignal:$*"
|
||||||
@ -7,7 +7,43 @@ signal() {
|
|||||||
case $# in
|
case $# in
|
||||||
1)
|
1)
|
||||||
case $1 in
|
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
|
signal $1
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
@ -18,12 +54,47 @@ case $# in
|
|||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
case $1 in
|
case $1 in
|
||||||
|
cyclelayout) ;&
|
||||||
|
explace) ;&
|
||||||
|
moveplace) ;&
|
||||||
|
mpdchange) ;&
|
||||||
|
switchtag) ;&
|
||||||
|
togglescratch) ;&
|
||||||
view)
|
view)
|
||||||
signal $1 ui $2
|
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
|
signal $1 i $2
|
||||||
;;
|
;;
|
||||||
|
setcfact) ;&
|
||||||
setmfact)
|
setmfact)
|
||||||
signal $1 f $2
|
signal $1 f $2
|
||||||
;;
|
;;
|
||||||
@ -37,4 +108,4 @@ case $# in
|
|||||||
echo "Too many arguments."
|
echo "Too many arguments."
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -66,6 +66,27 @@ getfactsforrange(Monitor *m, int an, int ai, int size, int *rest, float *fact)
|
|||||||
*fact = facts;
|
*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
|
static void
|
||||||
layout_no_split(Monitor *m, int x, int y, int h, int w, int ih, int iv, int n)
|
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 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 mirrorlayout(const Arg *arg);
|
||||||
static void rotatelayoutaxis(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);
|
static void incnstack(const Arg *arg);
|
||||||
|
|
||||||
/* Symbol handlers */
|
/* Symbol handlers */
|
||||||
|
Loading…
Reference in New Issue
Block a user