Re: cwm quit()
Simon Bertrang <[email protected]> Sat, 5 Apr 2008 19:03:43 +0200
| Newsgroups | gmane.os.openbsd.x11 |
|---|---|
| Message-ID | <20080405170342.GC13141@localhost> |
On Fri, Apr 04, 2008 at 05:06:48PM -0300, Gleydson Soares wrote:
> hi again,
>
> i forgot -> switch SIGKILL to SIGTERM, sorry. diff bellow
>
Diff is working for me. As you might have noticed i wasn't aware of the
bind clash. After spending some more thoughts on this i think CM-w
could be better. At least a bit closer to the meaning of ``exec_wm''.
C-w is used by various apps to close the currently opened window - add
in a Meta to close the currently running WM, and start a new one.
I'd like to get it in with CM-w. Any objections, feedback and/or oks
for that?
Kind regards,
Simon
P.S.: BTW, binary growth on amd64:
-r-xr-xr-x 1 simon simon 71520 Apr 5 17:00 cwm.orig
-r-xr-xr-x 1 simon simon 71904 Apr 5 18:58 cwm
> 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 20:01:26 -0000
> @@ -485,3 +485,11 @@
> {
> client_vertmaximize(cc);
> }
> +
> +void
> +kbfunc_quit_wm(struct client_ctx *cc, void *arg)
> +{
> + int p;
> + p = kill(getpid(),SIGTERM);
> + 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 20:01:40 -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 20:02:07 -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 20:02:36 -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