Split up statusbutton into seperate patches
This commit is contained in:
parent
8a215d997e
commit
57a05555f3
|
@ -564,10 +564,12 @@ static const BarRule barrules[] = {
|
||||||
/* monitor bar alignment widthfunc drawfunc clickfunc hoverfunc name */
|
/* monitor bar alignment widthfunc drawfunc clickfunc hoverfunc name */
|
||||||
#if BAR_STATUSBUTTON_PATCH
|
#if BAR_STATUSBUTTON_PATCH
|
||||||
{ -1, 0, BAR_ALIGN_LEFT, width_stbutton, draw_stbutton, click_stbutton, NULL, "statusbutton" },
|
{ -1, 0, BAR_ALIGN_LEFT, width_stbutton, draw_stbutton, click_stbutton, NULL, "statusbutton" },
|
||||||
{ -1, 1, BAR_ALIGN_LEFT, width_stbutton2, draw_stbutton2, click_stbutton2, NULL, "statusbutton2" },
|
|
||||||
{ -1, 1, BAR_ALIGN_LEFT, width_stbutton3, draw_stbutton3, click_stbutton3, NULL, "statusbutton3" },
|
|
||||||
{ -1, 1, BAR_ALIGN_LEFT, width_stbutton4, draw_stbutton4, click_stbutton4, NULL, "statusbutton4" },
|
|
||||||
#endif // BAR_STATUSBUTTON_PATCH
|
#endif // BAR_STATUSBUTTON_PATCH
|
||||||
|
#if BAR_DOCKBUTTONS_PATCH
|
||||||
|
{ -1, 1, BAR_ALIGN_LEFT, width_dcbutton, draw_dcbutton, click_dcbutton, NULL, "dockbutton" },
|
||||||
|
{ -1, 1, BAR_ALIGN_LEFT, width_dcbutton2, draw_dcbutton2, click_dcbutton2, NULL, "dockbutton2" },
|
||||||
|
{ -1, 1, BAR_ALIGN_LEFT, width_dcbutton3, draw_dcbutton3, click_dcbutton3, NULL, "dockbutton3" },
|
||||||
|
#endif // BAR_DOCKBUTTONS_PATCH
|
||||||
#if BAR_TAGGRID_PATCH
|
#if BAR_TAGGRID_PATCH
|
||||||
{ -1, 0, BAR_ALIGN_LEFT, width_taggrid, draw_taggrid, click_taggrid, NULL, "taggrid" },
|
{ -1, 0, BAR_ALIGN_LEFT, width_taggrid, draw_taggrid, click_taggrid, NULL, "taggrid" },
|
||||||
#endif // BAR_TAGGRID_PATCH
|
#endif // BAR_TAGGRID_PATCH
|
||||||
|
@ -580,12 +582,14 @@ static const BarRule barrules[] = {
|
||||||
#if BAR_TAGLABELS_PATCH
|
#if BAR_TAGLABELS_PATCH
|
||||||
{ -1, 0, BAR_ALIGN_LEFT, width_taglabels, draw_taglabels, click_taglabels, hover_taglabels, "taglabels" },
|
{ -1, 0, BAR_ALIGN_LEFT, width_taglabels, draw_taglabels, click_taglabels, hover_taglabels, "taglabels" },
|
||||||
#endif // BAR_TAGLABELS_PATCH
|
#endif // BAR_TAGLABELS_PATCH
|
||||||
#if BAR_STATUSBUTTON_PATCH
|
#if BAR_POWERBUTTON_PATCH
|
||||||
{ -1, 0, BAR_ALIGN_RIGHT, width_stbutton5, draw_stbutton5, click_stbutton5, NULL, "statusbutton5" },
|
{ -1, 0, BAR_ALIGN_RIGHT, width_powbutton, draw_powbutton, click_powbutton, NULL, "powerbutton" },
|
||||||
{ -1, 1, BAR_ALIGN_RIGHT, width_stbutton6, draw_stbutton6, click_stbutton6, NULL, "statusbutton6" },
|
#endif // BAR_POWERBUTTON_PATCH
|
||||||
{ -1, 1, BAR_ALIGN_RIGHT, width_stbutton7, draw_stbutton7, click_stbutton7, NULL, "statusbutton7" },
|
#if BAR_WINCONTROLBUTTONS_PATCH
|
||||||
{ -1, 1, BAR_ALIGN_RIGHT, width_stbutton8, draw_stbutton8, click_stbutton8, NULL, "statusbutton8" },
|
{ -1, 1, BAR_ALIGN_RIGHT, width_winbutton, draw_winbutton, click_winbutton, NULL, "statusbutton6" },
|
||||||
#endif // BAR_STATUSBUTTON_PATCH
|
{ -1, 1, BAR_ALIGN_RIGHT, width_winbutton2, draw_winbutton2, click_winbutton2, NULL, "statusbutton7" },
|
||||||
|
{ -1, 1, BAR_ALIGN_RIGHT, width_winbutton3, draw_winbutton3, click_winbutton3, NULL, "statusbutton8" },
|
||||||
|
#endif // BAR_WINCONTROLBUTTONS_PATCH
|
||||||
#if BAR_SYSTRAY_PATCH
|
#if BAR_SYSTRAY_PATCH
|
||||||
{ 0, 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, NULL, "systray" },
|
{ 0, 0, BAR_ALIGN_RIGHT, width_systray, draw_systray, click_systray, NULL, "systray" },
|
||||||
#endif // BAR_SYSTRAY_PATCH
|
#endif // BAR_SYSTRAY_PATCH
|
||||||
|
@ -1404,7 +1408,7 @@ static const Command commands[] = {
|
||||||
|
|
||||||
/* button definitions */
|
/* button definitions */
|
||||||
#if STATUSBUTTON_PATCH
|
#if STATUSBUTTON_PATCH
|
||||||
/* click can be ClkButton, ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
/* click can be ClkButton*, ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||||
#else
|
#else
|
||||||
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
/* click can be ClkTagBar, ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
|
||||||
#endif //
|
#endif //
|
||||||
|
@ -1414,17 +1418,23 @@ static const Button buttons[] = {
|
||||||
{ ClkButton, 0, Button1, spawn, SHCMD("spmenu_run -d -a '-g 4 -l 10'") /* use spmenu instead of dmenu */ },
|
{ ClkButton, 0, Button1, spawn, SHCMD("spmenu_run -d -a '-g 4 -l 10'") /* use spmenu instead of dmenu */ },
|
||||||
{ ClkButton, 0, Button2, spawn, {.v = dmenucmd } /* launch dmenu instead if middle-clicked*/ },
|
{ ClkButton, 0, Button2, spawn, {.v = dmenucmd } /* launch dmenu instead if middle-clicked*/ },
|
||||||
{ ClkButton, 0, Button3, spawn, SHCMD("jgmenu_run apps | jgmenu --simple --at-pointer") /* launch jgmenu on right click */ },
|
{ ClkButton, 0, Button3, spawn, SHCMD("jgmenu_run apps | jgmenu --simple --at-pointer") /* launch jgmenu on right click */ },
|
||||||
|
#endif // BAR_STATUSBUTTON_PATCH
|
||||||
|
#if BAR_DOCKBUTTONS_PATCH
|
||||||
{ ClkButton2, 0, Button1, spawn, {.v = termcmd } },
|
{ ClkButton2, 0, Button1, spawn, {.v = termcmd } },
|
||||||
{ ClkButton2, 0, Button3, spawn, SHCMD("printf ' New tabbed session, tabbed -c -r 2 st -w \"\"\n New dvtm session, st -T dvtm abduco -c dvtm dvtm-status\n' | jgmenu --simple --at-pointer") },
|
{ ClkButton2, 0, Button3, spawn, SHCMD("printf ' New tabbed session, tabbed -c -r 2 st -w \"\"\n New dvtm session, st -T dvtm abduco -c dvtm dvtm-status\n' | jgmenu --simple --at-pointer") },
|
||||||
{ ClkButton3, 0, Button1, spawn, SHCMD("firefox") },
|
{ ClkButton3, 0, Button1, spawn, SHCMD("firefox") },
|
||||||
{ ClkButton3, 0, Button3, spawn, SHCMD("printf ' New Window, firefox\n New Private Window, firefox -private-window\n' | jgmenu --simple --at-pointer") },
|
{ ClkButton3, 0, Button3, spawn, SHCMD("printf ' New Window, firefox\n New Private Window, firefox -private-window\n' | jgmenu --simple --at-pointer") },
|
||||||
{ ClkButton4, 0, Button1, spawn, SHCMD("st -T ncmpcpp ncmpcpp") },
|
{ ClkButton4, 0, Button1, spawn, SHCMD("st -T ncmpcpp ncmpcpp") },
|
||||||
{ ClkButton4, 0, Button3, spawn, SHCMD("printf ' Previous Song, mpc prev\n Play, mpc play\n Pause, mpc pause\n Stop, mpc stop\n Next Song, mpc next\n Vol +5%%,mpc vol +5\n Vol -5%%, mpc vol -5\n' | jgmenu --simple --at-pointer") },
|
{ ClkButton4, 0, Button3, spawn, SHCMD("printf ' Previous Song, mpc prev\n Play, mpc play\n Pause, mpc pause\n Stop, mpc stop\n Next Song, mpc next\n Vol +5%%,mpc vol +5\n Vol -5%%, mpc vol -5\n' | jgmenu --simple --at-pointer") },
|
||||||
|
#endif // BAR_DOCKBUTTONS_PATCH
|
||||||
|
#if BAR_POWERBUTTON_PATCH
|
||||||
{ ClkButton5, 0, Button1, spawn, SHCMD("shutdown") },
|
{ ClkButton5, 0, Button1, spawn, SHCMD("shutdown") },
|
||||||
|
#endif // BAR_POWERBUTTON_PATCH
|
||||||
|
#if BAR_WINCONTROLBUTTONS_PATCH
|
||||||
{ ClkButton6, 0, Button1, killclient, {0} },
|
{ ClkButton6, 0, Button1, killclient, {0} },
|
||||||
{ ClkButton7, 0, Button1, togglemax, {0} },
|
{ ClkButton7, 0, Button1, togglemax, {0} },
|
||||||
{ ClkButton8, 0, Button1, showhideclient, {0} },
|
{ ClkButton8, 0, Button1, showhideclient, {0} },
|
||||||
#endif // BAR_STATUSBUTTON_PATCH
|
#endif // BAR_WINCONTROLBUTTONS_PATCH
|
||||||
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
{ ClkLtSymbol, 0, Button1, setlayout, {0} },
|
||||||
#if BAR_LAYOUTMENU_PATCH
|
#if BAR_LAYOUTMENU_PATCH
|
||||||
{ ClkLtSymbol, 0, Button3, layoutmenu, {0} },
|
{ ClkLtSymbol, 0, Button3, layoutmenu, {0} },
|
||||||
|
|
|
@ -232,14 +232,20 @@ enum {
|
||||||
enum {
|
enum {
|
||||||
#if BAR_STATUSBUTTON_PATCH
|
#if BAR_STATUSBUTTON_PATCH
|
||||||
ClkButton,
|
ClkButton,
|
||||||
|
#endif // BAR_STATUSBUTTON_PATCH
|
||||||
|
#if BAR_DOCKBUTTONS_PATCH
|
||||||
ClkButton2,
|
ClkButton2,
|
||||||
ClkButton3,
|
ClkButton3,
|
||||||
ClkButton4,
|
ClkButton4,
|
||||||
|
#endif // BAR_DOCKBUTTONS_PATCH
|
||||||
|
#if BAR_POWERBUTTON_PATCH
|
||||||
ClkButton5,
|
ClkButton5,
|
||||||
|
#endif // BAR_POWERBUTTON_PATCH
|
||||||
|
#if BAR_WINCONTROLBUTTONS_PATCH
|
||||||
ClkButton6,
|
ClkButton6,
|
||||||
ClkButton7,
|
ClkButton7,
|
||||||
ClkButton8,
|
ClkButton8,
|
||||||
#endif // BAR_STATUSBUTTON_PATCH
|
#endif // BAR_WINCONTROLBUTTONS_PATCH
|
||||||
#if TAB_PATCH
|
#if TAB_PATCH
|
||||||
ClkTabBar,
|
ClkTabBar,
|
||||||
#endif // TAB_PATCH
|
#endif // TAB_PATCH
|
||||||
|
|
51
dwm-flexipatch/patch/bar_dockbutton.c
Normal file
51
dwm-flexipatch/patch/bar_dockbutton.c
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
int
|
||||||
|
width_dcbutton(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return TEXTW(buttonbar2);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
draw_dcbutton(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar2, 0, False);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
click_dcbutton(Bar *bar, Arg *arg, BarArg *a)
|
||||||
|
{
|
||||||
|
return ClkButton2;
|
||||||
|
}
|
||||||
|
int
|
||||||
|
width_dcbutton2(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return TEXTW(buttonbar3);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
draw_dcbutton2(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar3, 0, False);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
click_dcbutton2(Bar *bar, Arg *arg, BarArg *a)
|
||||||
|
{
|
||||||
|
return ClkButton3;
|
||||||
|
}
|
||||||
|
int
|
||||||
|
width_dcbutton3(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return TEXTW(buttonbar4);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
draw_dcbutton3(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar4, 0, False);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
click_dcbutton3(Bar *bar, Arg *arg, BarArg *a)
|
||||||
|
{
|
||||||
|
return ClkButton4;
|
||||||
|
}
|
9
dwm-flexipatch/patch/bar_dockbutton.h
Normal file
9
dwm-flexipatch/patch/bar_dockbutton.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
static int width_dcbutton(Bar *bar, BarArg *a);
|
||||||
|
static int draw_dcbutton(Bar *bar, BarArg *a);
|
||||||
|
static int click_dcbutton(Bar *bar, Arg *arg, BarArg *a);
|
||||||
|
static int width_dcbutton2(Bar *bar, BarArg *a);
|
||||||
|
static int draw_dcbutton2(Bar *bar, BarArg *a);
|
||||||
|
static int click_dcbutton2(Bar *bar, Arg *arg, BarArg *a);
|
||||||
|
static int width_dcbutton3(Bar *bar, BarArg *a);
|
||||||
|
static int draw_dcbutton3(Bar *bar, BarArg *a);
|
||||||
|
static int click_dcbutton3(Bar *bar, Arg *arg, BarArg *a);
|
17
dwm-flexipatch/patch/bar_powerbutton.c
Normal file
17
dwm-flexipatch/patch/bar_powerbutton.c
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
int
|
||||||
|
width_powbutton(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return TEXTW(buttonbar5);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
draw_powbutton(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 20, buttonbar5, 0, False);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
click_powbutton(Bar *bar, Arg *arg, BarArg *a)
|
||||||
|
{
|
||||||
|
return ClkButton5;
|
||||||
|
}
|
3
dwm-flexipatch/patch/bar_powerbutton.h
Normal file
3
dwm-flexipatch/patch/bar_powerbutton.h
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
static int width_powbutton(Bar *bar, BarArg *a);
|
||||||
|
static int draw_powbutton(Bar *bar, BarArg *a);
|
||||||
|
static int click_powbutton(Bar *bar, Arg *arg, BarArg *a);
|
|
@ -15,123 +15,4 @@ click_stbutton(Bar *bar, Arg *arg, BarArg *a)
|
||||||
{
|
{
|
||||||
return ClkButton;
|
return ClkButton;
|
||||||
}
|
}
|
||||||
/* modification by Lucas-mother3 to add more buttons */
|
|
||||||
int
|
|
||||||
width_stbutton2(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return TEXTW(buttonbar2);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
draw_stbutton2(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar2, 0, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
click_stbutton2(Bar *bar, Arg *arg, BarArg *a)
|
|
||||||
{
|
|
||||||
return ClkButton2;
|
|
||||||
}
|
|
||||||
int
|
|
||||||
width_stbutton3(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return TEXTW(buttonbar3);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
draw_stbutton3(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar3, 0, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
click_stbutton3(Bar *bar, Arg *arg, BarArg *a)
|
|
||||||
{
|
|
||||||
return ClkButton3;
|
|
||||||
}
|
|
||||||
int
|
|
||||||
width_stbutton4(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return TEXTW(buttonbar4);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
draw_stbutton4(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar4, 0, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
click_stbutton4(Bar *bar, Arg *arg, BarArg *a)
|
|
||||||
{
|
|
||||||
return ClkButton4;
|
|
||||||
}
|
|
||||||
int
|
|
||||||
width_stbutton5(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return TEXTW(buttonbar5);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
draw_stbutton5(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 20, buttonbar5, 0, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
click_stbutton5(Bar *bar, Arg *arg, BarArg *a)
|
|
||||||
{
|
|
||||||
return ClkButton5;
|
|
||||||
}
|
|
||||||
int
|
|
||||||
width_stbutton6(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return TEXTW(buttonbar6);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
draw_stbutton6(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar6, 0, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
click_stbutton6(Bar *bar, Arg *arg, BarArg *a)
|
|
||||||
{
|
|
||||||
return ClkButton6;
|
|
||||||
}
|
|
||||||
int
|
|
||||||
width_stbutton7(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return TEXTW(buttonbar7);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
draw_stbutton7(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar7, 0, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
click_stbutton7(Bar *bar, Arg *arg, BarArg *a)
|
|
||||||
{
|
|
||||||
return ClkButton7;
|
|
||||||
}
|
|
||||||
int
|
|
||||||
width_stbutton8(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return TEXTW(buttonbar8);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
draw_stbutton8(Bar *bar, BarArg *a)
|
|
||||||
{
|
|
||||||
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar8, 0, False);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
click_stbutton8(Bar *bar, Arg *arg, BarArg *a)
|
|
||||||
{
|
|
||||||
return ClkButton8;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,24 +1,3 @@
|
||||||
static int width_stbutton(Bar *bar, BarArg *a);
|
static int width_stbutton(Bar *bar, BarArg *a);
|
||||||
static int draw_stbutton(Bar *bar, BarArg *a);
|
static int draw_stbutton(Bar *bar, BarArg *a);
|
||||||
static int click_stbutton(Bar *bar, Arg *arg, BarArg *a);
|
static int click_stbutton(Bar *bar, Arg *arg, BarArg *a);
|
||||||
static int width_stbutton2(Bar *bar, BarArg *a);
|
|
||||||
static int draw_stbutton2(Bar *bar, BarArg *a);
|
|
||||||
static int click_stbutton2(Bar *bar, Arg *arg, BarArg *a);
|
|
||||||
static int width_stbutton3(Bar *bar, BarArg *a);
|
|
||||||
static int draw_stbutton3(Bar *bar, BarArg *a);
|
|
||||||
static int click_stbutton3(Bar *bar, Arg *arg, BarArg *a);
|
|
||||||
static int width_stbutton4(Bar *bar, BarArg *a);
|
|
||||||
static int draw_stbutton4(Bar *bar, BarArg *a);
|
|
||||||
static int click_stbutton4(Bar *bar, Arg *arg, BarArg *a);
|
|
||||||
static int width_stbutton5(Bar *bar, BarArg *a);
|
|
||||||
static int draw_stbutton5(Bar *bar, BarArg *a);
|
|
||||||
static int click_stbutton5(Bar *bar, Arg *arg, BarArg *a);
|
|
||||||
static int width_stbutton6(Bar *bar, BarArg *a);
|
|
||||||
static int draw_stbutton6(Bar *bar, BarArg *a);
|
|
||||||
static int click_stbutton6(Bar *bar, Arg *arg, BarArg *a);
|
|
||||||
static int width_stbutton7(Bar *bar, BarArg *a);
|
|
||||||
static int draw_stbutton7(Bar *bar, BarArg *a);
|
|
||||||
static int click_stbutton7(Bar *bar, Arg *arg, BarArg *a);
|
|
||||||
static int width_stbutton8(Bar *bar, BarArg *a);
|
|
||||||
static int draw_stbutton8(Bar *bar, BarArg *a);
|
|
||||||
static int click_stbutton8(Bar *bar, Arg *arg, BarArg *a);
|
|
||||||
|
|
51
dwm-flexipatch/patch/bar_wincontrolbutton.c
Normal file
51
dwm-flexipatch/patch/bar_wincontrolbutton.c
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
int
|
||||||
|
width_winbutton(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return TEXTW(buttonbar6);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
draw_winbutton(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar6, 0, False);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
click_winbutton(Bar *bar, Arg *arg, BarArg *a)
|
||||||
|
{
|
||||||
|
return ClkButton6;
|
||||||
|
}
|
||||||
|
int
|
||||||
|
width_winbutton2(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return TEXTW(buttonbar7);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
draw_winbutton2(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar7, 0, False);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
click_winbutton2(Bar *bar, Arg *arg, BarArg *a)
|
||||||
|
{
|
||||||
|
return ClkButton7;
|
||||||
|
}
|
||||||
|
int
|
||||||
|
width_winbutton3(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return TEXTW(buttonbar8);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
draw_winbutton3(Bar *bar, BarArg *a)
|
||||||
|
{
|
||||||
|
return drw_text(drw, a->x, a->y, a->w, a->h, lrpad / 2, buttonbar8, 0, False);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
click_winbutton3(Bar *bar, Arg *arg, BarArg *a)
|
||||||
|
{
|
||||||
|
return ClkButton8;
|
||||||
|
}
|
9
dwm-flexipatch/patch/bar_wincontrolbutton.h
Normal file
9
dwm-flexipatch/patch/bar_wincontrolbutton.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
static int width_winbutton(Bar *bar, BarArg *a);
|
||||||
|
static int draw_winbutton(Bar *bar, BarArg *a);
|
||||||
|
static int click_winbutton(Bar *bar, Arg *arg, BarArg *a);
|
||||||
|
static int width_winbutton2(Bar *bar, BarArg *a);
|
||||||
|
static int draw_winbutton2(Bar *bar, BarArg *a);
|
||||||
|
static int click_winbutton2(Bar *bar, Arg *arg, BarArg *a);
|
||||||
|
static int width_winbutton3(Bar *bar, BarArg *a);
|
||||||
|
static int draw_winbutton3(Bar *bar, BarArg *a);
|
||||||
|
static int click_winbutton3(Bar *bar, Arg *arg, BarArg *a);
|
|
@ -395,4 +395,12 @@
|
||||||
#if TILE_LAYOUT
|
#if TILE_LAYOUT
|
||||||
#include "layout_tile.c"
|
#include "layout_tile.c"
|
||||||
#endif
|
#endif
|
||||||
|
#if BAR_DOCKBUTTONS_PATCH
|
||||||
|
#include "bar_dockbutton.c"
|
||||||
|
#endif
|
||||||
|
#if BAR_POWERBUTTON_PATCH
|
||||||
|
#include "bar_powerbutton.c"
|
||||||
|
#endif
|
||||||
|
#if BAR_WINCONTROLBUTTONS_PATCH
|
||||||
|
#include "bar_wincontrolbutton.c"
|
||||||
|
#endif
|
||||||
|
|
|
@ -388,4 +388,12 @@
|
||||||
#if TILE_LAYOUT
|
#if TILE_LAYOUT
|
||||||
#include "layout_tile.h"
|
#include "layout_tile.h"
|
||||||
#endif
|
#endif
|
||||||
|
#if BAR_DOCKBUTTONS_PATCH
|
||||||
|
#include "bar_dockbutton.h"
|
||||||
|
#endif
|
||||||
|
#if BAR_POWERBUTTON_PATCH
|
||||||
|
#include "bar_powerbutton.h"
|
||||||
|
#endif
|
||||||
|
#if BAR_WINCONTROLBUTTONS_PATCH
|
||||||
|
#include "bar_wincontrolbutton.h"
|
||||||
|
#endif
|
||||||
|
|
|
@ -1469,3 +1469,25 @@
|
||||||
* This can be optionally disabled in favour of other layouts.
|
* This can be optionally disabled in favour of other layouts.
|
||||||
*/
|
*/
|
||||||
#define MONOCLE_LAYOUT 1
|
#define MONOCLE_LAYOUT 1
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Specific build patches
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Additional status buttons for the taskbar/bottom bar.
|
||||||
|
* This can be an alternative for dockbar programs.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BAR_DOCKBUTTONS_PATCH 1
|
||||||
|
|
||||||
|
/* A simple power button for dwm.
|
||||||
|
* Uses jgmenu, and a script handling the commands.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BAR_POWERBUTTON_PATCH 1
|
||||||
|
|
||||||
|
/* Decorative window control buttons for dwm.
|
||||||
|
* Depends on the MAXIMIZE patch.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define BAR_WINCONTROLBUTTONS_PATCH 1
|
||||||
|
|
Loading…
Reference in a new issue