mirror of
https://github.com/mintycube/dwm.git
synced 2024-10-22 14:05:45 +02:00
ipc: adding function/signal bindings
This commit is contained in:
parent
95611ca0bd
commit
b3e6e3531b
@ -15,7 +15,9 @@ Refer to [https://dwm.suckless.org/](https://dwm.suckless.org/) for details on t
|
||||
|
||||
### Changelog:
|
||||
|
||||
2020-09-07 - Scratchpads improvement (multi-monitor support). Added ipc v1.5.5 patch.
|
||||
2020-09-08 - Added ipc v1.5.5 patch
|
||||
|
||||
2020-09-07 - Scratchpads improvement (multi-monitor support)
|
||||
|
||||
2020-09-05 - Assortment of fullscreen improvements
|
||||
|
||||
|
503
config.def.h
503
config.def.h
@ -483,178 +483,6 @@ static const BarRule barrules[] = {
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
#if DWMC_PATCH
|
||||
/* signal definitions */
|
||||
/* 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 },
|
||||
#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 KEYMODES_PATCH
|
||||
{ "setkeymode", setkeymode },
|
||||
#endif // KEYMODES_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 },
|
||||
{ "setgaps", setgapsex },
|
||||
#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 BAR_TAGGRID_PATCH
|
||||
{ "switchtag", switchtag },
|
||||
#endif // BAR_TAGGRID_PATCH
|
||||
#if STICKY_PATCH
|
||||
{ "togglesticky", togglesticky },
|
||||
#endif // STICKY_PATCH
|
||||
#if SETBORDERPX_PATCH
|
||||
{ "setborderpx", setborderpx },
|
||||
#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 BAR_ALTERNATIVE_TAGS_PATCH
|
||||
{ "togglealttag", togglealttag },
|
||||
#endif // BAR_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 SCRATCHPADS_PATCH
|
||||
{ "togglescratch", togglescratch },
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
#if UNFLOATVISIBLE_PATCH
|
||||
{ "unfloatvisible", unfloatvisible },
|
||||
#endif // UNFLOATVISIBLE_PATCH
|
||||
{ "killclient", killclient },
|
||||
#if WINVIEW_PATCH
|
||||
{ "winview", winview },
|
||||
#endif // WINVIEW_PATCH
|
||||
#if XRDB_PATCH && !BAR_VTCOLORS_PATCH
|
||||
{ "xrdb", xrdb },
|
||||
#endif // XRDB_PATCH
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
{ "tagnextmonex", tagnextmonex },
|
||||
{ "tagprevmonex", tagprevmonex },
|
||||
#endif // TAGOTHERMONITOR_PATCH
|
||||
{ "quit", quit },
|
||||
{ "setlayout", setlayout },
|
||||
{ "setlayoutex", setlayoutex },
|
||||
};
|
||||
#elif FSIGNAL_PATCH
|
||||
/* signal definitions */
|
||||
/* signum must be greater than 0 */
|
||||
/* trigger signals using `xsetroot -name "fsignal:<signum>"` */
|
||||
static Signal signals[] = {
|
||||
/* signum function argument */
|
||||
{ 1, setlayout, {.v = 0} },
|
||||
};
|
||||
#endif // DWMC_PATCH
|
||||
|
||||
/* layout(s) */
|
||||
static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
|
||||
static const int nmaster = 1; /* number of clients in master area */
|
||||
@ -1309,22 +1137,335 @@ static Button buttons[] = {
|
||||
{ ClkTagBar, MODKEY, Button3, toggletag, {0} },
|
||||
};
|
||||
|
||||
#if DWMC_PATCH
|
||||
/* signal definitions */
|
||||
/* 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 },
|
||||
#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 KEYMODES_PATCH
|
||||
{ "setkeymode", setkeymode },
|
||||
#endif // KEYMODES_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 },
|
||||
{ "setgaps", setgapsex },
|
||||
#endif // VANITYGAPS_PATCH
|
||||
{ "view", view },
|
||||
{ "viewall", viewallex },
|
||||
{ "viewex", viewex },
|
||||
{ "toggleview", toggleview },
|
||||
#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 BAR_TAGGRID_PATCH
|
||||
{ "switchtag", switchtag },
|
||||
#endif // BAR_TAGGRID_PATCH
|
||||
#if STICKY_PATCH
|
||||
{ "togglesticky", togglesticky },
|
||||
#endif // STICKY_PATCH
|
||||
#if SETBORDERPX_PATCH
|
||||
{ "setborderpx", setborderpx },
|
||||
#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", toggletag },
|
||||
{ "toggletagex", toggletagex },
|
||||
#if TAGALLMON_PATCH
|
||||
{ "tagallmon", tagallmon },
|
||||
#endif // TAGALLMON_PATCH
|
||||
#if TAGSWAPMON_PATCH
|
||||
{ "tagswapmon", tagswapmon},
|
||||
#endif // TAGSWAPMON_PATCH
|
||||
#if BAR_ALTERNATIVE_TAGS_PATCH
|
||||
{ "togglealttag", togglealttag },
|
||||
#endif // BAR_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 SCRATCHPADS_PATCH
|
||||
{ "togglescratch", togglescratch },
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
#if UNFLOATVISIBLE_PATCH
|
||||
{ "unfloatvisible", unfloatvisible },
|
||||
#endif // UNFLOATVISIBLE_PATCH
|
||||
{ "killclient", killclient },
|
||||
#if WINVIEW_PATCH
|
||||
{ "winview", winview },
|
||||
#endif // WINVIEW_PATCH
|
||||
#if XRDB_PATCH && !BAR_VTCOLORS_PATCH
|
||||
{ "xrdb", xrdb },
|
||||
#endif // XRDB_PATCH
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
{ "tagnextmonex", tagnextmonex },
|
||||
{ "tagprevmonex", tagprevmonex },
|
||||
#endif // TAGOTHERMONITOR_PATCH
|
||||
{ "quit", quit },
|
||||
{ "setlayout", setlayout },
|
||||
{ "setlayoutex", setlayoutex },
|
||||
};
|
||||
#elif FSIGNAL_PATCH
|
||||
/* signal definitions */
|
||||
/* signum must be greater than 0 */
|
||||
/* trigger signals using `xsetroot -name "fsignal:<signum>"` */
|
||||
static Signal signals[] = {
|
||||
/* signum function argument */
|
||||
{ 1, setlayout, {.v = 0} },
|
||||
};
|
||||
#endif // DWMC_PATCH
|
||||
|
||||
#if IPC_PATCH
|
||||
static const char *ipcsockpath = "/tmp/dwm.sock";
|
||||
static IPCCommand ipccommands[] = {
|
||||
IPCCOMMAND( view, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( toggleview, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( tag, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( toggletag, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( tagmon, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( focusmon, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( focusstack, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( zoom, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( incnmaster, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( killclient, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( togglefloating, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( setmfact, 1, {ARG_TYPE_FLOAT} ),
|
||||
IPCCOMMAND( quit, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( setlayoutsafe, 1, {ARG_TYPE_PTR} ),
|
||||
IPCCOMMAND( quit, 1, {ARG_TYPE_NONE} )
|
||||
IPCCOMMAND( setmfact, 1, {ARG_TYPE_FLOAT} ),
|
||||
IPCCOMMAND( setstatus, 1, {ARG_TYPE_STR} ),
|
||||
IPCCOMMAND( tag, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( tagmon, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( togglebar, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( togglefloating, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( toggletag, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( toggleview, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( view, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( zoom, 1, {ARG_TYPE_NONE} ),
|
||||
#if BAR_ALTERNATIVE_TAGS_PATCH
|
||||
IPCCOMMAND( togglealttag, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // BAR_ALTERNATIVE_TAGS_PATCH
|
||||
#if BAR_TAGGRID_PATCH
|
||||
IPCCOMMAND( switchtag, 1, {ARG_TYPE_UINT} ),
|
||||
#endif // BAR_TAGGRID_PATCH
|
||||
#if CFACTS_PATCH
|
||||
IPCCOMMAND( setcfact, 1, {ARG_TYPE_FLOAT} ),
|
||||
#endif // CFACTS_PATCH
|
||||
#if CYCLELAYOUTS_PATCH
|
||||
IPCCOMMAND( cyclelayout, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // CYCLELAYOUTS_PATCH
|
||||
#if EXRESIZE_PATCH
|
||||
IPCCOMMAND( explace, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( togglehorizontalexpand, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( toggleverticalexpand, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( togglemaximize, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // EXRESIZE_PATCH
|
||||
#if !FAKEFULLSCREEN_PATCH && FAKEFULLSCREEN_CLIENT_PATCH
|
||||
IPCCOMMAND( togglefakefullscreen, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // FAKEFULLSCREEN_CLIENT_PATCH
|
||||
#if FLOATPOS_PATCH
|
||||
IPCCOMMAND( floatpos, 1, {ARG_TYPE_STR} ),
|
||||
#endif // FLOATPOS_PATCH
|
||||
#if FULLSCREEN_PATCH
|
||||
IPCCOMMAND( fullscreen, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // FULLSCREEN_PATCH
|
||||
#if FLEXTILE_DELUXE_LAYOUT
|
||||
IPCCOMMAND( incnstack, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( rotatelayoutaxis, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( setlayoutaxisex, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( mirrorlayout, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // FLEXTILE_DELUXE_LAYOUT
|
||||
#if FOCUSURGENT_PATCH
|
||||
IPCCOMMAND( focusurgent, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // FOCUSURGENT_PATCH
|
||||
#if FOCUSADJACENTTAG_PATCH
|
||||
IPCCOMMAND( viewtoleft, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( viewtoright, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( tagtoleft, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( tagtoright, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( tagandviewtoleft, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( tagandviewtoright, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // FOCUSADJACENTTAG_PATCH
|
||||
#if INPLACEROTATE_PATCH
|
||||
IPCCOMMAND( inplacerotate, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // INPLACEROTATE_PATCH
|
||||
#if KEYMODES_PATCH
|
||||
IPCCOMMAND( setkeymode, 1, {ARG_TYPE_UINT} ),
|
||||
#endif // KEYMODES_PATCH
|
||||
#if MAXIMIZE_PATCH
|
||||
IPCCOMMAND( togglehorizontalmax, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( toggleverticalmax, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( togglemax, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // MAXIMIZE_PATCH
|
||||
#if MDPCONTROL_PATCH
|
||||
IPCCOMMAND( mpdchange, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( mpdcontrol, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // MDPCONTROL_PATCH
|
||||
#if MOVEPLACE_PATCH
|
||||
IPCCOMMAND( moveplace, 1, {ARG_TYPE_UINT} ),
|
||||
#endif // MOVEPLACE_PATCH
|
||||
#if MOVERESIZE_PATCH
|
||||
IPCCOMMAND( moveresize, 1, {ARG_TYPE_STR} ),
|
||||
#endif // MOVERESIZE_PATCH
|
||||
#if PUSH_PATCH || PUSH_NO_MASTER_PATCH
|
||||
IPCCOMMAND( pushdown, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( pushup, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // PUSH_PATCH / PUSH_NO_MASTER_PATCH
|
||||
#if ROTATESTACK_PATCH
|
||||
IPCCOMMAND( rotatestack, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // ROTATESTACK_PATCH
|
||||
#if SCRATCHPADS_PATCH
|
||||
IPCCOMMAND( togglescratch, 1, {ARG_TYPE_UINT} ),
|
||||
#endif // SCRATCHPADS_PATCH
|
||||
#if SELFRESTART_PATCH
|
||||
IPCCOMMAND( self_restart, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // SELFRESTART_PATCH
|
||||
#if SETBORDERPX_PATCH
|
||||
IPCCOMMAND( setborderpx, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // SETBORDERPX_PATCH
|
||||
#if SHIFTVIEW_PATCH
|
||||
IPCCOMMAND( shiftview, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // SHIFTVIEW_PATCH
|
||||
#if SHIFTVIEW_CLIENTS_PATCH
|
||||
IPCCOMMAND( shiftviewclients, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // SHIFTVIEW_CLIENTS_PATCH
|
||||
#if STACKER_PATCH
|
||||
IPCCOMMAND( pushstack, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // STACKER_PATCH
|
||||
#if STICKY_PATCH
|
||||
IPCCOMMAND( togglesticky, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // STICKY_PATCH
|
||||
#if SWAPFOCUS_PATCH && PERTAG_PATCH
|
||||
IPCCOMMAND( swapfocus, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // SWAPFOCUS_PATCH
|
||||
#if SWITCHCOL_PATCH
|
||||
IPCCOMMAND( switchcol, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // SWITCHCOL_PATCH
|
||||
#if TAGALLMON_PATCH
|
||||
IPCCOMMAND( tagallmon, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // TAGALLMON_PATCH
|
||||
#if TAGOTHERMONITOR_PATCH
|
||||
IPCCOMMAND( tagnextmonex, 1, {ARG_TYPE_UINT} ),
|
||||
IPCCOMMAND( tagprevmonex, 1, {ARG_TYPE_UINT} ),
|
||||
#endif // TAGOTHERMONITOR_PATCH
|
||||
#if TAGSWAPMON_PATCH
|
||||
IPCCOMMAND( tagswapmon, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // TAGSWAPMON_PATCH
|
||||
#if TOGGLEFULLSCREEN_PATCH
|
||||
IPCCOMMAND( togglefullscreen, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // TOGGLEFULLSCREEN_PATCH
|
||||
#if TRANSFER_PATCH
|
||||
IPCCOMMAND( transfer, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // TRANSFER_PATCH
|
||||
#if TRANSFER_ALL_PATCH
|
||||
IPCCOMMAND( transferall, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // TRANSFER_ALL_PATCH
|
||||
#if UNFLOATVISIBLE_PATCH
|
||||
IPCCOMMAND( unfloatvisible, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // UNFLOATVISIBLE_PATCH
|
||||
#if VANITYGAPS_PATCH
|
||||
IPCCOMMAND( incrgaps, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( incrigaps, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( incrogaps, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( incrihgaps, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( incrivgaps, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( incrohgaps, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( incrovgaps, 1, {ARG_TYPE_SINT} ),
|
||||
IPCCOMMAND( togglegaps, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( defaultgaps, 1, {ARG_TYPE_NONE} ),
|
||||
IPCCOMMAND( setgapsex, 1, {ARG_TYPE_SINT} ),
|
||||
#endif // VANITYGAPS_PATCH
|
||||
#if WINVIEW_PATCH
|
||||
IPCCOMMAND( winview, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // WINVIEW_PATCH
|
||||
#if XRDB_PATCH && !BAR_VTCOLORS_PATCH
|
||||
IPCCOMMAND( xrdb, 1, {ARG_TYPE_NONE} ),
|
||||
#endif // XRDB_PATCH
|
||||
};
|
||||
#endif // IPC_PATCH
|
41
patch/ipc.c
41
patch/ipc.c
@ -58,3 +58,44 @@ setupepoll(void)
|
||||
if (ipc_init(ipcsockpath, epoll_fd, ipccommands, LENGTH(ipccommands)) < 0)
|
||||
fputs("Failed to initialize IPC\n", stderr);
|
||||
}
|
||||
|
||||
void
|
||||
setstatus(const Arg *arg)
|
||||
{
|
||||
Monitor *m;
|
||||
#if BAR_EXTRASTATUS_PATCH
|
||||
if (arg->v == NULL) {
|
||||
strcpy(stext, "dwm-"VERSION);
|
||||
estext[0] = '\0';
|
||||
} else {
|
||||
strcpy(rawstext, arg->v);
|
||||
char *e = strchr(rawstext, statussep);
|
||||
if (e) {
|
||||
*e = '\0'; e++;
|
||||
#if BAR_STATUSCMD_PATCH
|
||||
strncpy(rawestext, e, sizeof(estext) - 1);
|
||||
copyvalidchars(estext, rawestext);
|
||||
#else
|
||||
strncpy(estext, e, sizeof(estext) - 1);
|
||||
#endif // BAR_STATUSCMD_PATCH
|
||||
} else {
|
||||
estext[0] = '\0';
|
||||
}
|
||||
#if BAR_STATUSCMD_PATCH
|
||||
copyvalidchars(stext, rawstext);
|
||||
#else
|
||||
strncpy(stext, rawstext, sizeof(stext) - 1);
|
||||
#endif // BAR_STATUSCMD_PATCH
|
||||
}
|
||||
#elif BAR_STATUSCMD_PATCH
|
||||
if (!gettextprop(root, XA_WM_NAME, rawstext, sizeof(rawstext)))
|
||||
strcpy(stext, "dwm-"VERSION);
|
||||
else
|
||||
copyvalidchars(stext, rawstext);
|
||||
#else
|
||||
if (!gettextprop(root, XA_WM_NAME, stext, sizeof(stext)))
|
||||
strcpy(stext, "dwm-"VERSION);
|
||||
#endif // BAR_EXTRASTATUS_PATCH | BAR_STATUSCMD_PATCH
|
||||
for (m = mons; m; m = m->next)
|
||||
drawbar(m);
|
||||
}
|
@ -3,3 +3,4 @@
|
||||
static int handlexevent(struct epoll_event *ev);
|
||||
static void setlayoutsafe(const Arg *arg);
|
||||
static void setupepoll(void);
|
||||
static void setstatus(const Arg *arg);
|
@ -18,7 +18,7 @@ setgaps(int oh, int ov, int ih, int iv)
|
||||
arrange(selmon);
|
||||
}
|
||||
|
||||
#if DWMC_PATCH
|
||||
#if DWMC_PATCH || IPC_PATCH
|
||||
/* External function that takes one integer and splits it
|
||||
* into four gap values:
|
||||
* - outer horizontal (oh)
|
||||
@ -70,7 +70,7 @@ setgapsex(const Arg *arg)
|
||||
|
||||
setgaps(oh, ov, ih, iv);
|
||||
}
|
||||
#endif // DWMC_PATCH
|
||||
#endif // DWMC_PATCH | IPC_PATCH
|
||||
|
||||
static void
|
||||
togglegaps(const Arg *arg)
|
||||
|
Loading…
Reference in New Issue
Block a user