convenience. So now one can paste using M-v.
.It Cm M-S-w
uniconify
.It Cm M-S-r
.It Cm M-S-w
uniconify
.It Cm M-S-r
+always_raise
+.It Cm M-v
+button2
.El
.Pp
The action names and descriptions are listed below:
.El
.Pp
The action names and descriptions are listed below:
Maximize (map) window returned by dmenu selection.
.It Cm always_raise
When set tiled windows are allowed to obscure floating windows.
Maximize (map) window returned by dmenu selection.
.It Cm always_raise
When set tiled windows are allowed to obscure floating windows.
+.It Cm button2
+Fake a middle mouse button click (mouse button 2).
.El
.Pp
Custom bindings in the configuration file are specified as follows:
.El
.Pp
Custom bindings in the configuration file are specified as follows:
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xrandr.h>
#include <X11/Xproto.h>
#include <X11/Xutil.h>
#include <X11/extensions/Xrandr.h>
+#include <X11/extensions/XTest.h>
#ifdef __OSX__
#include <osx.h>
#ifdef __OSX__
#include <osx.h>
+pressbutton(struct swm_region *r, union arg *args)
+{
+fprintf(stderr, "%d\n", args->id);
+ XTestFakeButtonEvent(display, args->id, True, CurrentTime);
+ XTestFakeButtonEvent(display, args->id, False, CurrentTime);
+}
+
+void
raise_toggle(struct swm_region *r, union arg *args)
{
if (r && r->ws == NULL)
raise_toggle(struct swm_region *r, union arg *args)
{
if (r && r->ws == NULL)
kf_iconify,
kf_uniconify,
kf_raise_toggle,
kf_iconify,
kf_uniconify,
kf_raise_toggle,
kf_dumpwins, /* MUST BE LAST */
kf_invalid
};
kf_dumpwins, /* MUST BE LAST */
kf_invalid
};
{ "iconify", iconify, {0} },
{ "uniconify", uniconify, {0} },
{ "raise_toggle", raise_toggle, {0} },
{ "iconify", iconify, {0} },
{ "uniconify", uniconify, {0} },
{ "raise_toggle", raise_toggle, {0} },
+ { "button2", pressbutton, {2} },
{ "dumpwins", dumpwins, {0} }, /* MUST BE LAST */
{ "invalid key func", NULL, {0} },
};
{ "dumpwins", dumpwins, {0} }, /* MUST BE LAST */
{ "invalid key func", NULL, {0} },
};
setkeybinding(MODKEY, XK_w, kf_iconify, NULL);
setkeybinding(MODKEY|ShiftMask, XK_w, kf_uniconify, NULL);
setkeybinding(MODKEY|ShiftMask, XK_r, kf_raise_toggle,NULL);
setkeybinding(MODKEY, XK_w, kf_iconify, NULL);
setkeybinding(MODKEY|ShiftMask, XK_w, kf_uniconify, NULL);
setkeybinding(MODKEY|ShiftMask, XK_r, kf_raise_toggle,NULL);
+ setkeybinding(MODKEY, XK_v, kf_button2, NULL);
#ifdef SWM_DEBUG
setkeybinding(MODKEY|ShiftMask, XK_d, kf_dumpwins, NULL);
#endif
#ifdef SWM_DEBUG
setkeybinding(MODKEY|ShiftMask, XK_d, kf_dumpwins, NULL);
#endif
setup_ewmh();
/* set some values to work around bad programs */
workaround();
setup_ewmh();
/* set some values to work around bad programs */
workaround();
/* grab existing windows (before we build the bars) */
grab_windows();
/* grab existing windows (before we build the bars) */
grab_windows();
#bind[iconify] = MOD+w
#bind[uniconify] = MOD+Shift+w
#bind[raise_toggle] = MOD+Shift+r
#bind[iconify] = MOD+w
#bind[uniconify] = MOD+Shift+w
#bind[raise_toggle] = MOD+Shift+r
# quirks
# remove with: quirk[class:name] = NONE
# quirks
# remove with: quirk[class:name] = NONE