diff options
Diffstat (limited to '')
-rw-r--r-- | calmwm.h | 3 | ||||
-rw-r--r-- | conf.c | 6 | ||||
-rw-r--r-- | cwm.1 | 8 | ||||
-rw-r--r-- | kbfunc.c | 10 | ||||
-rw-r--r-- | xevents.c | 5 |
5 files changed, 23 insertions, 9 deletions
@@ -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.26 2008/03/26 15:45:42 oga Exp $ + * $Id: calmwm.h,v 1.27 2008/04/07 23:47:09 simon Exp $ */ #ifndef _CALMWM_H_ @@ -451,6 +451,7 @@ void kbfunc_client_prevgroup(struct client_ctx *, void *); void kbfunc_client_nogroup(struct client_ctx *, void *); void kbfunc_client_maximize(struct client_ctx *, void *); void kbfunc_client_vmaximize(struct client_ctx *, void *); +void kbfunc_quit_wm(struct client_ctx *, void *); void kbfunc_client_move(struct client_ctx *, void *); void kbfunc_client_resize(struct client_ctx *, void *); void kbfunc_menu_search(struct client_ctx *, void *); @@ -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.23 2008/03/23 15:09:21 simon Exp $ + * $Id: conf.c,v 1.24 2008/04/07 23:47:09 simon Exp $ */ #include "headers.h" @@ -94,7 +94,7 @@ conf_init(struct conf *c) conf_bindname(c, "CM-Return", "terminal"); conf_bindname(c, "CM-Delete", "lock"); conf_bindname(c, "M-question", "exec"); - conf_bindname(c, "CM-q", "exec_wm"); + conf_bindname(c, "CM-w", "exec_wm"); conf_bindname(c, "M-period", "ssh"); conf_bindname(c, "M-Return", "hide"); conf_bindname(c, "M-Down", "lower"); @@ -119,6 +119,7 @@ conf_init(struct conf *c) conf_bindname(c, "M-Left", "prevgroup"); conf_bindname(c, "CM-f", "maximize"); conf_bindname(c, "CM-equal", "vmaximize"); + conf_bindname(c, "CM-q", "quit"); conf_bindname(c, "M-h", "moveleft"); conf_bindname(c, "M-j", "movedown"); @@ -260,6 +261,7 @@ struct { { "prevgroup", kbfunc_client_prevgroup, 0, 0 }, { "maximize", kbfunc_client_maximize, KBFLAG_NEEDCLIENT, 0 }, { "vmaximize", kbfunc_client_vmaximize, KBFLAG_NEEDCLIENT, 0 }, + { "quit", kbfunc_quit_wm, 0, 0 }, { "exec", kbfunc_exec, 0, (void *)CWM_EXEC_PROGRAM }, { "exec_wm", kbfunc_exec, 0, (void *)CWM_EXEC_WM }, { "ssh", kbfunc_ssh, 0, 0 }, @@ -1,4 +1,4 @@ -.\" $OpenBSD: cwm.1,v 1.24 2008/03/23 15:09:21 simon Exp $ +.\" $OpenBSD: cwm.1,v 1.25 2008/04/07 23:47:09 simon Exp $ .\" .\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org> .\" @@ -15,7 +15,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" The following requests are required for all man pages. -.Dd $Mdocdate: March 23 2008 $ +.Dd $Mdocdate: April 7 2008 $ .Dt CWM 1 .Os .Sh NAME @@ -61,6 +61,8 @@ their functionality is described in more detail later. Spawn a new terminal. .It Ic C-M-Delete Lock the screen. +.It Ic C-M-q +Quit cwm. .It Ic M-Enter Hide current window. .It Ic M-Down @@ -104,7 +106,7 @@ This parses to provide host auto-completion. .Xr ssh 1 will be executed via the configured terminal emulator. -.It Ic C-M-q +.It Ic C-M-w Spawn .Dq Exec WindowManager dialog; allows you to switch from @@ -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: kbfunc.c,v 1.17 2008/04/05 21:09:19 okan Exp $ + * $Id: kbfunc.c,v 1.18 2008/04/07 23:47:09 simon Exp $ */ #include <paths.h> @@ -27,6 +27,8 @@ #define HASH_MARKER "|1|" #define MOVE_AMOUNT 1 +extern int _xev_quit; + void kbfunc_client_lower(struct client_ctx *cc, void *arg) { @@ -488,3 +490,9 @@ kbfunc_client_vmaximize(struct client_ctx *cc, void *arg) { client_vertmaximize(cc); } + +void +kbfunc_quit_wm(struct client_ctx *cc, void *arg) +{ + _xev_quit = 1; +} @@ -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: xevents.c,v 1.8 2008/03/23 15:09:21 simon Exp $ + * $Id: xevents.c,v 1.9 2008/04/07 23:47:09 simon Exp $ */ /* @@ -451,6 +451,7 @@ out: static struct xevent_q _xevq, _xevq_putaway; static short _xev_q_lock = 0; +int _xev_quit = 0; void xev_init(void) @@ -524,7 +525,7 @@ xev_loop(void) XEvent e; struct xevent *xev, *nextxev; - for (;;) { + while (_xev_quit == 0) { #ifdef DIAGNOSTIC if (TAILQ_EMPTY(&_xevq)) errx(1, "X event queue empty"); |