diff --git a/calmwm.h b/calmwm.h index aa21c35..9a5517d 100644 --- a/calmwm.h +++ b/calmwm.h @@ -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 *); diff --git a/conf.c b/conf.c index 5f3d1cb..576f623 100644 --- a/conf.c +++ b/conf.c @@ -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 }, diff --git a/cwmrc.5 b/cwmrc.5 index 68803ad..9f75dbd 100644 --- a/cwmrc.5 +++ b/cwmrc.5 @@ -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 diff --git a/mousefunc.c b/mousefunc.c index 109b655..40fae3f 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -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) {