Re: cwm quit()
Gleydson Soares <[email protected]> Fri, 4 Apr 2008 16:36:35 -0300
| Newsgroups | gmane.os.openbsd.x11 |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Apr 4, 2008 at 2:01 PM, Simon Bertrang <[email protected]> wrote: > > I've bound it to CM-q in my config, maybe that's less accidental to hit. > At least I haven't hit yet - and i'm using screen a lot ;) CM-q is already used by keybinding "exec_wm()". my suggestion is move the CM-q to CM-p and to use the CM-q for quit() > > Final diff? :) below :) Index: kbfunc.c =================================================================== RCS file: /cvs/xenocara/app/cwm/kbfunc.c,v retrieving revision 1.16 diff -u -r1.16 kbfunc.c --- kbfunc.c 23 Mar 2008 15:09:21 -0000 1.16 +++ kbfunc.c 4 Apr 2008 19:21:30 -0000 @@ -485,3 +485,11 @@ { client_vertmaximize(cc); } + +void +kbfunc_quit_wm(struct client_ctx *cc, void *arg) +{ + int p; + p = kill(getpid(),SIGKILL); + warn("p"); +} Index: conf.c =================================================================== RCS file: /cvs/xenocara/app/cwm/conf.c,v retrieving revision 1.23 diff -u -r1.23 conf.c --- conf.c 23 Mar 2008 15:09:21 -0000 1.23 +++ conf.c 4 Apr 2008 19:22:03 -0000 @@ -94,7 +94,7 @@ 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-p", "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_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 @@ { "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 }, Index: calmwm.h =================================================================== RCS file: /cvs/xenocara/app/cwm/calmwm.h,v retrieving revision 1.26 diff -u -r1.26 calmwm.h --- calmwm.h 26 Mar 2008 15:45:42 -0000 1.26 +++ calmwm.h 4 Apr 2008 19:22:39 -0000 @@ -451,6 +451,7 @@ 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 *); Index: cwm.1 =================================================================== RCS file: /cvs/xenocara/app/cwm/cwm.1,v retrieving revision 1.24 diff -u -r1.24 cwm.1 --- cwm.1 23 Mar 2008 15:09:21 -0000 1.24 +++ cwm.1 4 Apr 2008 19:24:46 -0000 @@ -61,6 +61,8 @@ 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 @@ 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-p Spawn .Dq Exec WindowManager dialog; allows you to switch from