more flexipatch

This commit is contained in:
2023-02-25 17:50:17 +01:00
parent ad060cc9d8
commit dc51ce018b
35 changed files with 3768 additions and 171 deletions

View File

@@ -7,7 +7,7 @@ static const int corner_radius = 10;
#else
static const unsigned int borderpx = 1; /* border pixel of windows */
#endif // ROUNDED_CORNERS_PATCH
static const unsigned int snap = 32; /* snap pixel */
static const unsigned int snap = 28; /* snap pixel */
#if SWALLOW_PATCH
static const int swallowfloating = 0; /* 1 means swallow floating windows by default */
#endif // SWALLOW_PATCH
@@ -50,7 +50,7 @@ static const int showtab = showtab_auto; /* Default tab b
static const int toptab = False; /* False means bottom tab bar */
#endif // TAB_PATCH
#if BAR_HEIGHT_PATCH
static const int bar_height = 0; /* 0 means derive from font, >= 1 explicit height */
static const int bar_height = 32; /* 0 means derive from font, >= 1 explicit height */
#endif // BAR_HEIGHT_PATCH
#if BAR_PADDING_PATCH
static const int vertpad = 10; /* vertical padding of bar */
@@ -154,11 +154,11 @@ static void (*bartabmonfns[])(Monitor *) = { NULL /* , customlayoutfn */ };
#endif // MONOCLE_LAYOUT
#endif // BAR_TABGROUPS_PATCH
#if BAR_PANGO_PATCH
static const char font[] = "monospace 10";
static const char font[] = "monospace 11";
#else
static const char *fonts[] = { "monospace:size=10" };
static const char *fonts[] = { "SauceCodePro Nerd Font Mono:size=11:antialias=true", "monospace:size=11:antialias=true" };
#endif // BAR_PANGO_PATCH
static const char dmenufont[] = "monospace:size=10";
static const char dmenufont[] = "SauceCodePro Nerd Font Mono:size=11:antialias=true";
static char c000000[] = "#000000"; // placeholder value
@@ -763,31 +763,31 @@ static const char *xkb_layouts[] = {
#endif // XKB_PATCH
/* key definitions */
#define MODKEY Mod1Mask
#define MODKEY Mod4Mask
#if COMBO_PATCH && SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
{ MODKEY|Mod1Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
{ MODKEY|Mod1Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod1Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#elif COMBO_PATCH && SWAPTAGS_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
{ MODKEY|Mod1Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
#elif COMBO_PATCH && TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, combotag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
{ MODKEY|Mod1Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod1Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#elif COMBO_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, comboview, {.ui = 1 << TAG} }, \
@@ -800,24 +800,24 @@ static const char *xkb_layouts[] = {
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
{ MODKEY|Mod1Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} }, \
{ MODKEY|Mod1Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod1Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#elif SWAPTAGS_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
{ MODKEY|Mod1Mask|ShiftMask, KEY, swaptags, {.ui = 1 << TAG} },
#elif TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
{ MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
{ MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod4Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
{ MODKEY|Mod1Mask, KEY, tagnextmon, {.ui = 1 << TAG} }, \
{ MODKEY|Mod1Mask|ControlMask, KEY, tagprevmon, {.ui = 1 << TAG} },
#else
#define TAGKEYS(KEY,TAG) \
{ MODKEY, KEY, view, {.ui = 1 << TAG} }, \
@@ -863,7 +863,7 @@ static const char *dmenucmd[] = {
#endif // BAR_DMENUMATCHTOP_PATCH
NULL
};
static const char *termcmd[] = { "st", NULL };
static const char *termcmd[] = { "alacritty", NULL };
#if BAR_STATUSCMD_PATCH
#if BAR_DWMBLOCKS_PATCH
@@ -928,14 +928,14 @@ static const Key keys[] = {
{ MODKEY, XK_v, switchcol, {0} },
#endif // SWITCHCOL_PATCH
#if ROTATESTACK_PATCH
{ MODKEY|Mod4Mask, XK_j, rotatestack, {.i = +1 } },
{ MODKEY|Mod4Mask, XK_k, rotatestack, {.i = -1 } },
{ MODKEY|Mod1Mask, XK_j, rotatestack, {.i = +1 } },
{ MODKEY|Mod1Mask, XK_k, rotatestack, {.i = -1 } },
#endif // ROTATESTACK_PATCH
#if INPLACEROTATE_PATCH
{ MODKEY|Mod4Mask, XK_j, inplacerotate, {.i = +2 } }, // same as rotatestack
{ MODKEY|Mod4Mask, XK_k, inplacerotate, {.i = -2 } }, // same as reotatestack
{ MODKEY|Mod4Mask|ShiftMask, XK_j, inplacerotate, {.i = +1} },
{ MODKEY|Mod4Mask|ShiftMask, XK_k, inplacerotate, {.i = -1} },
{ MODKEY|Mod1Mask, XK_j, inplacerotate, {.i = +2 } }, // same as rotatestack
{ MODKEY|Mod1Mask, XK_k, inplacerotate, {.i = -2 } }, // same as reotatestack
{ MODKEY|Mod1Mask|ShiftMask, XK_j, inplacerotate, {.i = +1} },
{ MODKEY|Mod1Mask|ShiftMask, XK_k, inplacerotate, {.i = -1} },
#endif // INPLACEROTATE_PATCH
#if PUSH_PATCH || PUSH_NO_MASTER_PATCH
{ MODKEY|ControlMask, XK_j, pushdown, {0} },
@@ -959,14 +959,14 @@ static const Key keys[] = {
{ MODKEY|ControlMask|ShiftMask, XK_r, aspectresize, {.i = -24} },
#endif // ASPECTRESIZE_PATCH
#if MOVERESIZE_PATCH
{ MODKEY|Mod4Mask, XK_Down, moveresize, {.v = "0x 25y 0w 0h" } },
{ MODKEY|Mod4Mask, XK_Up, moveresize, {.v = "0x -25y 0w 0h" } },
{ MODKEY|Mod4Mask, XK_Right, moveresize, {.v = "25x 0y 0w 0h" } },
{ MODKEY|Mod4Mask, XK_Left, moveresize, {.v = "-25x 0y 0w 0h" } },
{ MODKEY|Mod4Mask|ShiftMask, XK_Down, moveresize, {.v = "0x 0y 0w 25h" } },
{ MODKEY|Mod4Mask|ShiftMask, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } },
{ MODKEY|Mod4Mask|ShiftMask, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } },
{ MODKEY|Mod4Mask|ShiftMask, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } },
{ MODKEY|Mod1Mask, XK_Down, moveresize, {.v = "0x 25y 0w 0h" } },
{ MODKEY|Mod1Mask, XK_Up, moveresize, {.v = "0x -25y 0w 0h" } },
{ MODKEY|Mod1Mask, XK_Right, moveresize, {.v = "25x 0y 0w 0h" } },
{ MODKEY|Mod1Mask, XK_Left, moveresize, {.v = "-25x 0y 0w 0h" } },
{ MODKEY|Mod1Mask|ShiftMask, XK_Down, moveresize, {.v = "0x 0y 0w 25h" } },
{ MODKEY|Mod1Mask|ShiftMask, XK_Up, moveresize, {.v = "0x 0y 0w -25h" } },
{ MODKEY|Mod1Mask|ShiftMask, XK_Right, moveresize, {.v = "0x 0y 25w 0h" } },
{ MODKEY|Mod1Mask|ShiftMask, XK_Left, moveresize, {.v = "0x 0y -25w 0h" } },
#endif // MOVERESIZE_PATCH
#if MOVESTACK_PATCH
{ MODKEY|ShiftMask, XK_j, movestack, {.i = +1 } },
@@ -989,22 +989,22 @@ static const Key keys[] = {
#endif // INSETS_PATCH
{ MODKEY, XK_Return, zoom, {0} },
#if VANITYGAPS_PATCH
{ MODKEY|Mod4Mask, XK_u, incrgaps, {.i = +1 } },
{ MODKEY|Mod4Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } },
{ MODKEY|Mod4Mask, XK_i, incrigaps, {.i = +1 } },
{ MODKEY|Mod4Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } },
{ MODKEY|Mod4Mask, XK_o, incrogaps, {.i = +1 } },
{ MODKEY|Mod4Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } },
{ MODKEY|Mod4Mask, XK_6, incrihgaps, {.i = +1 } },
{ MODKEY|Mod4Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } },
{ MODKEY|Mod4Mask, XK_7, incrivgaps, {.i = +1 } },
{ MODKEY|Mod4Mask|ShiftMask, XK_7, incrivgaps, {.i = -1 } },
{ MODKEY|Mod4Mask, XK_8, incrohgaps, {.i = +1 } },
{ MODKEY|Mod4Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } },
{ MODKEY|Mod4Mask, XK_9, incrovgaps, {.i = +1 } },
{ MODKEY|Mod4Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } },
{ MODKEY|Mod4Mask, XK_0, togglegaps, {0} },
{ MODKEY|Mod4Mask|ShiftMask, XK_0, defaultgaps, {0} },
{ MODKEY|Mod1Mask, XK_u, incrgaps, {.i = +1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_u, incrgaps, {.i = -1 } },
{ MODKEY|Mod1Mask, XK_i, incrigaps, {.i = +1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_i, incrigaps, {.i = -1 } },
{ MODKEY|Mod1Mask, XK_o, incrogaps, {.i = +1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_o, incrogaps, {.i = -1 } },
{ MODKEY|Mod1Mask, XK_6, incrihgaps, {.i = +1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_6, incrihgaps, {.i = -1 } },
{ MODKEY|Mod1Mask, XK_7, incrivgaps, {.i = +1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_7, incrivgaps, {.i = -1 } },
{ MODKEY|Mod1Mask, XK_8, incrohgaps, {.i = +1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_8, incrohgaps, {.i = -1 } },
{ MODKEY|Mod1Mask, XK_9, incrovgaps, {.i = +1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_9, incrovgaps, {.i = -1 } },
{ MODKEY|Mod1Mask, XK_0, togglegaps, {0} },
{ MODKEY|Mod1Mask|ShiftMask, XK_0, defaultgaps, {0} },
#endif // VANITYGAPS_PATCH
#if ALT_TAB_PATCH
{ Mod1Mask, XK_Tab, alttabstart, {0} },
@@ -1024,16 +1024,16 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_backslash, shiftview, { .i = +1 } },
#endif // SHIFTVIEW_PATCH
#if SHIFTVIEW_CLIENTS_PATCH
{ MODKEY|Mod4Mask, XK_Tab, shiftviewclients, { .i = -1 } },
{ MODKEY|Mod4Mask, XK_backslash, shiftviewclients, { .i = +1 } },
{ MODKEY|Mod1Mask, XK_Tab, shiftviewclients, { .i = -1 } },
{ MODKEY|Mod1Mask, XK_backslash, shiftviewclients, { .i = +1 } },
#endif // SHIFTVIEW_CLIENTS_PATCH
#if SHIFTBOTH_PATCH
{ MODKEY|ControlMask, XK_Left, shiftboth, { .i = -1 } }, // note keybinding conflict with focusadjacenttag tagandviewtoleft
{ MODKEY|ControlMask, XK_Right, shiftboth, { .i = +1 } }, // note keybinding conflict with focusadjacenttag tagandviewtoright
#endif // SHIFTBOTH_PATCH
#if SHIFTSWAPTAGS_PATCH && SWAPTAGS_PATCH
{ MODKEY|Mod4Mask|ShiftMask, XK_Left, shiftswaptags, { .i = -1 } },
{ MODKEY|Mod4Mask|ShiftMask, XK_Right, shiftswaptags, { .i = +1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_Left, shiftswaptags, { .i = -1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_Right, shiftswaptags, { .i = +1 } },
#endif // SHIFTSWAPTAGS_PATCH
#if BAR_WINTITLEACTIONS_PATCH
{ MODKEY|ControlMask, XK_z, showhideclient, {0} },
@@ -1100,7 +1100,7 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_grave, removescratch, {.ui = 0 } },
#endif // SCRATCHPADS_PATCH | RENAMED_SCRATCHPADS_PATCH
#if UNFLOATVISIBLE_PATCH
{ MODKEY|Mod4Mask, XK_space, unfloatvisible, {0} },
{ MODKEY|Mod1Mask, XK_space, unfloatvisible, {0} },
{ MODKEY|ShiftMask, XK_t, unfloatvisible, {.v = &layouts[0]} },
#endif // UNFLOATVISIBLE_PATCH
#if TOGGLEFULLSCREEN_PATCH
@@ -1159,12 +1159,12 @@ static const Key keys[] = {
{ MODKEY|ControlMask, XK_F9, tagall, {.v = "9"} },
#endif // TAGALL_PATCH
#if TAGALLMON_PATCH
{ MODKEY|Mod4Mask|ShiftMask, XK_comma, tagallmon, {.i = +1 } },
{ MODKEY|Mod4Mask|ShiftMask, XK_period, tagallmon, {.i = -1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_comma, tagallmon, {.i = +1 } },
{ MODKEY|Mod1Mask|ShiftMask, XK_period, tagallmon, {.i = -1 } },
#endif // TAGALLMON_PATCH
#if TAGSWAPMON_PATCH
{ MODKEY|Mod4Mask|ControlMask, XK_comma, tagswapmon, {.i = +1 } },
{ MODKEY|Mod4Mask|ControlMask, XK_period, tagswapmon, {.i = -1 } },
{ MODKEY|Mod1Mask|ControlMask, XK_comma, tagswapmon, {.i = +1 } },
{ MODKEY|Mod1Mask|ControlMask, XK_period, tagswapmon, {.i = -1 } },
#endif // TAGSWAPMON_PATCH
#if BAR_ALTERNATIVE_TAGS_PATCH
{ MODKEY, XK_n, togglealttag, {0} },
@@ -1177,10 +1177,10 @@ static const Key keys[] = {
{ MODKEY|ControlMask, XK_Down, switchtag, { .ui = SWITCHTAG_DOWN | SWITCHTAG_VIEW } },
{ MODKEY|ControlMask, XK_Right, switchtag, { .ui = SWITCHTAG_RIGHT | SWITCHTAG_VIEW } },
{ MODKEY|ControlMask, XK_Left, switchtag, { .ui = SWITCHTAG_LEFT | SWITCHTAG_VIEW } },
{ MODKEY|Mod4Mask, XK_Up, switchtag, { .ui = SWITCHTAG_UP | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
{ MODKEY|Mod4Mask, XK_Down, switchtag, { .ui = SWITCHTAG_DOWN | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
{ MODKEY|Mod4Mask, XK_Right, switchtag, { .ui = SWITCHTAG_RIGHT | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
{ MODKEY|Mod4Mask, XK_Left, switchtag, { .ui = SWITCHTAG_LEFT | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
{ MODKEY|Mod1Mask, XK_Up, switchtag, { .ui = SWITCHTAG_UP | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
{ MODKEY|Mod1Mask, XK_Down, switchtag, { .ui = SWITCHTAG_DOWN | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
{ MODKEY|Mod1Mask, XK_Right, switchtag, { .ui = SWITCHTAG_RIGHT | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
{ MODKEY|Mod1Mask, XK_Left, switchtag, { .ui = SWITCHTAG_LEFT | SWITCHTAG_TAG | SWITCHTAG_VIEW } },
#endif // BAR_TAGGRID_PATCH
#if MOVEPLACE_PATCH
{ MODKEY, XK_KP_7, moveplace, {.ui = WIN_NW }}, /* XK_KP_Home, */