summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStein Gunnar Bakkeby <sbakkeby@samsung>2020-06-02 11:11:59 +0200
committerStein Gunnar Bakkeby <sbakkeby@samsung>2020-06-02 11:11:59 +0200
commit8c419b0d7ac130a99623834c7ef1ca6c9e29d07e (patch)
tree6a3934dde8e72f234e9c8abc7099a526effe30ce
parent4db0cd64439e80559c53e88521d706c2260ae533 (diff)
downloaddwm-flexipatch-8c419b0d7ac130a99623834c7ef1ca6c9e29d07e.tar.gz
dwm-flexipatch-8c419b0d7ac130a99623834c7ef1ca6c9e29d07e.zip
Expanding on dwmc options
-rw-r--r--config.def.h173
-rwxr-xr-xpatch/dwmc79
-rw-r--r--patch/flextile-deluxe.c21
-rw-r--r--patch/flextile-deluxe.h4
4 files changed, 249 insertions, 28 deletions
diff --git a/config.def.h b/config.def.h
index 394d9a2..0408b02 100644
--- a/config.def.h
+++ b/config.def.h
@@ -459,29 +459,154 @@ static const MonitorRule monrules[] = {
/* signum must be greater than 0 */
/* trigger signals using `xsetroot -name "fsignal:<signame> [<type> <value>]"` */
static Signal signals[] = {
- /* signum function */
- { "focusstack", focusstack },
- { "setmfact", setmfact },
- { "togglebar", togglebar },
- { "incnmaster", incnmaster },
- { "togglefloating", togglefloating },
- { "focusmon", focusmon },
- { "tagmon", tagmon },
- { "zoom", zoom },
- { "view", view },
- { "viewall", viewallex },
- { "viewex", viewex },
- { "toggleview", view },
- { "toggleviewex", toggleviewex },
- { "tag", tag },
- { "tagall", tagallex },
- { "tagex", tagex },
- { "toggletag", tag },
- { "toggletagex", toggletagex },
- { "killclient", killclient },
- { "quit", quit },
- { "setlayout", setlayout },
- { "setlayoutex", setlayoutex },
+ /* signum function */
+ { "focusstack", focusstack },
+ { "setmfact", setmfact },
+ { "togglebar", togglebar },
+ { "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 },
};
#elif FSIGNAL_PATCH
/* signal definitions */
@@ -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
diff --git a/patch/dwmc b/patch/dwmc
index 9e3ecd6..10ec990 100755
--- a/patch/dwmc
+++ b/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
;;
@@ -37,4 +108,4 @@ case $# in
echo "Too many arguments."
exit 1
;;
-esac \ No newline at end of file
+esac
diff --git a/patch/flextile-deluxe.c b/patch/flextile-deluxe.c
index 986460f..c8b7e3e 100644
--- a/patch/flextile-deluxe.c
+++ b/patch/flextile-deluxe.c
@@ -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)
{
diff --git a/patch/flextile-deluxe.h b/patch/flextile-deluxe.h
index b0aadd4..01bce7b 100644
--- a/patch/flextile-deluxe.h
+++ b/patch/flextile-deluxe.h
@@ -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 */