summaryrefslogtreecommitdiff
path: root/app/cwm
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-06-25 22:44:43 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-06-25 22:44:43 +0000
commit7fca8660c62e2dd619c7b58b45f9f3a96d87de36 (patch)
tree213606b7c3e577142a40d950b416fd3194f4e6ac /app/cwm
parentc9a31a5a314b7051b33797420c484c817703b18f (diff)
Allow a mouse binding to hide a window, and add a default keybinding for CMS-M3,
so it's hard to press by accident, but there if you need it. requested (in a way) and tested by johan and todd.
Diffstat (limited to 'app/cwm')
-rw-r--r--app/cwm/calmwm.h3
-rw-r--r--app/cwm/conf.c4
-rw-r--r--app/cwm/cwm.14
-rw-r--r--app/cwm/cwmrc.54
-rw-r--r--app/cwm/mousefunc.c8
5 files changed, 18 insertions, 5 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index 90c9ee2ff..fa73b58fc 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: calmwm.h,v 1.56 2008/06/25 22:37:29 oga Exp $
+ * $Id: calmwm.h,v 1.57 2008/06/25 22:44:42 oga Exp $
*/
#ifndef _CALMWM_H_
@@ -457,6 +457,7 @@ void mousefunc_window_move(struct client_ctx *, void *);
void mousefunc_window_grouptoggle(struct client_ctx *,
void *);
void mousefunc_window_lower(struct client_ctx *, void *);
+void mousefunc_window_hide(struct client_ctx *, void *);
void mousefunc_menu_group(struct client_ctx *, void *);
void mousefunc_menu_unhide(struct client_ctx *, void *);
void mousefunc_menu_cmd(struct client_ctx *, void *);
diff --git a/app/cwm/conf.c b/app/cwm/conf.c
index d25936564..c10a18299 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: conf.c,v 1.45 2008/06/25 22:40:27 oga Exp $
+ * $Id: conf.c,v 1.46 2008/06/25 22:44:42 oga Exp $
*/
#include "headers.h"
@@ -166,6 +166,7 @@ conf_init(struct conf *c)
conf_mousebind(c, "CM-1", "window_grouptoggle");
conf_mousebind(c, "M-2", "window_resize");
conf_mousebind(c, "M-3", "window_lower");
+ conf_mousebind(c, "CMS-3", "window_hide");
/* Default term/lock */
strlcpy(c->termpath, "xterm", sizeof(c->termpath));
@@ -406,6 +407,7 @@ struct {
{ "window_grouptoggle", mousefunc_window_grouptoggle,
MOUSEBIND_CTX_WIN },
{ "window_lower", mousefunc_window_lower, MOUSEBIND_CTX_WIN },
+ { "window_hide", mousefunc_window_hide, MOUSEBIND_CTX_WIN },
{ "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/app/cwm/cwm.1 b/app/cwm/cwm.1
index 8b55380f8..7e13786dc 100644
--- a/app/cwm/cwm.1
+++ b/app/cwm/cwm.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cwm.1,v 1.32 2008/06/25 01:09:09 oga Exp $
+.\" $OpenBSD: cwm.1,v 1.33 2008/06/25 22:44:42 oga Exp $
.\"
.\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org>
.\"
@@ -127,6 +127,8 @@ Toggle a window's membership in the current group.
Resize a window/select a window.
.It M-M3
Lower a window.
+.It CMS-M3
+Hide a window.
.El
.Pp
The options for
diff --git a/app/cwm/cwmrc.5 b/app/cwm/cwmrc.5
index c2b5dd5ca..4fc2a0b29 100644
--- a/app/cwm/cwmrc.5
+++ b/app/cwm/cwmrc.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cwmrc.5,v 1.13 2008/06/25 22:40:27 oga Exp $
+.\" $OpenBSD: cwmrc.5,v 1.14 2008/06/25 22:44:42 oga Exp $
.\"
.\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org>
.\"
@@ -314,6 +314,8 @@ move a window
resize a window
.It window_lower
lower a window
+.It window_hide
+hide a window
.It window_grouptoggle
toggle group membership of a window
.It menu_group
diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c
index d8619ac37..e4e8e9b07 100644
--- a/app/cwm/mousefunc.c
+++ b/app/cwm/mousefunc.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: mousefunc.c,v 1.1 2008/06/14 21:48:54 okan Exp $
+ * $Id: mousefunc.c,v 1.2 2008/06/25 22:44:42 oga Exp $
*/
#include "headers.h"
@@ -49,6 +49,12 @@ mousefunc_window_lower(struct client_ctx *cc, void *arg)
}
void
+mousefunc_window_hide(struct client_ctx *cc, void *arg)
+{
+ client_hide(cc);
+}
+
+void
mousefunc_menu_group(struct client_ctx *cc, void *arg)
{
group_menu(arg);