diff options
author | okan <okan> | 2013-07-08 18:39:20 +0000 |
---|---|---|
committer | okan <okan> | 2013-07-08 18:39:20 +0000 |
commit | 9bf2498d7e388a7c0a05e3850b5235c5bb381d47 (patch) | |
tree | 6a8b13a79062b10065d1937f8b5044e17a03163b | |
parent | 1f244fe29c7234b05614f4040208f60052a8d377 (diff) | |
download | cwm-9bf2498d7e388a7c0a05e3850b5235c5bb381d47.tar.gz cwm-9bf2498d7e388a7c0a05e3850b5235c5bb381d47.tar.xz cwm-9bf2498d7e388a7c0a05e3850b5235c5bb381d47.zip |
add support for mouse based group {,r}cycle; from Rodrigo Mosconi. not
bound by default.
-rw-r--r-- | calmwm.h | 4 | ||||
-rw-r--r-- | conf.c | 2 | ||||
-rw-r--r-- | cwmrc.5 | 6 | ||||
-rw-r--r-- | mousefunc.c | 12 |
4 files changed, 23 insertions, 1 deletions
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 @@ -202,6 +202,18 @@ mousefunc_client_hide(struct client_ctx *cc, void *arg) } 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) { group_menu(arg); |