Modularize reparent logic

This commit is contained in:
Alexis Jhon Gaspar 2023-10-26 23:19:45 +08:00
parent b4de31eec5
commit d670ff15ad
2 changed files with 14 additions and 2 deletions

View file

@ -41,6 +41,7 @@ static Bool npisrelative = False;
} \
}
#if REPARENT_PATCH
/* Modify the following line to match your terminal and software list */
#define OPENTERMSOFT(p) { \
.v = (char *[]){ "/bin/sh", "-c", \
@ -230,6 +231,8 @@ static Bool npisrelative = False;
} \
}
#endif // REPARENT_PATCH
#if XRESOURCES_PATCH
/*
* Xresources preferences to load at startup
@ -239,7 +242,7 @@ ResourcePref resources[] = {
{ "color0", STRING, &normbgcolor },
{ "color4", STRING, &normfgcolor },
{ "color4", STRING, &selbgcolor },
{ "color7", STRING, &selfgcolor },
{ "color0", STRING, &selfgcolor },
{ "color2", STRING, &urgbgcolor },
{ "color3", STRING, &urgfgcolor },
};
@ -305,7 +308,7 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_u, toggle, { .v = (void*) &urgentswitch } },
{ 0, XK_F11, fullscreen, { 0 } },
/* Unique functionality */
#if REPARENT_PATCH
{ MODKEY|ShiftMask, XK_m, spawn, OPENTERMSOFT("_TABBED_SELECT_TERMAPP") },
{ MODKEY|ShiftMask, XK_u, spawn, OPENTERM("_TABBED_TERM") },
{ MODKEY|ShiftMask, XK_a, spawn, ATTACHWIN("_TABBED_ATTACH_WIN") },
@ -317,6 +320,7 @@ static const Key keys[] = {
{ MODKEY|ShiftMask, XK_w, spawn, HIDEWINDOW("_TABBED_HIDE_WINDOW") },
{ MODKEY|ShiftMask, XK_r, spawn, SHOWHIDDEN("_TABBED_SHOW_HIDDEN") },
{ MODKEY|ShiftMask, XK_q, spawn, SHOWHIDDENALL("_TABBED_SHOW_HIDDEN_ALL") },
#endif // REPARENT_PATCH
#if HIDETABS_PATCH
{ MODKEY, XK_Shift_L, showbar, { .i = 1 } },
{ ShiftMask, XK_Control_L, showbar, { .i = 1 } },

View file

@ -77,6 +77,14 @@
*/
#define KEYRELEASE_PATCH 0
/* This patch/plugin enables for reparenting windows in tabbed.
* Ported from tabbed-hjc. This is designed only in this build, and is not available
* under tabbed-flexipatch from upstream.
* https://www.reddit.com/r/suckless/comments/gl5cw6/easiest_way_to_tab_basically_any_program/
* https://github.com/huijunchen9260/tabbed-hjc
*/
#define REPARENT_PATCH 1
/* This patch allows tabbed colors to be defined via Xresources.
* https://tools.suckless.org/tabbed/patches/xresources/
*/