add support for mouse based group {,r}cycle; from Rodrigo Mosconi. not

bound by default.
This commit is contained in:
okan 2013-07-08 18:39:20 +00:00
parent 1f244fe29c
commit 9bf2498d7e
4 changed files with 23 additions and 1 deletions

View File

@ -424,12 +424,16 @@ void kbfunc_ssh(struct client_ctx *, union arg *);
void kbfunc_term(struct client_ctx *, union arg *);
void kbfunc_tile(struct client_ctx *, union arg *);
void mousefunc_client_cyclegroup(struct client_ctx *,
void *);
void mousefunc_client_grouptoggle(struct client_ctx *,
void *);
void mousefunc_client_hide(struct client_ctx *, void *);
void mousefunc_client_lower(struct client_ctx *, void *);
void mousefunc_client_move(struct client_ctx *, void *);
void mousefunc_client_raise(struct client_ctx *, void *);
void mousefunc_client_rcyclegroup(struct client_ctx *,
void *);
void mousefunc_client_resize(struct client_ctx *, void *);
void mousefunc_menu_cmd(struct client_ctx *, void *);
void mousefunc_menu_group(struct client_ctx *, void *);

2
conf.c
View File

@ -550,6 +550,8 @@ static struct {
{ "window_lower", mousefunc_client_lower, MOUSEBIND_CTX_WIN },
{ "window_raise", mousefunc_client_raise, MOUSEBIND_CTX_WIN },
{ "window_hide", mousefunc_client_hide, MOUSEBIND_CTX_WIN },
{ "cyclegroup", mousefunc_client_cyclegroup, MOUSEBIND_CTX_ROOT },
{ "rcyclegroup", mousefunc_client_rcyclegroup, MOUSEBIND_CTX_ROOT },
{ "menu_group", mousefunc_menu_group, MOUSEBIND_CTX_ROOT },
{ "menu_unhide", mousefunc_menu_unhide, MOUSEBIND_CTX_ROOT },
{ "menu_cmd", mousefunc_menu_cmd, MOUSEBIND_CTX_ROOT },

View File

@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
.Dd $Mdocdate: January 8 2013 $
.Dd $Mdocdate: June 17 2013 $
.Dt CWMRC 5
.Os
.Sh NAME
@ -463,6 +463,10 @@ Raise current window.
Hide current window.
.It window_grouptoggle
Toggle group membership of current window.
.It cyclegroup
Forward cycle through groups.
.It rcyclegroup
Reverse cycle through groups.
.It menu_group
Launch group list.
.It menu_unhide

View File

@ -201,6 +201,18 @@ mousefunc_client_hide(struct client_ctx *cc, void *arg)
client_hide(cc);
}
void
mousefunc_client_cyclegroup(struct client_ctx *cc, void *arg)
{
group_cycle(cc->sc, CWM_CYCLE);
}
void
mousefunc_client_rcyclegroup(struct client_ctx *cc, void *arg)
{
group_cycle(cc->sc, CWM_RCYCLE);
}
void
mousefunc_menu_group(struct client_ctx *cc, void *arg)
{