Compare commits

..

4 Commits

Author SHA1 Message Date
f02c5dbc0b minor patches 2025-10-01 10:57:19 +02:00
ab9f2e41a5 feat: changed layout to fib dindle 2025-07-16 16:12:02 +02:00
7b365e95a7 fix: readded monocle layout for fullscreens 2025-07-15 15:32:49 +02:00
d400b7b0e9 feat: changed default tiling modes 2025-07-05 21:13:10 +02:00
5 changed files with 605 additions and 551 deletions

View File

@@ -3,14 +3,14 @@
#include <X11/XF86keysym.h> #include <X11/XF86keysym.h>
/* Helper macros for spawning commands */ /* Helper macros for spawning commands */
#define SHCMD(cmd) \ #define SHCMD(cmd) \
{ \ { \
.v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } \ .v = (const char *[]) { "/bin/sh", "-c", cmd, NULL } \
} }
#define CMD(...) \ #define CMD(...) \
{ \ { \
.v = (const char *[]) { __VA_ARGS__, NULL } \ .v = (const char *[]) { __VA_ARGS__, NULL } \
} }
/* appearance */ /* appearance */
#if ROUNDED_CORNERS_PATCH #if ROUNDED_CORNERS_PATCH
@@ -70,11 +70,12 @@ static const int topbar = 1; /* 0 means bottom bar */
/* Display modes of the tab bar: never shown, always shown, shown only in */ /* Display modes of the tab bar: never shown, always shown, shown only in */
/* monocle mode in the presence of several windows. */ /* monocle mode in the presence of several windows. */
/* Modes after showtab_nmodes are disabled. */ /* Modes after showtab_nmodes are disabled. */
enum showtab_modes { enum showtab_modes
showtab_never, {
showtab_auto, showtab_never,
showtab_nmodes, showtab_auto,
showtab_always showtab_nmodes,
showtab_always
}; };
static const int showtab = showtab_auto; /* Default tab bar show mode */ static const int showtab = showtab_auto; /* Default tab bar show mode */
static const int toptab = False; /* False means bottom tab bar */ static const int toptab = False; /* False means bottom tab bar */
@@ -176,7 +177,7 @@ static const unsigned int tabcyclekey =
static const unsigned int tabposy = static const unsigned int tabposy =
1; /* tab position on Y axis, 0 = top, 1 = center, 2 = bottom */ 1; /* tab position on Y axis, 0 = top, 1 = center, 2 = bottom */
static const unsigned int tabposx = static const unsigned int tabposx =
1; /* tab position on X axis, 0 = left, 1 = center, 2 = right */ 1; /* tab position on X axis, 0 = left, 1 = center, 2 = right */
static const unsigned int maxwtab = 600; /* tab menu width */ static const unsigned int maxwtab = 600; /* tab menu width */
static const unsigned int maxhtab = 200; /* tab menu height */ static const unsigned int maxhtab = 200; /* tab menu height */
#endif // ALT_TAB_PATCH #endif // ALT_TAB_PATCH
@@ -382,10 +383,14 @@ static const char title_bg_dark[] = "#303030";
static const char title_bg_light[] = "#fdfdfd"; static const char title_bg_light[] = "#fdfdfd";
static const int color_ptrs[][ColCount] = { static const int color_ptrs[][ColCount] = {
/* fg bg border float */ /* fg bg border float */
[SchemeNorm] = {-1, -1, 5, 12}, [SchemeSel] = {-1, -1, 11, 13}, [SchemeNorm] = {-1, -1, 5, 12},
[SchemeTitleNorm] = {6, -1, -1, -1}, [SchemeTitleSel] = {6, -1, -1, -1}, [SchemeSel] = {-1, -1, 11, 13},
[SchemeTagsNorm] = {2, 0, 0, -1}, [SchemeTagsSel] = {6, 5, 5, -1}, [SchemeTitleNorm] = {6, -1, -1, -1},
[SchemeHidNorm] = {5, 0, 0, -1}, [SchemeHidSel] = {6, -1, -1, -1}, [SchemeTitleSel] = {6, -1, -1, -1},
[SchemeTagsNorm] = {2, 0, 0, -1},
[SchemeTagsSel] = {6, 5, 5, -1},
[SchemeHidNorm] = {5, 0, 0, -1},
[SchemeHidSel] = {6, -1, -1, -1},
[SchemeUrg] = {7, 9, 9, 15}, [SchemeUrg] = {7, 9, 9, 15},
}; };
#endif // BAR_VTCOLORS_PATCH #endif // BAR_VTCOLORS_PATCH
@@ -631,7 +636,7 @@ static const Rule rules[] = {
#if PERTAG_PATCH #if PERTAG_PATCH
static const MonitorRule monrules[] = { static const MonitorRule monrules[] = {
/* monitor tag layout mfact nmaster showbar topbar */ /* monitor tag layout mfact nmaster showbar topbar */
{1, -1, 2, -1, -1, -1, -1}, // use a different layout for the second monitor {1, -1, 2, -1, -1, -1, -1}, // use a different layout for the second monitor
{-1, -1, 0, -1, -1, -1, -1}, // default {-1, -1, 0, -1, -1, -1, -1}, // default
}; };
#else #else
@@ -816,8 +821,8 @@ static const Layout layouts[] = {
{"[]=", {"[]=",
flextile, flextile,
{-1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0, {-1, -1, SPLIT_VERTICAL, TOP_TO_BOTTOM, TOP_TO_BOTTOM, 0,
NULL}}, // default tile layout NULL}}, // default tile layout
{"><>", NULL, {0}}, /* no layout function means floating behavior */ {"><>", NULL, {0}}, /* no layout function means floating behavior */
{"[M]", flextile, {-1, -1, NO_SPLIT, MONOCLE, MONOCLE, 0, NULL}}, // monocle {"[M]", flextile, {-1, -1, NO_SPLIT, MONOCLE, MONOCLE, 0, NULL}}, // monocle
{"|||", {"|||",
flextile, flextile,
@@ -906,10 +911,6 @@ static const Layout layouts[] = {
/* symbol arrange function */ /* symbol arrange function */
#if TILE_LAYOUT #if TILE_LAYOUT
{"[]=", tile}, /* first entry is default */ {"[]=", tile}, /* first entry is default */
#endif
{"><>", NULL}, /* no layout function means floating behavior */
#if MONOCLE_LAYOUT
{"[M]", monocle},
#endif #endif
#if BSTACK_LAYOUT #if BSTACK_LAYOUT
{"TTT", bstack}, {"TTT", bstack},
@@ -947,6 +948,10 @@ static const Layout layouts[] = {
#if NROWGRID_LAYOUT #if NROWGRID_LAYOUT
{"###", nrowgrid}, {"###", nrowgrid},
#endif #endif
#if MONOCLE_LAYOUT
{"[M]", monocle},
#endif
{"><>", NULL}, /* no layout function means floating behavior */
}; };
#endif // FLEXTILE_DELUXE_LAYOUT #endif // FLEXTILE_DELUXE_LAYOUT
@@ -961,76 +966,76 @@ static const char *xkb_layouts[] = {
/* key definitions */ /* key definitions */
#define MODKEY Mod4Mask #define MODKEY Mod4Mask
#if COMBO_PATCH && SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH #if COMBO_PATCH && SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY, TAG) \ #define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, comboview, {.ui = 1 << TAG}}, \ {MODKEY, KEY, comboview, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
{MODKEY | ShiftMask, KEY, combotag, {.ui = 1 << TAG}}, \ {MODKEY | ShiftMask, KEY, combotag, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask | ShiftMask, KEY, swaptags, {.ui = 1 << TAG}}, \ {MODKEY | Mod4Mask | ShiftMask, KEY, swaptags, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG}}, \ {MODKEY | Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask | ControlMask, KEY, tagprevmon, {.ui = 1 << TAG}}, {MODKEY | Mod4Mask | ControlMask, KEY, tagprevmon, {.ui = 1 << TAG}},
#elif COMBO_PATCH && SWAPTAGS_PATCH #elif COMBO_PATCH && SWAPTAGS_PATCH
#define TAGKEYS(KEY, TAG) \ #define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, comboview, {.ui = 1 << TAG}}, \ {MODKEY, KEY, comboview, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
{MODKEY | ShiftMask, KEY, combotag, {.ui = 1 << TAG}}, \ {MODKEY | ShiftMask, KEY, combotag, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask | ShiftMask, KEY, swaptags, {.ui = 1 << TAG}}, {MODKEY | Mod4Mask | ShiftMask, KEY, swaptags, {.ui = 1 << TAG}},
#elif COMBO_PATCH && TAGOTHERMONITOR_PATCH #elif COMBO_PATCH && TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY, TAG) \ #define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, comboview, {.ui = 1 << TAG}}, \ {MODKEY, KEY, comboview, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
{MODKEY | ShiftMask, KEY, combotag, {.ui = 1 << TAG}}, \ {MODKEY | ShiftMask, KEY, combotag, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG}}, \ {MODKEY | Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask | ControlMask, KEY, tagprevmon, {.ui = 1 << TAG}}, {MODKEY | Mod4Mask | ControlMask, KEY, tagprevmon, {.ui = 1 << TAG}},
#elif COMBO_PATCH #elif COMBO_PATCH
#define TAGKEYS(KEY, TAG) \ #define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, comboview, {.ui = 1 << TAG}}, \ {MODKEY, KEY, comboview, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
{MODKEY | ShiftMask, KEY, combotag, {.ui = 1 << TAG}}, \ {MODKEY | ShiftMask, KEY, combotag, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}},
#elif SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH #elif SWAPTAGS_PATCH && TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY, TAG) \ #define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, view, {.ui = 1 << TAG}}, \ {MODKEY, KEY, view, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
{MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \ {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask | ShiftMask, KEY, swaptags, {.ui = 1 << TAG}}, \ {MODKEY | Mod4Mask | ShiftMask, KEY, swaptags, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG}}, \ {MODKEY | Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask | ControlMask, KEY, tagprevmon, {.ui = 1 << TAG}}, {MODKEY | Mod4Mask | ControlMask, KEY, tagprevmon, {.ui = 1 << TAG}},
#elif SWAPTAGS_PATCH #elif SWAPTAGS_PATCH
#define TAGKEYS(KEY, TAG) \ #define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, view, {.ui = 1 << TAG}}, \ {MODKEY, KEY, view, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
{MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \ {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask | ShiftMask, KEY, swaptags, {.ui = 1 << TAG}}, {MODKEY | Mod4Mask | ShiftMask, KEY, swaptags, {.ui = 1 << TAG}},
#elif TAGOTHERMONITOR_PATCH #elif TAGOTHERMONITOR_PATCH
#define TAGKEYS(KEY, TAG) \ #define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, view, {.ui = 1 << TAG}}, \ {MODKEY, KEY, view, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
{MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \ {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG}}, \ {MODKEY | Mod4Mask, KEY, tagnextmon, {.ui = 1 << TAG}}, \
{MODKEY | Mod4Mask | ControlMask, KEY, tagprevmon, {.ui = 1 << TAG}}, {MODKEY | Mod4Mask | ControlMask, KEY, tagprevmon, {.ui = 1 << TAG}},
#else #else
#define TAGKEYS(KEY, TAG) \ #define TAGKEYS(KEY, TAG) \
{MODKEY, KEY, view, {.ui = 1 << TAG}}, \ {MODKEY, KEY, view, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \ {MODKEY | ControlMask, KEY, toggleview, {.ui = 1 << TAG}}, \
{MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \ {MODKEY | ShiftMask, KEY, tag, {.ui = 1 << TAG}}, \
{MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}}, {MODKEY | ControlMask | ShiftMask, KEY, toggletag, {.ui = 1 << TAG}},
#endif // COMBO_PATCH / SWAPTAGS_PATCH / TAGOTHERMONITOR_PATCH #endif // COMBO_PATCH / SWAPTAGS_PATCH / TAGOTHERMONITOR_PATCH
#if STACKER_PATCH #if STACKER_PATCH
#define STACKKEYS(MOD, ACTION) \ #define STACKKEYS(MOD, ACTION) \
{MOD, XK_j, ACTION##stack, {.i = INC(+1)}}, \ {MOD, XK_j, ACTION##stack, {.i = INC(+1)}}, \
{MOD, XK_k, ACTION##stack, {.i = INC(-1)}}, \ {MOD, XK_k, ACTION##stack, {.i = INC(-1)}}, \
{MOD, XK_s, ACTION##stack, {.i = PREVSEL}}, \ {MOD, XK_s, ACTION##stack, {.i = PREVSEL}}, \
{MOD, XK_w, ACTION##stack, {.i = 0}}, \ {MOD, XK_w, ACTION##stack, {.i = 0}}, \
{MOD, XK_e, ACTION##stack, {.i = 1}}, \ {MOD, XK_e, ACTION##stack, {.i = 1}}, \
{MOD, XK_a, ACTION##stack, {.i = 2}}, \ {MOD, XK_a, ACTION##stack, {.i = 2}}, \
{MOD, XK_z, ACTION##stack, {.i = -1}}, {MOD, XK_z, ACTION##stack, {.i = -1}},
#endif // STACKER_PATCH #endif // STACKER_PATCH
#if BAR_HOLDBAR_PATCH #if BAR_HOLDBAR_PATCH
@@ -1680,7 +1685,7 @@ static const Key keys[] = {
{Mod3Mask | Mod1Mask, XK_m, floatpos, {.v = "-1p 1p"}}, // ↙ {Mod3Mask | Mod1Mask, XK_m, floatpos, {.v = "-1p 1p"}}, // ↙
{Mod3Mask | Mod1Mask, XK_comma, floatpos, {.v = " 0p 1p"}}, // ↓ {Mod3Mask | Mod1Mask, XK_comma, floatpos, {.v = " 0p 1p"}}, // ↓
{Mod3Mask | Mod1Mask, XK_period, floatpos, {.v = " 1p 1p"}}, // ↘ {Mod3Mask | Mod1Mask, XK_period, floatpos, {.v = " 1p 1p"}}, // ↘
#endif // FLOATPOS_PATCH #endif // FLOATPOS_PATCH
#if SETBORDERPX_PATCH #if SETBORDERPX_PATCH
{MODKEY | ControlMask, XK_minus, setborderpx, {.i = -1}}, {MODKEY | ControlMask, XK_minus, setborderpx, {.i = -1}},
{MODKEY | ControlMask, XK_plus, setborderpx, {.i = +1}}, {MODKEY | ControlMask, XK_plus, setborderpx, {.i = +1}},
@@ -1689,6 +1694,8 @@ static const Key keys[] = {
#if CYCLELAYOUTS_PATCH #if CYCLELAYOUTS_PATCH
{MODKEY | ControlMask, XK_comma, cyclelayout, {.i = -1}}, {MODKEY | ControlMask, XK_comma, cyclelayout, {.i = -1}},
{MODKEY | ControlMask, XK_period, cyclelayout, {.i = +1}}, {MODKEY | ControlMask, XK_period, cyclelayout, {.i = +1}},
{MODKEY, XK_grave, cyclelayout, {.i = +1}},
{MODKEY | ShiftMask, XK_grave, cyclelayout, {.i = -1}},
#endif // CYCLELAYOUTS_PATCH #endif // CYCLELAYOUTS_PATCH
#if MPDCONTROL_PATCH #if MPDCONTROL_PATCH
{MODKEY, XK_F1, mpdchange, {.i = -1}}, {MODKEY, XK_F1, mpdchange, {.i = -1}},

0
patch/dwmc Executable file → Normal file
View File

0
patch/layoutmenu.sh Executable file → Normal file
View File

File diff suppressed because it is too large Load Diff

0
rebuild.sh Executable file → Normal file
View File